커뮤니티

수식작성

프로필 이미지
푸른
2021-05-06 07:11:51
1193
글번호 148693
답변완료

첨부 이미지

input : StartTime(103000),EndTime(213000); input : 익절틱수(70),손절틱수(20); Input : 당일수익틱수(120); Var : N1(0),dayPl(0),당일수익(0),Xcond(false); var : T(0),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; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true then Xcond = true; } var1 = ma(C,5); if C > O or (C == O and C >= C[1]) Then T = 1; Else T = -1; if Tcond == true Then { if MarketPosition == 0 and C > O and CountIf(T == 1,9) >= 5 and C > var1 Then Buy("b"); if MarketPosition == 1 and C < O and CountIf(T == -1,9) >= 5 and C < var1 Then ExitLong("bx"); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 1-2 input : StartTime(220000),EndTime(035000); input : 익절틱수(70),손절틱수(20); Input : 당일수익틱수(120); Var : N1(0),dayPl(0),당일수익(0),Xcond(false); var : T(0),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; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true then Xcond = true; } var1 = ma(C,5); if C > O or (C == O and C >= C[1]) Then T = 1; Else T = -1; if Tcond == true Then { if MarketPosition == 0 and C > O and CountIf(T == 1,9) >= 5 and C > var1 Then Buy("b"); if MarketPosition == 1 and C < O and CountIf(T == -1,9) >= 5 and C < var1 Then ExitLong("bx"); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------------------- True Strength Index 지표의 +30.5 ~-30.5 사이 진입신호금지 수식어의 추가와 매매시간을 10시부터 익일 05시까지로 수정을 부탁드립니다. 늘 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-05-06 11:44:30

안녕하세요 예스스탁입니다. 1 input : StartTime(100000),EndTime(050000); input : 익절틱수(70),손절틱수(20); Input : 당일수익틱수(120); INPUTS: R(4), S(8), U(6); Var : N1(0),dayPl(0),당일수익(0),Xcond(false); var : T(0),Tcond(false); var : Truestrength(0); Truestrength = TSI(C, R, S, U); 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; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true then Xcond = true; } var1 = ma(C,5); if C > O or (C == O and C >= C[1]) Then T = 1; Else T = -1; if Tcond == true Then { if MarketPosition == 0 and C > O and CountIf(T == 1,9) >= 5 and C > var1 and (Truestrength >= 30.5 or Truestrength < -30.5) Then Buy("b"); if MarketPosition == 1 and C < O and CountIf(T == -1,9) >= 5 and C < var1 Then ExitLong("bx"); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 2 input : 금액(10000000); var : Q(0),Q2(0); Q = Accum(iff(o<c,c*v,0))-Accum(iff(o>c,c*v,0)); if sdate != sDate[1] Then Q2 = Q[1]; if Q - Q2>금액 and C > Highest(H,20)[1] Then Find(1); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 수식작성 > input : StartTime(103000),EndTime(213000); input : 익절틱수(70),손절틱수(20); Input : 당일수익틱수(120); Var : N1(0),dayPl(0),당일수익(0),Xcond(false); var : T(0),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; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true then Xcond = true; } var1 = ma(C,5); if C > O or (C == O and C >= C[1]) Then T = 1; Else T = -1; if Tcond == true Then { if MarketPosition == 0 and C > O and CountIf(T == 1,9) >= 5 and C > var1 Then Buy("b"); if MarketPosition == 1 and C < O and CountIf(T == -1,9) >= 5 and C < var1 Then ExitLong("bx"); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 1-2 input : StartTime(220000),EndTime(035000); input : 익절틱수(70),손절틱수(20); Input : 당일수익틱수(120); Var : N1(0),dayPl(0),당일수익(0),Xcond(false); var : T(0),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; Xcond = false; N1 = NetProfit; IF Endtime <= starttime Then { SetStopEndofday(0); } } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true then Xcond = true; } var1 = ma(C,5); if C > O or (C == O and C >= C[1]) Then T = 1; Else T = -1; if Tcond == true Then { if MarketPosition == 0 and C > O and CountIf(T == 1,9) >= 5 and C > var1 Then Buy("b"); if MarketPosition == 1 and C < O and CountIf(T == -1,9) >= 5 and C < var1 Then ExitLong("bx"); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ---------------------- True Strength Index 지표의 +30.5 ~-30.5 사이 진입신호금지 수식어의 추가와 매매시간을 10시부터 익일 05시까지로 수정을 부탁드립니다. 늘 감사합니다.