커뮤니티
행복; 시스템식 작성 바랍니다
2017-09-28 01:37:13
158
글번호 113153
한국의 금융산업 발전을 위해 불철주야 애쓰시는 귀하의 노고를 높이 평가합니다
시스템식 관련입니다
Q&A < 55007 > 에 대한 << 아래 >>의 답변 잘 받았습니다
===================<< 아래 >>==============================
If MarketPosition == 0 and sDate == 20170915 Then
Buy("b1");
if MarketPosition == 1 then{
#첫진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
var1 = LatestEntryPrice(0);
#두번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
var2 = LatestEntryPrice(0);
#세번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
var3 = LatestEntryPrice(0);
if MaxEntries == 1 and sDate == 20170918 Then
Buy("b2");
If MaxEntries == 2 and sDate > 20170918 Then
Buy("b3",AtLimit,Var2 * 1.1,100);
If MarketPosition == 1 and MaxEntries == 3 Then{
ExitLong("bx3_이익",AtLimit,Var3*1.1); // 10% 이익시 즉시 매도
ExitLong("bx3_손실",AtStop,Var3*0.9); // 10% 손실시 즉시 매도
}
}
===============================================================================
- 코스닥 종목 "이디", 종목번호 033110 에 적용을 하였습니다
- 1차 매수; 9월 15일
- 2차 매수; 9월 18일 이후에
- 3차 매수가 9월 19일에 이루어지고
- 9월 20일에 전량 매도 되어야 하는데
- 3차 매수가 9월 20일에 이루어지고
- 전량 매도가 이루어지지 않습니다
- marketposition 이나 maxentries 를 사용하면 매수나 매도가 하루 늦어지나요?
어떻게 해야 하는지요?
수고하십시요^^
답변 1
예스스탁 예스스탁 답변
2017-09-28 14:46:10
안녕하세요
예스스탁입니다.
진입횟수등 포지션 관련함수는 봉완성시(다음봉시가수신)에 체크가 됩니다.
19일에 신호가 발생하기 위해서는 18에 셋팅되는
별도의 수식이 들어가야 합니다.
식 수정해 드립니다.
If MarketPosition == 0 and sDate == 20170915 Then
Buy("b1");
if MarketPosition == 1 then{
#첫진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
var1 = LatestEntryPrice(0);
#두번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
var2 = LatestEntryPrice(0);
#세번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
var3 = LatestEntryPrice(0);
if MaxEntries == 1 and sDate == 20170918 Then{
Buy("b2");
Buy("b31",AtLimit,C * 1.1,100);
}
If MaxEntries == 2 and sDate >= 20170918 Then
Buy("b32",AtLimit,Var2 * 1.1,100);
If MarketPosition == 1 and MaxEntries == 3 Then{
ExitLong("bx3_이익",AtLimit,Var3*1.1); // 10% 이익시 즉시 매도
ExitLong("bx3_손실",AtStop,Var3*0.9); // 10% 손실시 즉시 매도
}
}
즐거운 하루되세요
> 행복한가방 님이 쓴 글입니다.
> 제목 : 행복; 시스템식 작성 바랍니다
> 한국의 금융산업 발전을 위해 불철주야 애쓰시는 귀하의 노고를 높이 평가합니다
시스템식 관련입니다
Q&A < 55007 > 에 대한 << 아래 >>의 답변 잘 받았습니다
===================<< 아래 >>==============================
If MarketPosition == 0 and sDate == 20170915 Then
Buy("b1");
if MarketPosition == 1 then{
#첫진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 1 Then
var1 = LatestEntryPrice(0);
#두번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 2 Then
var2 = LatestEntryPrice(0);
#세번째 진입가
if CurrentContracts > CurrentContracts[1] and MaxEntries == 3 Then
var3 = LatestEntryPrice(0);
if MaxEntries == 1 and sDate == 20170918 Then
Buy("b2");
If MaxEntries == 2 and sDate > 20170918 Then
Buy("b3",AtLimit,Var2 * 1.1,100);
If MarketPosition == 1 and MaxEntries == 3 Then{
ExitLong("bx3_이익",AtLimit,Var3*1.1); // 10% 이익시 즉시 매도
ExitLong("bx3_손실",AtStop,Var3*0.9); // 10% 손실시 즉시 매도
}
}
===============================================================================
- 코스닥 종목 "이디", 종목번호 033110 에 적용을 하였습니다
- 1차 매수; 9월 15일
- 2차 매수; 9월 18일 이후에
- 3차 매수가 9월 19일에 이루어지고
- 9월 20일에 전량 매도 되어야 하는데
- 3차 매수가 9월 20일에 이루어지고
- 전량 매도가 이루어지지 않습니다
- marketposition 이나 maxentries 를 사용하면 매수나 매도가 하루 늦어지나요?
어떻게 해야 하는지요?
수고하십시요^^
다음글
이전글