I've got a strategy using unmanaged orders with SetStopLoss & SetProfitTarget. I want to enter a limit order only if there are no other limit or active orders. My code is this:
if (my condition exists && entryOrder==null) entryOrder = EnterLongLimit(....)
The issue is that my strategy only executes once. I'm guessing if my stop loss or profit target are hit, entryOrder does not automatically get set back to null. How can i either set it back to null myself, or simply check there are no active or limit orders present before executing my trade?
Newbie question I'm sure, but i've scoured the manual and search the forums. Still scratching my head.
Thanks.
Comment