I'm facing a problem that is really breaking the entire logic behind my strategy, I noticed that when I send mid-size orders, like 15 or 30 contracts in quantity, the order is executed or multiple "Partial Fills", let's say 2 or 3, it this happens, then I get 2 or 3 "Profit target" and "Stop loss" orders that are having the same name ("Profit target" and "Stop loss") but they are having different order IDs.
but according to my strategy, I Set the TP and SL only 1 time, and I made sure that it verifies the condition only 1 time, why do I get multiple profit targets ?
for me if i send an order of 15 contracts and it got filled on 3 times, I want ONLY 1 TP and 1 SL orders with total executed after fully filled.
This is the code I'm using :
if (myProfitOrder == null) { ProfitTargetLevel = Convert.ToInt32(TargetProfitLevel/TickSize); SetProfitTarget(CalculationMode.Ticks, ProfitTargetLevel); } if (myStopLossOrder == null) { StopLossLevel = Convert.ToInt32((ChosenATR+1)/TickSize); SetStopLoss(CalculationMode.Ticks, StopLossLevel); }
Comment