커뮤니티

문의드립니다

프로필 이미지
파손
2015-12-13 23:18:09
138
글번호 93362
답변완료
var : cnt(0),count(0),Pergap(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } Pergep = abs(dayclose(1)-dayopen(0)); if perdayrange >= 3 Then{ #첫봉신호 if sTime == 144900 Then{ buy("b1",AtStop,NextBarOpen +0.3); sell("s1",AtStop,NextBarOpen -0.3); } if stime == 151500 Then{ buy("b4",AtStop,NextBarOpen +0.3); sell("s4",AtStop,NextBarOpen -0.3); } if stime == 151600 Then{ buy("b5",AtStop,NextBarOpen +0.3); sell("s5",AtStop,NextBarOpen -0.3); #두번째봉부터 11시까지 if stime >= 090000 and count < 1 and stime < 135900 Then{ if MarketPosition == 0 Then{ buy("b",AtStop,DayOpen +0.3); sell("s",AtStop,DayOpen -0.3); 안녕하십니까 종가가 달라서 9시 1분봉에 진입하지 않고 2분봉에 진입하여 저렇게 설정되어있습니다.. 그런데 전전날에 폭이 3이상이고 전날에 폭이 3이하인데 첫봉신호 설정한것들이 거래를 합니다. 이것을 방지하고 전날에만 폭이 3이상일 때 거래하고 싶은데 어떻게 해야하죠? 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-12-14 15:06:40

안녕하세요 예스스탁입니다. 첫봉에 나오는 신호는 전날에 셋팅이되어 첫봉에서 감시하므로 abs(dayclose-NextBarOpen) >= 3 라는 조건을 주셔야 합니다. var : cnt(0),count(0),Pregap(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } Pregap = abs(dayclose(1)-dayopen(0)); #첫봉신호 if sTime == 144900 and abs(dayclose-NextBarOpen) >= 3 Then{ buy("b1",AtStop,NextBarOpen +0.3); sell("s1",AtStop,NextBarOpen -0.3); } if stime == 151500 and abs(dayclose-NextBarOpen) >= 3 Then{ buy("b4",AtStop,NextBarOpen +0.3); sell("s4",AtStop,NextBarOpen -0.3); } if stime == 151600 and abs(dayclose-NextBarOpen) >= 3 Then{ buy("b5",AtStop,NextBarOpen +0.3); sell("s5",AtStop,NextBarOpen -0.3); } #두번째봉부터 11시까지 if stime >= 090000 and count < 1 and stime < 135900 and Pregap >= 3 Then{ if MarketPosition == 0 Then{ buy("b",AtStop,DayOpen +0.3); sell("s",AtStop,DayOpen -0.3); } 즐거운 하루되세요 > 파손 님이 쓴 글입니다. > 제목 : 문의드립니다 > var : cnt(0),count(0),Pergap(0); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } Pergep = abs(dayclose(1)-dayopen(0)); if perdayrange >= 3 Then{ #첫봉신호 if sTime == 144900 Then{ buy("b1",AtStop,NextBarOpen +0.3); sell("s1",AtStop,NextBarOpen -0.3); } if stime == 151500 Then{ buy("b4",AtStop,NextBarOpen +0.3); sell("s4",AtStop,NextBarOpen -0.3); } if stime == 151600 Then{ buy("b5",AtStop,NextBarOpen +0.3); sell("s5",AtStop,NextBarOpen -0.3); #두번째봉부터 11시까지 if stime >= 090000 and count < 1 and stime < 135900 Then{ if MarketPosition == 0 Then{ buy("b",AtStop,DayOpen +0.3); sell("s",AtStop,DayOpen -0.3); 안녕하십니까 종가가 달라서 9시 1분봉에 진입하지 않고 2분봉에 진입하여 저렇게 설정되어있습니다.. 그런데 전전날에 폭이 3이상이고 전날에 폭이 3이하인데 첫봉신호 설정한것들이 거래를 합니다. 이것을 방지하고 전날에만 폭이 3이상일 때 거래하고 싶은데 어떻게 해야하죠? 감사합니다.