Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to update chart after modifying indicator code

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

    How to update chart after modifying indicator code

    is there a way to update the chart after modifying the indicator code?
    The only way I found was to delete the indicator and add it again.
    I've tried "Reloading Ninjascript" and "Reload all historical data" and neither one updates the chart with modified indicator
    is there another way?
    Kevin.

    #2
    Welcome to the forums!

    What does your indicator do?

    I use 'Reload NinjaScript' and it works for me.

    [It doesn't work in all cases, that's why I'm
    wondering what your indicator does.]

    Comment


      #3
      It seems to me that the circumstances in which "Reload NinjaScript" would not be enough include these: (1) You have modified a bar type or chart style which will not be recognized until the platform is restarted, (2) You have several charts communicating e.g. sending information via global variables or something like that, and the other charts are still running in the old epoch before recompile, (3) Possibly an add-on was modified that needs a restart to be recognized. Are there others?

      The simple case, which consists of only the indicators and strategies running on one chart, and not involving any modified custom bar types, chart styles, or add-ons, should always work with just "Reload NinjaScript" on that chart.
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        Hi Bruce,

        Thanks for your reply.
        Rookie mistake, it's working now, don't know what I was doing wrong.
        I'm used to Thinkscript on TOS and trying to get a feel for Ninjascript. TOS is running out of juice for what I'm trying to do.

        Regards,
        Kevin.

        Comment


          #5
          Another reason to not use F5/script reloading is if the modified code added or removed plots. This confuses the script and your plot colors/styles can be buggered up.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Yes, good point. If you have added or removed plots that are added in State.SetDefaults (not in State.Configure) you may be best off to remove the indicator from your charts and re-add it after you recompile. It is even possible to end up with a saved workspace where the plots are all wrong, so removing and re-adding it is best - that gives it a chance to set all the defaults correctly so you have a starting point that makes sense. Sometimes, if enough things have been changed, I'll go so far as to rename the indicator so that when end users reload their workspace it won't load the old one and they'll have to re-add it, if it's been judged that the tech support headaches from them reloading the old one with the wrong plots outweighs the inconvenience of everyone having to add it again.
            Bruce DeVault
            QuantKey Trading Vendor Services
            NinjaTrader Ecosystem Vendor - QuantKey

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            573 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X