1. In backtest (historic state), is there a way to simulate / reproduce a connection loss and re-connect ?
2. Within the OnConnectionStatusUpdate, suppose I use ReloadAllHistoricalData() as follows:
protected override void OnConnectionStatusUpdate(ConnectionStatusEventArgs connectionStatusUpdate)
{
if (connectionStatusUpdate.Status == ConnectionStatus.ConnectionLost)
{
IsReloadAllHistoricalDataNeeded = true;
}
else if (IsReloadAllHistoricalDataNeeded && connectionStatusUpdate.Status == ConnectionStatus.Connected)
{
ReloadAllHistoricalData();
IsReloadAllHistoricalDataNeeded = false;
}
}
Would NT also buy / sell positions to bring the strategy's positions to be in line with the expected strategy positions as if there was no connection loss?
Comment