I use
StopTargetHandling = StopTargetHandling.ByStrategyPosition;
Assuming I enter LONG with 50 contracts, then I get it on 2 executions 17 and 33, now I have this code
if (PositionAccount.Quantity == 50) // I try here to prevent setting any TP or SL unless I fully execute my entire quantity { SetProfitTarget(CalculationMode.Ticks, ProfitTargetLevel, true); SetStopLoss(CalculationMode.Ticks, (Convert.ToInt32(StopLossLevel/TickSize))); }
Usually the system is setting only 1 TP and SL for the entire open position no ?
how to solve this problem, it happens ONLY when I have partial fills
Thank you
Comment