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 HIstorical Data In NinjaScript

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

    Reload HIstorical Data In NinjaScript

    I am wondering if Ninja8 offers a way to programmatically refresh all data series or one specific one. This was asked back during the Ninja7 days but was not available unless one would employ an outside macro tool. Thanks in advance.

    #2
    Hello molecool,

    While there is a way to do this, it comes with some warnings as you can see in the help guide. Please use caution if you use this method as this can cause heavy load or as noted it may become recursive.



    If you have a different use from what the help guide suggests, I can also put in a feature request for a more specific option. Outside of this item, there is not necessarily a suggested way to do this programmatically.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello molecool,

      While there is a way to do this, it comes with some warnings as you can see in the help guide. Please use caution if you use this method as this can cause heavy load or as noted it may become recursive.



      If you have a different use from what the help guide suggests, I can also put in a feature request for a more specific option. Outside of this item, there is not necessarily a suggested way to do this programmatically.

      I look forward to being of further assistance.
      Thanks for that Jesse. I just wrote a quick test indicator which triggers a chart reload after 500 live price changes. The call is reached but I don't see the chart updating itself - just keeps on ticking.

      Isn't the entire chart supposed to refresh?

      Comment


        #4
        Hello molecool,

        Thank you for the reply.

        Can you provide more specifics on your test?

        Although the help guide specifically states this should only be used with OnConnectionStatusUpdate, I did a quick test myself in OnBarUpdate and see the "Loading" in the top left of the chart after calling the method. It is possible that this will not work in all use cases based on the help guide comments, can you share more details on your test and the chart/dataseries setup?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello molecool,

          Thank you for the reply.

          Can you provide more specifics on your test?

          Although the help guide specifically states this should only be used with OnConnectionStatusUpdate, I did a quick test myself in OnBarUpdate and see the "Loading" in the top left of the chart after calling the method. It is possible that this will not work in all use cases based on the help guide comments, can you share more details on your test and the chart/dataseries setup?

          I look forward to being of further assistance.
          Actually my test wasn't broken - it's that particular instance of NT8. Despite recent updates reload all chart data does not work for me when I do it via the chart menu (or the F5 key). It just does nothing. I guess this also extends to this script call.

          I copied the test to my production machine and tested it there where it worked.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by TraderBCL, Today, 04:38 AM
          2 responses
          17 views
          0 likes
          Last Post TraderBCL  
          Started by martin70, 03-24-2023, 04:58 AM
          14 responses
          106 views
          0 likes
          Last Post martin70  
          Started by Radano, 06-10-2021, 01:40 AM
          19 responses
          609 views
          0 likes
          Last Post Radano
          by Radano
           
          Started by KenneGaray, Today, 03:48 AM
          0 responses
          5 views
          0 likes
          Last Post KenneGaray  
          Started by thanajo, 05-04-2021, 02:11 AM
          4 responses
          471 views
          0 likes
          Last Post tradingnasdaqprueba  
          Working...
          X