I am encountering strategy disabling on the remote PC.
It happens after several trades.
Here what I see in log:
02/18/2020 09:05:26.322 NinjaScript Custom log: try-catch triggered: error message: Object reference not set to an instance of an object.
02/18/2020 09:05:26.302 Position Instrument='ES 03-20' Account='U2863734' Average price=0 Quantity=0 Market position=Long Operation=Remove
02/18/2020 09:05:26.276 Order Order='105028328/U2863734' Name='shrt_sl_5' New state='Accepted' Instrument='ES 03-20' Action='Buy' Limit price=0 Stop price=3392.75 Quantity=1 Type='Stop Market' Time in force=GTC Oco='5February 18, 2020_111_0.835745280532048' Filled=0 Fill price=0 Error='No error' Native error=''
02/18/2020 09:05:26.214 Order Order='a8fa79f56bf2447bb00ee9b8670ad97b/U2863734' Name='shrt_sl_5' New state='Submitted' Instrument='ES 03-20' Action='Buy' Limit price=0 Stop price=3392.75 Quantity=1 Type='Stop Market' Time in force=GTC Oco='5February 18, 2020_111_0.835745280532048' Filled=0 Fill price=0 Error='No error' Native error=''
02/18/2020 09:05:26.158 Default Disabling NinjaScript strategy 'Tester/191722611'
02/18/2020 09:05:26.146 NinjaScript Custom log: [3, ES 03-20] State.Termination
02/18/2020 09:05:26.134 NinjaScript NinjaScript strategy 'Tester/191722611' submitting order
The error shown in the very first row happened after strategy was disabled (I suppose, it something in State.Termination, when various objects may be already disposed).
The same is in logs.
Is there any way to detect the reason why strategy becomes disabled?
Can I do something to distinguish these reasons:
- manual disabling the strategy on chart;
- manual disabling the strategy in ControlCenter grid;
- disabling the strategy because of run-time errors;
- disabling the strategy because of disconnection;
- disabling of the strategy because of the wrong order price;
- ... any other cool adventures ?
Thank you.
Comment