커뮤니티

부탁드립니다..

프로필 이미지
디엠
2017-04-19 15:59:31
173
글번호 108955
답변완료
var1 = dayhigh(1)-daylow(1); if MarketPosition <= 0 and H < dayopen+var1 Then buy("b",AtStop,dayopen+var1); if MarketPosition >= 0 and L > dayopen-var1 Then sell("s",AtStop,dayopen-var1); if MarketPosition == 1 Then exitlong("bl",AtStop,EntryPrice-(var2*0.5)); if MarketPosition == -1 Then ExitShort("sl",AtStop,EntryPrice+(var2*0.5)); if NextBarSdate > sdate Then{ if MarketPosition == 1 then ExitLong("bx"); if MarketPosition == -1 then ExitShort("sx"); } 수식 만드니 15줄 선언되지 않은 nextbarsdate가 사용되었음이라고 나옵니다.. 수정해 주시길 바랍니다..
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-20 10:59:43

안녕하세요 예스스탁입니다. nextbarsdate는 해외선물에서는 제공되지 않습니다. 다음날 청산이므로 다음영업일 첫봉에 청산하게 수정해 드립니다. var1 = dayhigh(1)-daylow(1); if MarketPosition <= 0 and H < dayopen+var1 Then buy("b",AtStop,dayopen+var1); if MarketPosition >= 0 and L > dayopen-var1 Then sell("s",AtStop,dayopen-var1); if MarketPosition == 1 Then exitlong("bl",AtStop,EntryPrice-(var2*0.5)); if MarketPosition == -1 Then ExitShort("sl",AtStop,EntryPrice+(var2*0.5)); if bdate != bdate[1] Then{ if MarketPosition == 1 then ExitLong("bx"); if MarketPosition == -1 then ExitShort("sx"); } 즐거운 하루되세요 > 디엠 님이 쓴 글입니다. > 제목 : 부탁드립니다.. > var1 = dayhigh(1)-daylow(1); if MarketPosition <= 0 and H < dayopen+var1 Then buy("b",AtStop,dayopen+var1); if MarketPosition >= 0 and L > dayopen-var1 Then sell("s",AtStop,dayopen-var1); if MarketPosition == 1 Then exitlong("bl",AtStop,EntryPrice-(var2*0.5)); if MarketPosition == -1 Then ExitShort("sl",AtStop,EntryPrice+(var2*0.5)); if NextBarSdate > sdate Then{ if MarketPosition == 1 then ExitLong("bx"); if MarketPosition == -1 then ExitShort("sx"); } 수식 만드니 15줄 선언되지 않은 nextbarsdate가 사용되었음이라고 나옵니다.. 수정해 주시길 바랍니다..