• 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 chazyang, Today, 02:01 AM
    1 response
    3 views
    0 likes
    Last Post chazyang  
    Started by tonynt, Today, 01:20 AM
    0 responses
    13 views
    0 likes
    Last Post tonynt
    by tonynt
     
    Started by sdauteuil, Yesterday, 11:02 PM
    1 response
    3 views
    0 likes
    Last Post sdauteuil  
    Started by Jschmelz, Yesterday, 04:45 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by sisenberg, Yesterday, 08:06 PM
    1 response
    11 views
    0 likes
    Last Post sisenberg  
    Working...
    X