I've used several of the sample order management strategies from the forum to build my strategy, and I'm keeping a local copy of the stop loss order.
i.e.
private Order stopOrder = null; // This variable holds an object representing our stop loss order.
I want to write a separate method to check for a stop loss order when the position is not flat. The method will go beyond me just keeping a copy of the most recent stop order. It will be able to make sure there is a stop loss order even if the strategy's stopOrder object is null for some reason. Basically I want 100% insurance that I will always have a stop order in place if the instrument's position is active.
My assumption is that I will have to enumerate something in the Account object.
Thank you!
Comment