커뮤니티

부탁 합니다

프로필 이미지
마도로스77
2017-04-27 22:51:13
99
글번호 109239
답변완료
문의드립니다 다음수식에 첨부 하고 싶은게 있습니다 *진입후 2시간후에도 20틱 이상 수익권 아닐때 손실권에서는 스탑으로 대응하고 본청오면 청산 수익권에서는 아무구간 수익청산 *진입봉기분 200봉이 지나도 20틱 이상 수익권 아닐때 손실권에서는 스탑으로 대응하고 본청오면 청산 수익권에서는 아무구간 수익청산 부탁 드립니다 ------------------------------------------------------- Input : Period(12), sigPeriod(9); Input : short(12), long(26), Sig(9); var : T1(0),entry(0); if bdate != bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; value1 = TRIX(Period); value2 = ema(value1, sigPeriod); if crossup(value1,0) Then buy(); if CrossDown(value1,0) Then sell(); if MarketPosition == 1 and entry >= 2 Then exitlong("bx",AtStop,highest(H,20)-PriceScale*5); if MarketPosition == -1 and entry >= 2 Then ExitShort("sx",AtStop,Lowest(L,20)+PriceScale*5); SetStopProfittarget(PercentProfit*20,PointStop); SetStopLoss(PriceScale*30,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-28 13:28:50

안녕하세요 예스스탁입니다. 1. Input : Period(12), sigPeriod(9); Input : short(12), long(26), Sig(9); var : T1(0),entry(0),S1(0),D1(0),TM(0),EM(0); if bdate != bdate[1] Then{ T1 = TotalTrades; S1 = TimeToMinutes(stime); D1 = sdate; } if D1 > 0 then{ if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; value1 = TRIX(Period); value2 = ema(value1, sigPeriod); if crossup(value1,0) Then buy(); if CrossDown(value1,0) Then sell(); if MarketPosition == 1 then if CurrentContracts > CurrentContracts[1] Then EM = TM; if entry >= 2 Then{ exitlong("bx1",AtStop,highest(H,20)-PriceScale*5); #진입 후 120분 이후에 종가가 진입가이상이면 청산 if TM >= EM+120 and C >= EntryPrice Then exitlong("bx2"); } if MarketPosition == -1 Then if CurrentContracts > CurrentContracts[1] Then EM = TM; if entry >= 2 Then{ ExitShort("sx1",AtStop,Lowest(L,20)+PriceScale*5); #진입 후 120분 이후에 종가가 진입가 이하이면 청산 if TM >= EM+120 and C <= EntryPrice Then ExitShort("sx2"); } SetStopProfittarget(PercentProfit*20,PointStop); SetStopLoss(PriceScale*30,PointStop); 2 Input : Period(12), sigPeriod(9); Input : short(12), long(26), Sig(9); var : T1(0),entry(0); if bdate != bdate[1] Then{ T1 = TotalTrades; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; value1 = TRIX(Period); value2 = ema(value1, sigPeriod); if crossup(value1,0) Then buy(); if CrossDown(value1,0) Then sell(); if MarketPosition == 1 then if entry >= 2 Then{ exitlong("bx1",AtStop,highest(H,20)-PriceScale*5); #진입 후 200봉 후에 종가가 진입가이상이면 청산 if BarsSinceEntry >= 200 and C >= EntryPrice Then exitlong("bx2"); } if MarketPosition == -1 Then if entry >= 2 Then{ ExitShort("sx1",AtStop,Lowest(L,20)+PriceScale*5); #진입 후 200봉 후에 종가가 진입가 이하이면 청산 if BarsSinceEntry >= 200 and C <= EntryPrice Then ExitShort("sx2"); } SetStopProfittarget(PercentProfit*20,PointStop); SetStopLoss(PriceScale*30,PointStop); 즐거운 하루되세요 > 마도로스77 님이 쓴 글입니다. > 제목 : 부탁 합니다 > 문의드립니다 다음수식에 첨부 하고 싶은게 있습니다 *진입후 2시간후에도 20틱 이상 수익권 아닐때 손실권에서는 스탑으로 대응하고 본청오면 청산 수익권에서는 아무구간 수익청산 *진입봉기분 200봉이 지나도 20틱 이상 수익권 아닐때 손실권에서는 스탑으로 대응하고 본청오면 청산 수익권에서는 아무구간 수익청산 부탁 드립니다 ------------------------------------------------------- Input : Period(12), sigPeriod(9); Input : short(12), long(26), Sig(9); var : T1(0),entry(0); if bdate != bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; value1 = TRIX(Period); value2 = ema(value1, sigPeriod); if crossup(value1,0) Then buy(); if CrossDown(value1,0) Then sell(); if MarketPosition == 1 and entry >= 2 Then exitlong("bx",AtStop,highest(H,20)-PriceScale*5); if MarketPosition == -1 and entry >= 2 Then ExitShort("sx",AtStop,Lowest(L,20)+PriceScale*5); SetStopProfittarget(PercentProfit*20,PointStop); SetStopLoss(PriceScale*30,PointStop);