커뮤니티

질문입니다

프로필 이미지
반포동
2009-11-27 08:40:59
629
글번호 26344
답변완료
setstoptrailing(0.3,1,pointstop); setstopendofday(1500); var : cnt(0),count(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if MarketPosition() == 0 and count == 0 Then{ if stime >=090800 then Buy("b",AtStop,H[1]+0.3); if stime >=090800 then sell("s",AtStop,l[1]-0.3); } if MarketPosition() != 0 Then{ if stime >=090800 then exitlong("콜손절",atstop,H[1]-0.3); if stime >=090800 then exitshort("풋손절",atstop,l[1]+0.3);} if MarketPosition() == 0 and count >= 1 Then{ if stime >=090800 then Buy("b1",AtStop,H[1]+0.3); if stime >=090800 then sell("s1",AtStop,l[1]-0.3); } 이렇게 식을 작성하였는데 9시8분부터 진입하도록 되어있는데 9시부터 진입을 하게 됩니다 틀린곳이 있으면 고쳐주세요^^;; 감사합니다~
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2009-11-27 10:36:19

안녕하세요 예스스탁입니다. atstop이나 atlimit타입의 경우 전일 마지막봉에 if조건이 만족하고 다음날 첫봉이 가격조건에 만족해 신호가 발생할 수 있습니다. 각 진입식에 시간조건을 주시면 됩니다. setstoptrailing(0.3,1,pointstop); setstopendofday(1500); var : cnt(0),count(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if MarketPosition() == 0 and count == 0 Then{ if stime >=090800 and stime < 150000 then Buy("b",AtStop,H[1]+0.3); if stime >=090800 and stime < 150000 then sell("s",AtStop,l[1]-0.3); } if MarketPosition() != 0 Then{ if stime >=090800 then exitlong("콜손절",atstop,H[1]-0.3); if stime >=090800 then exitshort("풋손절",atstop,l[1]+0.3);} if MarketPosition() == 0 and count >= 1 Then{ if stime >=090800 and stime < 150000 then Buy("b1",AtStop,H[1]+0.3); if stime >=090800 and stime < 150000 then sell("s1",AtStop,l[1]-0.3); } 즐거운 하루되세요 > 반포동 님이 쓴 글입니다. > 제목 : 질문입니다 > setstoptrailing(0.3,1,pointstop); setstopendofday(1500); var : cnt(0),count(0); count = 0; for cnt = 0 to 10{ if sdate == EntryDate(cnt) Then count = count+1; } if MarketPosition() == 0 and count == 0 Then{ if stime >=090800 then Buy("b",AtStop,H[1]+0.3); if stime >=090800 then sell("s",AtStop,l[1]-0.3); } if MarketPosition() != 0 Then{ if stime >=090800 then exitlong("콜손절",atstop,H[1]-0.3); if stime >=090800 then exitshort("풋손절",atstop,l[1]+0.3);} if MarketPosition() == 0 and count >= 1 Then{ if stime >=090800 then Buy("b1",AtStop,H[1]+0.3); if stime >=090800 then sell("s1",AtStop,l[1]-0.3); } 이렇게 식을 작성하였는데 9시8분부터 진입하도록 되어있는데 9시부터 진입을 하게 됩니다 틀린곳이 있으면 고쳐주세요^^;; 감사합니다~