Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Platform loading with error

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

    #16
    I'm getting an error that the index was outside the bounds of the array when I changed the index to 4. I tried it with the code you provided as well as mine, and I'm still getting the error.

    The only index that I can get to work without error in your code is Values[1] for TrueRange. I'm a bit confused by the fact that it would be 4, as the plot indexes are set from 0-2, so logically the next index should be 3. Admittedly I hadn't tried 4 because I thought it was out of range, but I've tried 4 and 3 now and it also doesn't work for me. If the TrueRange index is set to 1 the code compiles, but it always plots this as the 2nd plot.


    Edit - I think I figured out what I was doing incorrectly, which was the setting of the 2nd plot. Value[0] sets the primary plot, but for the other plots I should've used Values[index of plot][0]. instead of Value which is for the primary plot. That seems to have fixed the problem.
    Last edited by Matts; 01-10-2017, 01:48 AM.

    Comment


      #17
      There's still a problem with the plots for this indicator. I thought that the TrueRange series was no longer plotting, but it was still plotting off the indicator scale. From trying different numbers for the various series, it seems that this series must be Values[1], and it will plot as Values[2]. This means the next plot has been shifted to Values[3]. I removed the 3rd plot now, so there's only 2 indicator plots.
      The only way I can see to remove the plot for TrueRange (Values[2]) is to set it to transparent for the brush color. This works, but the plot still shows in the UI. It's already set to [Browsable(false)][xmlignore]. Is it possible to remove the transparent plot from the UI?

      Comment


        #18
        Both of these tags,

        Code:
                [Browsable(false)]
                [XmlIgnore]
        should do the trick. These tags are case sensitive. Please ensure your XmlIgnore tag matches the above case.
        Jessica P.NinjaTrader Customer Service

        Comment


          #19
          Both tags are there with the correct syntax. That was just my poor typing in the post. It's still listed as a plot.

          Comment


            #20
            Thank you for this additional information. Series added with AddDataSeries should not show up as plots. Would it be possible to replace each of your AddPlot calls by AddDataSeries calls? Our goal is to see if, on your system, plots still show up on the bottom in the GUI when you do this. Please let us know either way what your results are.
            Jessica P.NinjaTrader Customer Service

            Comment


              #21
              When I replaced the AddPlot with AddDataSeries no plots showed up in the GUI. The problem is that the plot values are being replaced by the data series values, not that the plot is showing up. It's drawing a line with a near zero value, which matches the output of the data series.

              I've solved that part of the problem, by making it transparent. If possible I'd like to remove this plot from the UI.
              Last edited by Matts; 01-18-2017, 01:58 PM.

              Comment


                #22
                Would it be possible to provide an up-to-date code sample, either here or via e-mail to platformsupport[at]ninjatrader[dot]com referencing Attn:NinjaTrader_JessicaP and 1631677 in the subject line?
                Jessica P.NinjaTrader Customer Service

                Comment


                  #23
                  Thank you for providing us with a code sample. I was incorrect in some of the advice I gave earlier. We are unable to set output ranges that show up in the Values array without adding plots, as Values is a fixed size read only array from the outside. If you would like a series of this nature that does not show up as a plot, please examine the attached code. Please let us know if there are any other ways we can help.
                  Attached Files
                  Last edited by NinjaTrader_JessicaP; 01-26-2017, 01:34 PM.
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #24
                    Thanks Jessica, I was able to add this code to the indicator, and get it to work with 2 plots.
                    I'm not sure why, but the order seemed to be important when adding this code. The method that worked was to set the 2nd plot (Values[1]), then the TrueRange Series and then set the 1st plot (Values[0]). Setting the Values in a different order to this, seemed to cause problems. I also followed your example of using the series name instead of Values.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by memonolog, Today, 03:30 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post memonolog  
                    Started by toughiee, Today, 12:04 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post toughiee  
                    Started by vdoan20, Yesterday, 08:30 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post vdoan20
                    by vdoan20
                     
                    Started by gupagoer, Yesterday, 07:42 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post gupagoer  
                    Started by Holligoly, Yesterday, 05:13 PM
                    2 responses
                    11 views
                    0 likes
                    Last Post Holligoly  
                    Working...
                    X