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 DavidHP, Today, 07:56 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by kujista, Today, 06:23 AM
    3 responses
    8 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Mindset, Yesterday, 02:04 AM
    2 responses
    18 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by f.saeidi, Today, 08:03 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by samish18, 04-17-2024, 08:57 AM
    15 responses
    53 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X