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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    63 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    54 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Working...
    X