커뮤니티

문의드립니다.

프로필 이미지
아침한때비51
2018-02-26 20:27:36
181
글번호 116946
답변완료
Input : 매수가격(60.30),매도가격(60.00),당일수익틱수(100); Var : N1(0),dayPl(0),당일수익(0),Xcond(false),Tcond(false); var : T1(0),count(0); 당일수익 = PriceScale*당일수익틱수; if (sdate != sdate[1] and stime >= 80000) or (sdate == sdate[1] and stime >= 80000 and stime[1] < 80000) Then{ Tcond = true; Xcond = false; N1 = NetProfit; T1 = TotalTrades; } if MarketPosition == 0 Then count = TotalTrades-T1; Else count = TotalTrades-T1+1; if (sdate != sdate[1] and stime >= 055000) or (sdate == sdate[1] and stime >= 055000 and stime[1] < 055000) Then{ Tcond = false; if MarketPosition == 1 Then exitlong(); if MarketPosition == -1 Then ExitShort(); } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then Xcond = true; if Tcond == true and Xcond == false then{ if H < 매수가격 Then{ buy("b",AtStop,매수가격+PriceScale*1,1+count*2); } if L > 매도가격 Then{ sell("s",AtStop,매도가격-PriceScale*1,1+count*2); } } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); } 시작시간과 끝나는 시간을 빼고 싶습니다. 다른건 다 똑같고요. 제가 시간 뺄라고 해보니까 잘 안되네요. 부탁드리겠습니다. 그럼 수고하세요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-02-27 13:29:52

안녕하세요 예스스탁입니다. Input : 매수가격(60.30),매도가격(60.00),당일수익틱수(100); Var : N1(0),dayPl(0),당일수익(0),Xcond(false),Tcond(false); var : T1(0),count(0); 당일수익 = PriceScale*당일수익틱수; if bdate != bdate[1] Then{ Xcond = false; N1 = NetProfit; T1 = TotalTrades; } if MarketPosition == 0 Then count = TotalTrades-T1; Else count = TotalTrades-T1+1; daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then Xcond = true; if Xcond == false then{ if H < 매수가격 Then{ buy("b",AtStop,매수가격+PriceScale*1,1+count*2); } if L > 매도가격 Then{ sell("s",AtStop,매도가격-PriceScale*1,1+count*2); } } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); } 즐거운 하루되세요 > 아침한때비51 님이 쓴 글입니다. > 제목 : 문의드립니다. > Input : 매수가격(60.30),매도가격(60.00),당일수익틱수(100); Var : N1(0),dayPl(0),당일수익(0),Xcond(false),Tcond(false); var : T1(0),count(0); 당일수익 = PriceScale*당일수익틱수; if (sdate != sdate[1] and stime >= 80000) or (sdate == sdate[1] and stime >= 80000 and stime[1] < 80000) Then{ Tcond = true; Xcond = false; N1 = NetProfit; T1 = TotalTrades; } if MarketPosition == 0 Then count = TotalTrades-T1; Else count = TotalTrades-T1+1; if (sdate != sdate[1] and stime >= 055000) or (sdate == sdate[1] and stime >= 055000 and stime[1] < 055000) Then{ Tcond = false; if MarketPosition == 1 Then exitlong(); if MarketPosition == -1 Then ExitShort(); } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then Xcond = true; if Tcond == true and Xcond == false then{ if H < 매수가격 Then{ buy("b",AtStop,매수가격+PriceScale*1,1+count*2); } if L > 매도가격 Then{ sell("s",AtStop,매도가격-PriceScale*1,1+count*2); } } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); } 시작시간과 끝나는 시간을 빼고 싶습니다. 다른건 다 똑같고요. 제가 시간 뺄라고 해보니까 잘 안되네요. 부탁드리겠습니다. 그럼 수고하세요.