커뮤니티

수식추가부탁드립니다

프로필 이미지
뎅이요
2019-06-26 15:39:26
189
글번호 129791
답변완료
매수진입시간 시작 오전 9시1분에서 starttime(90100) 매수청산 시간을 오후 3시20분 endtime(152000);에 청산이 되도록 설정되어 있습니다 매수진입이 오전 9시 시작 오후 3시까지만 진입이 허용되도록 설정 추가 부탁 드립니다 (매수청산 시간을 오후 3시20분 endtime(152000);에 청산) input : starttime(90100),endtime(152000); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-06-26 16:34:29

안녕하세요 예스스탁입니다. input : starttime(90100),endtime(150000),xtime(152000); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } if (sdate != sdate[1] and stime >= xtime) or (sdate == sdate[1] and stime >= xtime and stime[1] < xtime) then { if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); } 즐거운 하루되세요 > 뎅이요 님이 쓴 글입니다. > 제목 : 수식추가부탁드립니다 > 매수진입시간 시작 오전 9시1분에서 starttime(90100) 매수청산 시간을 오후 3시20분 endtime(152000);에 청산이 되도록 설정되어 있습니다 매수진입이 오전 9시 시작 오후 3시까지만 진입이 허용되도록 설정 추가 부탁 드립니다 (매수청산 시간을 오후 3시20분 endtime(152000);에 청산) input : starttime(90100),endtime(152000); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); }