I have a strategy that has been working well for months and now is crashing on an Unhandled exception every time its submits a stop order. The Error its getting that causes the crash is,
2021-09-23 18:01:00:308|1|16|NinjaScript strategy ************* Strategy/243828464' submitting order 2021-09-23 18:01:00:332|1|32|Order='846b3a2b1b454f908e25896e4 eb12232/********************' Name='StopLossLong' New state='Submitted' Instrument='ES 12-21' Action='Sell' Limit price=0 Stop price=4438 Quantity=1 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error='' 2021-09-23 18:01:00:347|1|32|Order='1226044234/DionPouncilOUP3620210922001' Name='StopLossLong' New state='Accepted' Instrument='ES 12-21' Action='Sell' Limit price=0 Stop price=4438 Quantity=1 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error='' 2021-09-23 18:01:00:557|1|16|Error occured when sending the data to Signal System An error occurred while sending the request. 2021-09-23 18:01:00:560|0|4|Unhandled exception: An error occurred while sending the request..
If you look at the trace file the error is
2021-09-23 18:01:00:347 (DP321) Cbi.Account.OrderUpdateCallback: realOrderState=Accepted oldOrderId='846b3a2b1b454f908e25896e4eb12232' orderId='1226044234' account='Account#****' name='StopLossLong' orderState=Accepted instrument='ES 12-21' orderAction=Sell limitPrice=0 stopPrice=4438 quantity=1 orderType='Stop Market' filled=0 averageFillPrice=0 time='2021-09-23 18:01:00' statementDate='2021-09-23' error=NoError comment='' nr=-1 2021-09-23 18:01:00:559 *************** unhandled exception trapped *************** 2021-09-23 18:01:00:559 An error occurred while sending the request. 2021-09-23 18:01:00:559 The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. 2021-09-23 18:01:00:560 System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationExcep tion: The remote certificate is invalid according to the validation procedure.
Comment