Then in OnExecutionUpdate I reverse from long to flat by doubling the number of contracts.
In OnBarUpdate I adjust the opposing GTC entry order to follow the market, which eventually gets hit, with another opposing order placed etc. This works OK. When reviewing the trade history, historical trades are correctly categorized as long and short trades, when transitioning into real-time, all subsequent real-time trades are either long or short, not a mix.
Do I need to split the reversal order into two orders, i.e. for a long position of 2 contracts, place both OrderType.StopMarket Order.Sell of 2 and OrderType.StopMarket Order.SellShort of 2 at the same Stop Price as opposed to a single OrderType.StopMarket Order.SellShort 4 in order to get the trades properly categorized in real-time or is there something else I can do?

Comment