커뮤니티

문의 드립니다.~~~~

프로필 이미지
예스요
2023-12-23 21:55:11
930
글번호 175159
답변완료
아래식으로 cme gold 선물을 온종일(8시에서 7시)거래시 11시에서 14시 사이와 20시에서 0시 사이에는 이전에 진입된 잔고에 대한 청산은 되고 새로운 신규 진입은 안되는 것으로 하려면 어떻게 해야하나요? input : ntime(60),N(4),N1(120),A1(3); input : 익절틱수(0),손절틱수(0); input : StartTime(80000),EndTime(50000); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),SumSqrt(0),Stdv(0); var : sum(0),BBmd(0),Bbup(0),BBdn(0); Array : CC[100](0); var : Tcond(false); if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; S1 = TimeToMinutes(NextBarStime); D1 = NextBarSdate; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%ntime; if NextBarSdate != sdate or (NextBarSdate == sdate and ntime > 1 and TF < TF[1]) or (NextBarSdate == sdate and ntime > 1 and TM >= TM[1]+ntime) or (NextBarSdate == sdate and ntime == 1 and TM > TM[1]) Then { var1 = NextBarOpen; } if Tcond == true and MarketPosition <= 0 Then if Bdate == Bdate[n-1] and C>O Then Buy(); if Bdate == Bdate[n-1] and C<0 Then Sell(); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(50000); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-12-26 15:27:26

안녕하세요 예스스탁입니다. input : ntime(60),N(4),N1(120),A1(3); input : 익절틱수(0),손절틱수(0); input : StartTime(80000),EndTime(50000); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),SumSqrt(0),Stdv(0); var : sum(0),BBmd(0),Bbup(0),BBdn(0); Array : CC[100](0); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(50000); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; S1 = TimeToMinutes(NextBarStime); D1 = NextBarSdate; IF Endtime <= starttime Then { SetStopEndofday(0); } } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%ntime; if NextBarSdate != sdate or (NextBarSdate == sdate and ntime > 1 and TF < TF[1]) or (NextBarSdate == sdate and ntime > 1 and TM >= TM[1]+ntime) or (NextBarSdate == sdate and ntime == 1 and TM > TM[1]) Then { var1 = NextBarOpen; } if Tcond == true Then { if MarketPosition <= 0 and Bdate == Bdate[n-1] and C>O Then { if (sTime >= 110000 and sTime <= 140000) or (sTime >= 200000) Then ExitShort(); else Buy(); } if MarketPosition >= 0 and Bdate == Bdate[n-1] and C<O Then { if (sTime >= 110000 and sTime <= 140000) or (sTime >= 200000) Then ExitLong(); Else Sell(); } } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 예스요 님이 쓴 글입니다. > 제목 : 문의 드립니다.~~~~ > 아래식으로 cme gold 선물을 온종일(8시에서 7시)거래시 11시에서 14시 사이와 20시에서 0시 사이에는 이전에 진입된 잔고에 대한 청산은 되고 새로운 신규 진입은 안되는 것으로 하려면 어떻게 해야하나요? input : ntime(60),N(4),N1(120),A1(3); input : 익절틱수(0),손절틱수(0); input : StartTime(80000),EndTime(50000); var : S1(0),D1(0),TM(0),TF(0); var : cnt(0),SumSqrt(0),Stdv(0); var : sum(0),BBmd(0),Bbup(0),BBdn(0); Array : CC[100](0); var : Tcond(false); if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; S1 = TimeToMinutes(NextBarStime); D1 = NextBarSdate; } if D1 > 0 then { if NextBarSdate == D1 Then TM = TimeToMinutes(NextBarStime)-S1; Else TM = TimeToMinutes(NextBarStime)+1440-S1; TF = TM%ntime; if NextBarSdate != sdate or (NextBarSdate == sdate and ntime > 1 and TF < TF[1]) or (NextBarSdate == sdate and ntime > 1 and TM >= TM[1]+ntime) or (NextBarSdate == sdate and ntime == 1 and TM > TM[1]) Then { var1 = NextBarOpen; } if Tcond == true and MarketPosition <= 0 Then if Bdate == Bdate[n-1] and C>O Then Buy(); if Bdate == Bdate[n-1] and C<0 Then Sell(); } IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(50000); } if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { IF Endtime <= starttime Then { SetStopEndofday(0); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);