커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-09-13 07:22:32
651
글번호 172411
답변완료
input : StartTime(190000),EndTime(50000); input : 익절틱수(00),손절틱수(50); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (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 L ==lowest(L,3) and highest(H,3) >= lowest(L,3)+PriceScale*30 Then { Buy("b",AtStop,(highest(H,3)+lowest(L,3))/3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitLong(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 손절가에서 -3틱일때 반대 포지션으로 진입하는 수식어를 포함 하고자 합니다. 청산은 매수청산 신호 입니다. 매도후 청산식도 별도로 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-09-13 11:31:09

안녕하세요 예스스탁입니다. input : StartTime(190000),EndTime(50000); input : 익절틱수(00),손절틱수(50); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (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 L ==lowest(L,3) and highest(H,3) >= lowest(L,3)+PriceScale*30 Then { Buy("b",AtStop,(highest(H,3)+lowest(L,3))/3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitLong(); } if MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("StopLoss",1) == true Then Sell("bs",AtStop,ExitPrice(1)-PriceScale*3); if MarketPosition == -1 and BarsSinceEntry == 5 Then ExitShort("sx"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : StartTime(190000),EndTime(50000); input : 익절틱수(00),손절틱수(50); var : Tcond(False),entry(0); Variables: Mom(0); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } 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 (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 L ==lowest(L,3) and highest(H,3) >= lowest(L,3)+PriceScale*30 Then { Buy("b",AtStop,(highest(H,3)+lowest(L,3))/3); } if MarketPosition == 1 and BarsSinceEntry == 5 Then ExitLong(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 손절가에서 -3틱일때 반대 포지션으로 진입하는 수식어를 포함 하고자 합니다. 청산은 매수청산 신호 입니다. 매도후 청산식도 별도로 부탁드립니다.