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

Any limit to number of plots in indicator?

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

    Any limit to number of plots in indicator?

    Im getting really strange behavior when I add an 19th plot to my indicator. Its merging it on the cart with the 18th plot. I have tripple checked my code and I don't see anything I am doing wrong. When I comment out the 19th plot, it works fine, when I add it back in, its putting the values in the 18th plot. Very strange. Any limit I am running up against here?

    #2
    Hello ErikY,
    I've used 27 plots without any issues so far. It works perfectly well.

    Comment


      #3
      Hello ErikY,

      There are no limits for plots, from the given description I could guess that you used a public property and for the 19th plot you have used the incorrect Value[index].

      We would need to see the code you used to get a better idea of why that's not working.

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

      Comment


        #4
        Thanks s.kinra and Jesse.

        Jesse, that was exactly what I suspected and triple checked it. You are correct on public properties. I went through all of my plots both in declarations and also in sate.setdefaults to see if I ddi anything funny, and I am not seeing anything at all.

        I copied the code to another indicator and changed the index from 18 to 3 because that is how many there were on other indicator, and all works fine.

        The indicator is massive so I don't know if I could post the entire indicator code, but would it be helpful if I posed the code for say index 17 and 18?

        Comment


          #5
          Hello ErikY,

          It sounds like the indicator is potentially just using the public property or Value incorrectly somewhere in the code. There's not limit to plots so if you are running into something that is incorrect you would need to track that down in your logic.

          As a comparable test you could make a new indicator with the same number of plots and then just set them all to specific values in OnBarUpdate with no other logic. That would show that its working and if its not you will have a sample to provide.

          An alternative here is to use the indicator wizard to generate an indicator with that many plots, you can use the dialog to configure them. Once you generate it you can copy/paste the generated properties and other defaults for the plots over your existing code to make sure you have everything configured right.

          Even in your existing script you could test this by commenting out the OnBarUpdate logic and then just set the plot to a value, if its the right value and shows up correctly then you can conclude the properties and plot are right and its your logic.

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

          Comment


            #6
            Hello ErikY,
            If you can share the code then we can understand your concern in a better way & try to resolve. Generally speaking there is no issue with changing the Values index.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bmartz, 03-12-2024, 06:12 AM
            4 responses
            32 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by Aviram Y, Today, 05:29 AM
            4 responses
            12 views
            0 likes
            Last Post Aviram Y  
            Started by algospoke, 04-17-2024, 06:40 PM
            3 responses
            28 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by gentlebenthebear, Today, 01:30 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by cls71, Today, 04:45 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X