커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-09-05 04:13:31
733
글번호 172135
답변완료
input : StartTime(210000),EndTime(50000),진입횟수(100); input : 익절틱수(150),손절틱수(60); Inputs: Length(1), Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); 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; entry = 0; 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 (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Mom = C- C[Length]; if Tcond == true and entry < 진입횟수 Then { If Mom > 0 AND Mom >= Mom[1] AND MarketPosition() <> 1 Then Buy ("Mom_LE", AtStop, High + Pval); If Mom < 0 AND Mom <= Mom[1] AND MarketPosition() <> -1 Then ExitLong ("Mom_SE", AtStop, Low - Pval); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ----------------- 당일 목표수익 200틱, 손절 100틱에 매매정지로 변경하고자 합니다. 늘 감사드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-09-05 10:22:16

안녕하세요 예스스탁입니다. input : StartTime(210000),EndTime(50000),진입횟수(100); input : 익절틱수(150),손절틱수(60); Input : 당일수익틱수(200),당일손실틱수(100); Inputs: Length(1), Pval(0.01); 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; entry = 0; Xcond = false; N1 = NetProfit; 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; } 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true ) then Xcond = true; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Mom = C- C[Length]; if Xcond == false and Tcond == true and entry < 진입횟수 Then { If Mom > 0 AND Mom >= Mom[1] AND MarketPosition() <> 1 Then Buy ("Mom_LE", AtStop, High + Pval); If Mom < 0 AND Mom <= Mom[1] AND MarketPosition() <> -1 Then ExitLong ("Mom_SE", AtStop, Low - Pval); } if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > input : StartTime(210000),EndTime(50000),진입횟수(100); input : 익절틱수(150),손절틱수(60); Inputs: Length(1), Pval(0.01); var : Tcond(False),entry(0); Variables: Mom(0); 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; entry = 0; 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 (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; Mom = C- C[Length]; if Tcond == true and entry < 진입횟수 Then { If Mom > 0 AND Mom >= Mom[1] AND MarketPosition() <> 1 Then Buy ("Mom_LE", AtStop, High + Pval); If Mom < 0 AND Mom <= Mom[1] AND MarketPosition() <> -1 Then ExitLong ("Mom_SE", AtStop, Low - Pval); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ----------------- 당일 목표수익 200틱, 손절 100틱에 매매정지로 변경하고자 합니다. 늘 감사드립니다.