커뮤니티

궁금한점이 있어 요청드립니다.

프로필 이미지
맴맴잉
2021-04-08 10:51:20
799
글번호 147806
답변완료
항상 수고가 많으십니다. 예전에 시스템식을 요청드린적이 있는데 아래 시스템식에서 추가되어야 할 부분이 있어 요청을 드리게 되었습니다. 아래의 식에서 매수 진입해서 익절청산하고 11시 50분 되기전까지 재진입하는걸로 되어있는데.. 진입 횟수를 제안할수 있을까요?? 예를 들면 2번까지만 진입하구 3번째는 진입 안하기.. 이렇게요?? 매번 요청을 드려 항상 감사드립니다. ---------------------------------------------------------------------------- var : entry(0),AP(0),TT(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 and Dayopen(0) >= DayClose(1)*1.005 Then { if entry == 0 or (entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Bp1",1) == true) Then Buy("b1",AtLimit,DayOpen*0.97); } if Dayopen(0) >= DayClose(1)*1.005 and ( (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b1") == true) or (MarketPosition == 0 and entry >= 1 and IsExitName("Bp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06))) Then Buy("b2",AtLimit,DayOpen*0.94); if Dayopen(0) >= DayClose(1)*1.005 and ((MarketPosition == 1 and MaxEntries == 2 and IsEntryName("b1") == true) or (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true)) Then Buy("b3",AtLimit,DayOpen*0.91); if MarketPosition == 1 Then { AP = AvgEntryPrice; if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); if MaxEntries == 1 and IsEntryName("b1") == true Then { ExitLong("bp1",AtLimit,AP*1.02); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx1"); } if (MaxEntries == 2 and IsEntryName("b1") == true) or (MaxEntries == 1 and IsEntryName("b2") == true) Then { ExitLong("bp2",AtLimit,AP*1.01); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx2"); } if (MaxEntries == 3 and IsEntryName("b1") == true) or (MaxEntries == 2 and IsEntryName("b2") == true) Then { ExitLong("bp3",AtLimit,AP*1.005); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx3"); } ExitLong("bl",AtStop,DayOpen*0.88); } SetStopEndofday(151800);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-04-08 15:50:36

안녕하세요 예스스탁입니다. 진입횟수 지정하실 수 있게 외부변수 처리해 드립니다. input : 진입횟수(2); var : entry(0),AP(0),TT(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 and Dayopen(0) >= DayClose(1)*1.005 Then { if entry == 0 or (entry >= 1 and entry < 진입횟수 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Bp1",1) == true) Then Buy("b1",AtLimit,DayOpen*0.97); } if Dayopen(0) >= DayClose(1)*1.005 and ( (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b1") == true) or (MarketPosition == 0 and entry >= 1 and entry < 진입횟수 and IsExitName("Bp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06))) Then Buy("b2",AtLimit,DayOpen*0.94); if Dayopen(0) >= DayClose(1)*1.005 and ((MarketPosition == 1 and MaxEntries == 2 and IsEntryName("b1") == true) or (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true)) Then Buy("b3",AtLimit,DayOpen*0.91); if MarketPosition == 1 Then { AP = AvgEntryPrice; if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); if MaxEntries == 1 and IsEntryName("b1") == true Then { ExitLong("bp1",AtLimit,AP*1.02); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx1"); } if (MaxEntries == 2 and IsEntryName("b1") == true) or (MaxEntries == 1 and IsEntryName("b2") == true) Then { ExitLong("bp2",AtLimit,AP*1.01); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx2"); } if (MaxEntries == 3 and IsEntryName("b1") == true) or (MaxEntries == 2 and IsEntryName("b2") == true) Then { ExitLong("bp3",AtLimit,AP*1.005); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx3"); } ExitLong("bl",AtStop,DayOpen*0.88); } SetStopEndofday(151800); 즐거운 하루되세요 > 맴맴잉 님이 쓴 글입니다. > 제목 : 궁금한점이 있어 요청드립니다. > 항상 수고가 많으십니다. 예전에 시스템식을 요청드린적이 있는데 아래 시스템식에서 추가되어야 할 부분이 있어 요청을 드리게 되었습니다. 아래의 식에서 매수 진입해서 익절청산하고 11시 50분 되기전까지 재진입하는걸로 되어있는데.. 진입 횟수를 제안할수 있을까요?? 예를 들면 2번까지만 진입하구 3번째는 진입 안하기.. 이렇게요?? 매번 요청을 드려 항상 감사드립니다. ---------------------------------------------------------------------------- var : entry(0),AP(0),TT(0); if Bdate != Bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if MarketPosition == 0 and Dayopen(0) >= DayClose(1)*1.005 Then { if entry == 0 or (entry >= 1 and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06) and IsExitName("Bp1",1) == true) Then Buy("b1",AtLimit,DayOpen*0.97); } if Dayopen(0) >= DayClose(1)*1.005 and ( (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b1") == true) or (MarketPosition == 0 and entry >= 1 and IsExitName("Bp2",1) == true and (sTime < 115000 or Highest(H,BarsSinceExit(1)) < AP*1.06))) Then Buy("b2",AtLimit,DayOpen*0.94); if Dayopen(0) >= DayClose(1)*1.005 and ((MarketPosition == 1 and MaxEntries == 2 and IsEntryName("b1") == true) or (MarketPosition == 1 and MaxEntries == 1 and IsEntryName("b2") == true)) Then Buy("b3",AtLimit,DayOpen*0.91); if MarketPosition == 1 Then { AP = AvgEntryPrice; if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); if MaxEntries == 1 and IsEntryName("b1") == true Then { ExitLong("bp1",AtLimit,AP*1.02); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx1"); } if (MaxEntries == 2 and IsEntryName("b1") == true) or (MaxEntries == 1 and IsEntryName("b2") == true) Then { ExitLong("bp2",AtLimit,AP*1.01); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx2"); } if (MaxEntries == 3 and IsEntryName("b1") == true) or (MaxEntries == 2 and IsEntryName("b2") == true) Then { ExitLong("bp3",AtLimit,AP*1.005); if TimeToMinutes(sTime) >= TimeToMinutes(TT)+60 Then ExitLong("bx3"); } ExitLong("bl",AtStop,DayOpen*0.88); } SetStopEndofday(151800);