커뮤니티

안녕하세요

프로필 이미지
수원
2018-03-21 12:04:53
156
글번호 117568
답변완료
매매시간 10시40분부터 11시40분 매매횟수 5회로제한하고 총손실-100틱이거나 총수익+100틱이면 매매정지 매수조건 10 이평선이 40 이평선 골드크로스 하면 2계약진입하고 익절 한계약은 +30틱에서 청산 나머지1계약은 +60틱청산 손절 -30틱 매도조건 10 이평선이 40 이평선 데드크로스 하면 2계약진입하고 익절 한계약은 +30틱에서 청산 나머지1계약은 +60틱청산 손절 -30틱 부탁드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-03-22 10:45:53

안녕하세요 예스스탁입니다. Input : 당일수익틱수(100),당일손실틱수(100),당일진입횟수(5); Var : N1(0),dayPl(0),당일수익(0),당일손실(0),Xcond(false); var : Tcond(false),T1(0),count(0); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if (sdate != sdate[1] and stime >= 104000) or (sdate == sdate[1] and stime >= 104000 and stime[1] < 104000) Then { Tcond = true; Xcond = false; N1 = NetProfit; T1 = TotalTrades; } if (sdate != sdate[1] and stime >= 114000) or (sdate == sdate[1] and stime >= 114000 and stime[1] < 114000) Then { Tcond = false; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 then ExitShort(); } daypl = NetProfit-N1; if MarketPosition == 0 Then count = TotalTrades-T1; Else count = TotalTrades-T1+1; 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,10); var2 = ma(C,20); if Tcond == true and Xcond == false and count < 당일진입횟수 then{ if crossup(var1,var2) Then buy("b",OnClose,def,2); if CrossDown(var1,var2) Then sell("s",OnClose,def,2); if MarketPosition == 1 then{ ExitLong("bp1",atlimit,EntryPrice+PriceScale*30,"",1,1); ExitLong("bp2",atlimit,EntryPrice+PriceScale*60,"",1,1); ExitLong("bl",AtStop,EntryPrice-PriceScale*30); ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("sp1",atlimit,EntryPrice-PriceScale*30,"",1,1); ExitShort("sp2",atlimit,EntryPrice-PriceScale*60,"",1,1); ExitShort("sl",AtStop,EntryPrice+PriceScale*30); ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } } 즐거운 하루되세요 > 수원 님이 쓴 글입니다. > 제목 : 안녕하세요 > 매매시간 10시40분부터 11시40분 매매횟수 5회로제한하고 총손실-100틱이거나 총수익+100틱이면 매매정지 매수조건 10 이평선이 40 이평선 골드크로스 하면 2계약진입하고 익절 한계약은 +30틱에서 청산 나머지1계약은 +60틱청산 손절 -30틱 매도조건 10 이평선이 40 이평선 데드크로스 하면 2계약진입하고 익절 한계약은 +30틱에서 청산 나머지1계약은 +60틱청산 손절 -30틱 부탁드립니다