• 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 ketotop7, Today, 03:58 AM
    0 responses
    2 views
    0 likes
    Last Post ketotop7  
    Started by Radiant0, Today, 03:55 AM
    0 responses
    1 view
    0 likes
    Last Post Radiant0  
    Started by pstrusi, Today, 02:21 AM
    0 responses
    4 views
    0 likes
    Last Post pstrusi
    by pstrusi
     
    Started by indy73, Yesterday, 10:52 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by priceisking, 05-13-2019, 08:30 AM
    6 responses
    39 views
    0 likes
    Last Post Harry
    by Harry
     
    Working...
    X