커뮤니티

수식수정

프로필 이미지
아트정
2023-01-11 12:22:18
1097
글번호 165303
답변완료
안녕하세요 늘 감사드림니다 아래식으로 해외오일 적용해 보았으나 신호 발생이 전혀 안됨니다 다시한번 검토 바랍니다 80275글입니다 Inputs : DDD(20150309), LEN(300), HL_ED(60), CC(Black); input : StartTime(80000),EndTime(65000); Input : 당일수익틱수(50); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); Vars : DBN(0), KK(0), DD(0), KK2(0), DD2(0),T(0),S(0),A(0); var : 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; IF Endtime <= starttime Then { SetStopEndofday(0); } Xcond = false; N1 = NetProfit; } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true or IsExitName("dsp",1) == true then Xcond = true; } If STime >= 080000 And STime[1] < 080000 Then Begin DBN = 0; KK = 0; DD = 0; KK2 = 0; DD2 = 0; End; DBN = DBN + 1; If STime >= 083000 And DD == 0 Then Begin Value2 = O; DD = 1; KK = DBN; End; If DBN > KK + 1 And DD == 1 Then { T = 1; S = Value2; } Else { T = -1; S = Value2; } if CrossUp(C,S) Then A = 1; if CrossDown(C,S) Then A = -1; if A == 1 and C > O Then { A = 2; } if A == -1 and C < O Then { A = -2; } if A == 2 and C > H[1] and tcond == true and xcond == true Then Buy(); if A == -2 and C < L[1] and tcond == true and Xcond == true Then Sell(); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then { ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-01-11 14:16:33

안녕하세요 예스스탁입니다. Inputs : DDD(20150309), LEN(300), HL_ED(60), CC(Black); input : StartTime(80000),EndTime(65000); Input : 당일수익틱수(50); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); Vars : DBN(0), KK(0), DD(0), KK2(0), DD2(0),T(0),S(0),A(0); var : 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; IF Endtime <= starttime Then { SetStopEndofday(0); } Xcond = false; N1 = NetProfit; } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true or IsExitName("dsp",1) == true then Xcond = true; } If STime >= 080000 And STime[1] < 080000 Then Begin DBN = 0; KK = 0; DD = 0; KK2 = 0; DD2 = 0; End; DBN = DBN + 1; If STime >= 083000 And DD == 0 Then Begin Value2 = O; DD = 1; KK = DBN; End; If DBN > KK + 1 And DD == 1 Then { T = 1; S = Value2; } Else { T = -1; S = Value2; } if CrossUp(C,S) Then A = 1; if CrossDown(C,S) Then A = -1; if A == 1 and C > O Then { A = 2; } if A == -1 and C < O Then { A = -2; } if A == 2 and C > H[1] and tcond == true and xcond == False Then Buy(); if A == -2 and C < L[1] and tcond == true and Xcond == False Then Sell(); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then { ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); } 즐거운 하루되세요 > 아트정 님이 쓴 글입니다. > 제목 : 수식수정 > 안녕하세요 늘 감사드림니다 아래식으로 해외오일 적용해 보았으나 신호 발생이 전혀 안됨니다 다시한번 검토 바랍니다 80275글입니다 Inputs : DDD(20150309), LEN(300), HL_ED(60), CC(Black); input : StartTime(80000),EndTime(65000); Input : 당일수익틱수(50); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); Vars : DBN(0), KK(0), DD(0), KK2(0), DD2(0),T(0),S(0),A(0); var : 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; IF Endtime <= starttime Then { SetStopEndofday(0); } Xcond = false; N1 = NetProfit; } 당일수익 = PriceScale*당일수익틱수; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 Then Xcond = true; if IsExitName("dbp",1) == true or IsExitName("dsp",1) == true then Xcond = true; } If STime >= 080000 And STime[1] < 080000 Then Begin DBN = 0; KK = 0; DD = 0; KK2 = 0; DD2 = 0; End; DBN = DBN + 1; If STime >= 083000 And DD == 0 Then Begin Value2 = O; DD = 1; KK = DBN; End; If DBN > KK + 1 And DD == 1 Then { T = 1; S = Value2; } Else { T = -1; S = Value2; } if CrossUp(C,S) Then A = 1; if CrossDown(C,S) Then A = -1; if A == 1 and C > O Then { A = 2; } if A == -1 and C < O Then { A = -2; } if A == 2 and C > H[1] and tcond == true and xcond == true Then Buy(); if A == -2 and C < L[1] and tcond == true and Xcond == true Then Sell(); if MarketPosition == 1 then { ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then { ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); }