커뮤니티

수식어 부탁드립니다

프로필 이미지
푸른
2021-03-29 12:12:58
672
글번호 147467
답변완료
input : StartTime(70000),EndTime(055500); input : N(20); var : Tcond(false); 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 { var1 = O; Tcond = true; SetStopEndofday(0); } if Tcond == true Then { if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Buy("b",AtLimit,DayOpen-20*PriceScale); if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Sell("s",AtLimit,DayOpen+3*PriceScale); } SetStopProfittarget(PriceScale*N,PointStop); SetStopLoss(PriceScale*N,PointStop); ------------------- input : N(20); 에서 N값은 Buy나 Sell의 청산값이 동일합니다. 청산 값을 각각 다르게 수식어를 넣고자 합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-03-30 10:19:03

안녕하세요 예스스탁입니다. input : StartTime(70000),EndTime(055500); input : BuyN(20),SellN(25); var : Tcond(false); 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 { var1 = O; Tcond = true; SetStopEndofday(0); } if Tcond == true Then { if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Buy("b",AtLimit,DayOpen-20*PriceScale); if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Sell("s",AtLimit,DayOpen+3*PriceScale); } if MarketPosition == 1 Then { SetStopProfittarget(PriceScale*BuyN,PointStop); SetStopLoss(PriceScale*BuyN,PointStop); } Else if MarketPosition == -1 Then { SetStopProfittarget(PriceScale*SellN,PointStop); SetStopLoss(PriceScale*SellN,PointStop); } Else { SetStopProfittarget(0); SetStopLoss(0); } 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식어 부탁드립니다 > input : StartTime(70000),EndTime(055500); input : N(20); var : Tcond(false); 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 { var1 = O; Tcond = true; SetStopEndofday(0); } if Tcond == true Then { if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Buy("b",AtLimit,DayOpen-20*PriceScale); if MarketPosition <= 0 and L >= DayOpen-50*PriceScale Then Sell("s",AtLimit,DayOpen+3*PriceScale); } SetStopProfittarget(PriceScale*N,PointStop); SetStopLoss(PriceScale*N,PointStop); ------------------- input : N(20); 에서 N값은 Buy나 Sell의 청산값이 동일합니다. 청산 값을 각각 다르게 수식어를 넣고자 합니다.