Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 AaronKoRn, Today, 09:49 PM
    0 responses
    2 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    8 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    9 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,975 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X