커뮤니티

수식 확인바랍니다.

프로필 이미지
버핏
2016-09-17 13:32:19
112
글번호 101978
답변완료
아래는 '한 권으로 끝내는 시스템트레이딩' 책자 p225의 손절 청산 예입니다. 선물5분봉에 적용해봤는데 매수는 나오는데 매도는 신호가 나오지 않습니다. 어디에 오류가 있는지 확인해주시면 감사하겠습니다. p226 손익분기 청산, p228 초과수익청산, p231 추적청산의 경우도 교재 그대로 해봤는데 매수만 나오고 매도는 나오지 않습니다. Input : cond1_3(1), 퍼센트(2.0), 포인트(4.0), ATR지표(4.0); if DayIndex==0 then { if C>0 then buy(); Else sell();} if cond1_3 == 1 and MarketPosition <> 0 Then { ExitLong("EL_손절%", AtStop, EntryPrice*(1-퍼센트/100)); ExitShort("ES_손절%", AtStop, EntryPrice*(1+퍼센트/100)); } if cond1_3 == 2 and MarketPosition <> 0 Then { ExitLong("EL_손절Point", AtStop, EntryPrice*(1-포인트/100)); ExitShort("ES_손절Point", AtStop, EntryPrice*(1+포인트/100)); } if cond1_3 == 3 and MarketPosition <> 0 Then { ExitLong("EL_손절ATR", AtStop, EntryPrice-ATR(20)* ATR지표); ExitShort("ES_손절ATR", AtStop, EntryPrice + ATR(20)* ATR지표); } # 당일청산 setstopendofday(1450);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-09-19 11:37:45

안녕하세요 예스스탁입니다. if C>O then 에서 알파벳 O가 아닌 숫자 0이 적혀져 있었습니다. 수정한 식입니다. Input : cond1_3(1), 퍼센트(2.0), 포인트(4.0), ATR지표(4.0); if DayIndex==0 then { if C>O then buy(); Else sell();} if cond1_3 == 1 and MarketPosition <> 0 Then { ExitLong("EL_손절%", AtStop, EntryPrice*(1-퍼센트/100)); ExitShort("ES_손절%", AtStop, EntryPrice*(1+퍼센트/100)); } if cond1_3 == 2 and MarketPosition <> 0 Then { ExitLong("EL_손절Point", AtStop, EntryPrice*(1-포인트/100)); ExitShort("ES_손절Point", AtStop, EntryPrice*(1+포인트/100)); } if cond1_3 == 3 and MarketPosition <> 0 Then { ExitLong("EL_손절ATR", AtStop, EntryPrice-ATR(20)* ATR지표); ExitShort("ES_손절ATR", AtStop, EntryPrice + ATR(20)* ATR지표); } # 당일청산 setstopendofday(1450); 즐거운 하루되세요 > 버핏 님이 쓴 글입니다. > 제목 : 수식 확인바랍니다. > 아래는 '한 권으로 끝내는 시스템트레이딩' 책자 p225의 손절 청산 예입니다. 선물5분봉에 적용해봤는데 매수는 나오는데 매도는 신호가 나오지 않습니다. 어디에 오류가 있는지 확인해주시면 감사하겠습니다. p226 손익분기 청산, p228 초과수익청산, p231 추적청산의 경우도 교재 그대로 해봤는데 매수만 나오고 매도는 나오지 않습니다. Input : cond1_3(1), 퍼센트(2.0), 포인트(4.0), ATR지표(4.0); if DayIndex==0 then { if C>0 then buy(); Else sell();} if cond1_3 == 1 and MarketPosition <> 0 Then { ExitLong("EL_손절%", AtStop, EntryPrice*(1-퍼센트/100)); ExitShort("ES_손절%", AtStop, EntryPrice*(1+퍼센트/100)); } if cond1_3 == 2 and MarketPosition <> 0 Then { ExitLong("EL_손절Point", AtStop, EntryPrice*(1-포인트/100)); ExitShort("ES_손절Point", AtStop, EntryPrice*(1+포인트/100)); } if cond1_3 == 3 and MarketPosition <> 0 Then { ExitLong("EL_손절ATR", AtStop, EntryPrice-ATR(20)* ATR지표); ExitShort("ES_손절ATR", AtStop, EntryPrice + ATR(20)* ATR지표); } # 당일청산 setstopendofday(1450);