I have been focusing on strategies using unmanaged orders, so far I can successfully submit and create TP's and SL's via OnOrderUpdate. So far so good.
However I would like to know how to swap an order when the conditions are reversed. So for instance a moving average crossover.
The managed approach does it for me and can only have 1 direction per trade.
So how would I exit an unmanaged position? for example I have
if (Position.MarketPosition == MarketPosition.Flat && longLimitEntry == null) { longLimitEntry = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, OrderQuantity, [COLOR=#252C2F]Low[0] - (10 * TickSize)),[/COLOR] 0, ocoString, "longLimitEntry"); }
is it as simple as submitting another "SubmitOrderUnmanaged for OrderAction.Sell, OrderType.Market"?
Thanks for your help.
Comment