Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reload Script within NT8

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

    Reload Script within NT8

    Is there an automated way to Reload a ninjascript in NT 8? Instead of all the code and AHK script used in NT 7, can I just use the ReloadAllHistoricalData() to perform this once at start of RTH for the new day?

    Support for the development of custom automated trading strategies using NinjaScript.



    if (Time[0].DayOfWeek != Time[1].DayOfWeek && IsFirstTickOfBar)
    {
    ReloadAllHistoricalData()
    }

    Would this do the same thing yet be internal to NT 8 and probably more stable?

    Thanks again,

    Lee

    #2
    The ReloadAllHistorical() method was designed for only one use case, which is reloading data after a connection loss an OnConnectionStatusUpdate event.

    Calling this method else where such as OnBarUpdate, etc could run into possible scenarios where it is being called recursively as the method is ran again.

    There is not a documented way to reload NinjaScript programmatically from an indicator. The only hit I could provide would be using SendKeys to invoke F5 which would reload NinjaScript, but should be used with caution as you could run into further issues where it is called recursively. It's for this reason that reloading NinjaScript is recommended to be done through user interaction.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    630 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    566 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X