커뮤니티

문의 드립니다

프로필 이미지
푸른
2022-12-28 15:00:40
1148
글번호 164934
답변완료
input : 익절틱수(00),손절틱수(20); input : StartTime(10000),EndTime(140000); 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 Tcond == true Then { 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } } if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx1",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx2",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); } 상품명 (china A50) 매매시간을 10시부터 14시까지 설정했는데 새벽 3시부터 연결되어서 신호가 나옵니다. 수정이 가능 한지 문의 드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-12-28 15:03:00

안녕하세요 예스스탁입니다. 이전 몇번의 문의에 시간설정에 대해 계속 동일한 답변을 드렸습니다. 오전 10시는 100000입니다. 오후 10시는 220000입니다. 10000으로 지정하시면 새벽 1시입니다. 또한 당일청산시간을 초기화하는 내용은 시작시간일때 처리하게 하셔야 합니다. 아래 수식구조를 숙지하시기 바랍니다. 1 input : 익절틱수(00),손절틱수(20); input : StartTime(100000),EndTime(140000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == true Then { if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx1",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx2",AtMarket); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : 익절틱수(00),손절틱수(20); input : StartTime(100000),EndTime(140000); var : Tcond(false); 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; IF Endtime <= starttime Then { SetStopEndofday(0); } } if Tcond == False Then { if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx1",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : 익절틱수(00),손절틱수(20); input : StartTime(10000),EndTime(140000); 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 Tcond == true Then { 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 { IF Endtime <= starttime Then { SetStopEndofday(0); } } if NextBarSdate != sDate Then { if NextBarOpen != C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx",AtMarket); if NextBarOpen != C Then { Sell("s",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen == C Then { Buy("b1",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx1",AtMarket); if NextBarOpen == C Then { Sell("s1",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx1",AtMarket); if NextBarSdate == sDate Then { if NextBarOpen != C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); } } ExitLong("bx2",AtMarket); if NextBarOpen != C Then { Sell("s2",AtStop,NextBarOpen-PriceScale*10); } ExitShort("sx2",AtMarket); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); } 상품명 (china A50) 매매시간을 10시부터 14시까지 설정했는데 새벽 3시부터 연결되어서 신호가 나옵니다. 수정이 가능 한지 문의 드립니다.