커뮤니티

매매시간안에 청산안되면..

프로필 이미지
그린랜드
2023-05-16 22:10:44
1049
글번호 169046
답변완료
매매시간을 주간:(9시부터 20시)까지이고/ 야간: (23시부터 5시)까지 설정했을때.. 20시까지 청산안되고 20시 지나서 청산되면 거래정지후 --> 23시부터 다시 거래할려면.. 수식부탁드립니다. (야간도 5시까지 청산안되면 5시 지나서 청산하고 거래정지..)
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-05-17 15:57:45

안녕하세요 예스스탁입니다. 아래 수식 구조를 참고하시기 바랍니다. input : StartTime1(90000),EndTime1(200000); input : StartTime2(230000),EndTime2(50000); var : Tcond(false); IF Endtime1 > StartTime1 Then SetStopEndofday(Endtime2); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime2); } if (sdate != sdate[1] and stime >= StartTime1) or (sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then { Tcond = true; IF Endtime2 <= starttime1 Then { SetStopEndofday(0); } } if (sdate != sdate[1] and stime >= EndTime1) or (sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then Tcond = False; if (sdate != sdate[1] and stime >= StartTime2) or (sdate == sdate[1] and stime >= StartTime2 and stime[1] < StartTime2) Then Tcond = true; if (sdate != sdate[1] and stime >= EndTime2) or (sdate == sdate[1] and stime >= EndTime2 and stime[1] < EndTime2) Then Tcond = False; if Tcond == true Then { 진입청산 수식들 } 즐거운 하루되세요 > 그린랜드 님이 쓴 글입니다. > 제목 : 매매시간안에 청산안되면.. > 매매시간을 주간:(9시부터 20시)까지이고/ 야간: (23시부터 5시)까지 설정했을때.. 20시까지 청산안되고 20시 지나서 청산되면 거래정지후 --> 23시부터 다시 거래할려면.. 수식부탁드립니다. (야간도 5시까지 청산안되면 5시 지나서 청산하고 거래정지..)