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

Ninjascript not saving/compiling changes

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

    Ninjascript not saving/compiling changes

    Hi,

    I'm having issues where changes in my indicator Ninjascript are being saved, but when I compile, the changes are not reflected in the compiled indicator. Case in point, if I create the default "MyCustomIndicator" from the wizard, then go into code and change the "Plot0" property name to "Plot1", the compiled version still has "Plot0" in the indicator property dialog when I add it to a chart.

    FWIW, strategies are saving/compiling fine.

    How do I fix this?

    Kerry

    #2
    Hello Kerry,

    Thank you for your post.

    You would need to right click in the chart > select Indicators > select your indicator that has been added to the chart > Remove > then select the indicator from the list again > New > OK.

    The Plots are configured and then added to the chart. Changing the code would not change the indicator Plots as they are held in memory.

    Please let me know if you have any questions.

    Comment


      #3
      Hi Patrick,

      Sorry if I wasn't clear. For sure, after compiling I removed/added the indicator. In fact, I even tried opening a fresh new chart and add the newly compiled indicator and its still loading/using the old version.

      Thoughts?

      Comment


        #4
        Hello kerrychoe,

        Thank you for your response.

        Do you have a template for the indicator under Documents\NinjaTrader 7\templates\Indicator? If so, delete the template and try again. If not, then please attach the indicator to your response with details on the settings and what they should be.

        Comment


          #5
          Hi Patrick,

          No, there is no template. Attached is the .cs file for the indicator. The only change is the "Plot0" property which is changed to "Plot1".
          Attached Files

          Comment


            #6
            Ugh. Nevermind, I've figured it out. In the Initialize() method, a new Plot object is instantiated with name "Plot0". I thought the property in the indicator property dialog was deriving its name from the property with name "Plot0", but turns out its using the name passed in the constructor. I had missed the name in the Plot constructor, which was still "Plot0". I've changed it now, and it does in fact reflect in the newly compiled indicator.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CortexZenUSA, Today, 12:53 AM
            0 responses
            1 view
            0 likes
            Last Post CortexZenUSA  
            Started by CortexZenUSA, Today, 12:46 AM
            0 responses
            1 view
            0 likes
            Last Post CortexZenUSA  
            Started by usazencortex, Today, 12:43 AM
            0 responses
            5 views
            0 likes
            Last Post usazencortex  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            168 responses
            2,265 views
            0 likes
            Last Post sidlercom80  
            Started by Barry Milan, Yesterday, 10:35 PM
            3 responses
            12 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X