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

Dumb question about refreshing chart after recompile

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

    Dumb question about refreshing chart after recompile

    This feels like a dumb question, but I have been looking for the answer for a couple hours now, and I'm starting to feel like I'm wasting my time so I'll ask it here.

    I'm a reasonably competent Java programmer, but I'm brand new to NT and what I can't figure out is, when I recompile the code for my indicator (F5 in the editor), how do I get the indicator to refresh those changes in the chart window? I've tried Reload NinjaScript (F5) in the chart window, and it does not show the changes I made in the code. If I add another instance of the indicator, that one will show the changes while the original instance is unchanged. Removing and re-adding the indicator (and setting the parameters) is really annoying to do every time I recompile. Am I missing something?

    #2
    Hi wheels,

    I have programmed hundreds of indicators. The way I do is:
    1. After making changes in the editor, press F5 to recompile
    2. After that, go to the chart and press F5 again to refresh the indicator


    In other words, you are doing this correctly. So no worries here.
    Still don't see the changes?

    Thanks.
    Pi
    ninZa
    NinjaTrader Ecosystem Vendor - ninZa.co

    Comment


      #3
      I suspect you are making the changes to plot visuals or public properties. These things are serialized and therefore after the indicator is attached to the chart they can only be changed via the indicator dialog.

      Please check this.
      Pi
      ninZa
      NinjaTrader Ecosystem Vendor - ninZa.co

      Comment


        #4
        Not all changes will be applied, when the chart is refreshed via F5.

        In some cases - and that comprises changes in the Initialize() section of the indicator and changes that affect the plots - it is necessary to remove the indicator from the chart and then add it again.

        Comment


          #5
          Hello Wheels,

          Harry is correct here. If you are making changes to the UI for the Indicator settings and plots you will not be able to refresh the NinjaScript F5 but will need to remove and add it back in to see the changes.

          Anything else such as data or OnBarUpdate() logic will be refreshed on the chart when you hit F5
          Cal H.NinjaTrader Customer Service

          Comment


            #6
            Thanks

            Thanks everyone, and especially Harry. That was an excellent explanation that will keep me from losing any more sleep about this.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mestor, 03-10-2023, 01:50 AM
            16 responses
            388 views
            0 likes
            Last Post z.franck  
            Started by rtwave, 04-12-2024, 09:30 AM
            4 responses
            31 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Started by yertle, Yesterday, 08:38 AM
            7 responses
            29 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by bmartz, 03-12-2024, 06:12 AM
            2 responses
            22 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by funk10101, Today, 12:02 AM
            0 responses
            7 views
            0 likes
            Last Post funk10101  
            Working...
            X