커뮤니티

수정 부탁드립니다.

프로필 이미지
이데아
2019-10-04 13:52:50
215
글번호 132499
답변완료
변동성돌파 매매 코드를 만들어봤습니다 돌파시 매수해서 익일 시가에 매도하게 해놨는데, 손절을 추가하려고 합니다. 그런데 손절 후 같은날 재매수 하는 일이 발생해서 하루 1번만 매수할수 있게 부탁드립니다. input : daymult(0.4), stoploss(1.5); var1 = (dayhigh(1)-daylow(1))*daymult; #진입 if currententries<1 and Stime<143000 then buy("매수", atstop, dayopen+var1); #청산 setstoploss(stoploss, percentstop); if Marketposition ==1 and sdate> entrydate(1) and stime==090000 then exitlong("매도");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-10-07 14:30:59

안녕하세요 예스스탁입니다. input : daymult(0.4), stoploss(1.5); var1 = (dayhigh(1)-daylow(1))*daymult; #진입 if MarketPosition == 0 and ExitDate(1) != sdate and currententries<1 and Stime<143000 then buy("매수", atstop, dayopen+var1); #청산 setstoploss(stoploss, percentstop); if Marketposition ==1 and sdate> entrydate(1) and stime==090000 then exitlong("매도"); 즐거운 하루되세요 > 이데아 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 변동성돌파 매매 코드를 만들어봤습니다 돌파시 매수해서 익일 시가에 매도하게 해놨는데, 손절을 추가하려고 합니다. 그런데 손절 후 같은날 재매수 하는 일이 발생해서 하루 1번만 매수할수 있게 부탁드립니다. input : daymult(0.4), stoploss(1.5); var1 = (dayhigh(1)-daylow(1))*daymult; #진입 if currententries<1 and Stime<143000 then buy("매수", atstop, dayopen+var1); #청산 setstoploss(stoploss, percentstop); if Marketposition ==1 and sdate> entrydate(1) and stime==090000 then exitlong("매도");