커뮤니티

수식 문의드립니다.

프로필 이미지
트레이더365
2023-10-17 00:54:31
764
글번호 173130
답변완료
안녕하세요. 지난번에 23시00분00초부터 23시59분00초까지 거래할 수 있는 아래 식을 만들어주셨었는데요, 아래 식에서 거래시간만 00시00분10초부터 00시59분00초까지 거래가 이루어지도록 변경 부탁드립니다. 감사합니다. input : StartTime(230000),EndTime(235900); var : Tcond(False),Xcond(False),DayPL(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; Xcond = False; daypl = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] then { daypl = dayPL + PositionProfit(1); if daypl > 0 Then Xcond = true; } if Tcond == true and Xcond == False Then { 진입청산수식 }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-10-17 14:45:51

안녕하세요 예스스탁입니다. input : StartTime(000010),EndTime(005900); var : Tcond(False),Xcond(False),DayPL(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; Xcond = False; daypl = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] then { daypl = dayPL + PositionProfit(1); if daypl > 0 Then Xcond = true; } if Tcond == true and Xcond == False Then { 진입청산수식 } 즐거운 하루되세요 > 트레이더365 님이 쓴 글입니다. > 제목 : 수식 문의드립니다. > 안녕하세요. 지난번에 23시00분00초부터 23시59분00초까지 거래할 수 있는 아래 식을 만들어주셨었는데요, 아래 식에서 거래시간만 00시00분10초부터 00시59분00초까지 거래가 이루어지도록 변경 부탁드립니다. 감사합니다. input : StartTime(230000),EndTime(235900); var : Tcond(False),Xcond(False),DayPL(0); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; Xcond = False; daypl = 0; IF Endtime <= starttime Then { SetStopEndofday(0); } } if TotalTrades > TotalTrades[1] then { daypl = dayPL + PositionProfit(1); if daypl > 0 Then Xcond = true; } if Tcond == true and Xcond == False Then { 진입청산수식 }