커뮤니티

안녕하세요

프로필 이미지
수원
2017-12-16 10:14:32
162
글번호 115040
답변완료
매수 5이평이 20이평골드크로스 2계약진입 매수청산 1계약은 30 틱익절청산후 1게약은 60수익청산하되 60틱수익이안오고 매수가+10틱까지내려오면 강제청산 매도 5이평이 20 이평데드크로스 2게약진입 매도청산 1계약은 30 틱익절청산후 1게약은 60수익청산하되 60틱수익이안오고 매도가+10틱까지올라오면 강제청산 손절 30틱 매매시간 오전 10시부터 오후3시까지 매매회수 5 회 당일손실 50틱, 당일수익50틱 이면 매매정지 부탁드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-12-18 15:15:33

안녕하세요 예스스탁입니다. Input : 당일수익틱수(80),당일손실틱수(80); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false),Tcond(false); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if stime == 100000 or (stime > 100000 and stime[1] < 100000) Then{ Tcond = true; Xcond = false; N1 = NetProfit; } if stime == 150000 or (stime > 150000 and stime[1] < 150000) 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("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; var1 = ma(c,5); var2 = ma(c,20); if Tcond == true and Xcond == false and crossup(var1,var2) Then buy("b",OnClose,def,2); if Tcond == true and Xcond == false and CrossDown(var1,var2) Then sell("s",OnClose,def,2); if MarketPosition == 1 then { if CurrentContracts == MaxContracts then ExitLong("bp1",AtLimit,EntryPrice+PriceScale*30,"",1,1); Else { ExitLong("bp2",AtLimit,EntryPrice+PriceScale*60); ExitLong("bx",AtStop,EntryPrice+PriceScale*10); } } if MarketPosition == 1 then{ if CurrentContracts == MaxContracts then ExitShort("sp1",AtLimit,EntryPrice-PriceScale*30,"",1,1); Else { ExitShort("sp2",AtLimit,EntryPrice-PriceScale*60,"",1,1); ExitShort("sx",AtStop,EntryPrice-PriceScale*10); } } SetStopLoss(PriceScale*30,PointStop); if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } 즐거운 하루되세요 > 수원 님이 쓴 글입니다. > 제목 : 안녕하세요 > 매수 5이평이 20이평골드크로스 2계약진입 매수청산 1계약은 30 틱익절청산후 1게약은 60수익청산하되 60틱수익이안오고 매수가+10틱까지내려오면 강제청산 매도 5이평이 20 이평데드크로스 2게약진입 매도청산 1계약은 30 틱익절청산후 1게약은 60수익청산하되 60틱수익이안오고 매도가+10틱까지올라오면 강제청산 손절 30틱 매매시간 오전 10시부터 오후3시까지 매매회수 5 회 당일손실 50틱, 당일수익50틱 이면 매매정지 부탁드립니다