I'm running a strategy that enters/updates order on the close of every bar.
Last week, I ran into an issue when it attempted to update orders during a connection lost, which resulted in the strategy disabling itself. The worst bit was that any the existing orders were not cancelled, which leaves me completely exposed.
My On Connection Lost settings under Options - Strategies - Ninjascript tab is attached.
How do I stop my strategy from submitting any order updates during a connection lost? My goal here is to let the strategy keep running, but without order updates/submission, until the connection is re-established, and then the strategy can resume.
I've read through the Help Guide, and suspect the solution might be in OnConnectionStatus(), but the documentation is really sparse here and I have no idea on how to achieve the above.
Any help is much appreciated.
Thank you.
Comment