I have the following problem:
I send 1.000 contracts in a limit buy order by:
entryOrder = EnterLongLimit(0, true, 1000, 2450, "*- Long 01-*");
When is filled into the OnExecution method, I send a bracket order: profit + stop by;
stopOrder = ExitLongStop( 0, true, execution.Order.Filled, execution.Order.LimitPrice - sizeStop, execution.Order.Name + " StopSec", execution.Order.Name ); profitOrder = ExitLongLimit(0, true, execution.Order.Filled, execution.Order.LimitPrice + sizeProfit, execution.Order.Name + " ProfitSec", execution.Order.Name );
one StopOrder for 1000 contracts and one ProfitOrder for 1000 contracts.
Well, if the price rises and the profit order is partially filled (eg. 250 contracts) the stop order is completely cancelled.
I am using "PerEntryExecution". Why doesn't work correctly ?
Thanks

).
Comment