• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnConnectionStatusUpdate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    OnConnectionStatusUpdate

    Two questions regarding OnConnectionStatusUpdate:

    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?


    #2
    Hello uday12,

    Thanks for your post.

    I am not aware of a way to simulate connection loss in a backtest. Perhaps others in the community might and they are of course welcome to contribute.

    Reloading all historical data will also cause your strategy to be reloaded so it would react according to how you have configured syncing options to your account, reference: https://ninjatrader.com/support/help..._positions.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jeffery8, Today, 03:57 AM
    0 responses
    2 views
    0 likes
    Last Post jeffery8  
    Started by fx.practic, Today, 03:44 AM
    0 responses
    9 views
    0 likes
    Last Post fx.practic  
    Started by pjsmith, Today, 03:28 AM
    0 responses
    2 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by pjsmith, Today, 03:26 AM
    0 responses
    2 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by wukefuha, Today, 03:20 AM
    0 responses
    1 view
    0 likes
    Last Post wukefuha  
    Working...
    X