1. On live trading SetStopLoss() blocks all ExitLong() and ExitShort() calls which return null. Why? The Exit calls work fine in backtest mode.
2. I could understand (1) if this was related to the need to cancel the stop order before submitting the exit. So to this end I tried using OnOrderUpdate() to capture the order id generated by SetStopLoss() only to find that OnOrderUpdate() is never called when the stop loss order is created or amended, only when/if it gets filled. Isn't the point of OnOrderUpdate() to see all updates to live orders?
So why is this happening and what should I use instead? I just want to set a software intrabar stop and exit/take profits using market orders on firsttickofbar.
Thanks
Comment