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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    67 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    149 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    99 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    286 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X