Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Method

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

    Plot Method

    I have an indicator that plots a value under each bar. After migrating to NT7 I get the following error when I scroll backwards for awhile:

    "Please check the 'OnBarUpdate' or the 'Plot' method: barsAgo needed to be between 0 and 255 but was 258".

    Ok, so I updated my Data Series to include:

    "myDataSeries = new DataSeries(this, MaximumBarsLookBack.Infinite);"

    Now my plots don't work at all...

    "Please check the 'OnBarUpdate' or the 'Plot' method: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index"

    I am not running this on a non-equidistant chart. Must the new plot method be used anytime you use an infinite Data Series?

    Thx.

    #2
    BradB,

    Be sure that you are actually running the indicator with Infinite bars too. You have the selection in the indicator UI when you add it. After doing that do you still get the issue?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Yes, it still occurs with the UI set to infinite.

      Comment


        #4
        Please provide a stripped down as simple as possible version of your script that demonstrates the issue and we can give you some pointers accordingly. Thank you.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Ok, gutted sample indicator is attached. If I run it without infinite option in both code and UI, it runs fine unless I scroll backwards more than 256 bars. If I change both to Infinite, I get an error on load.

          I run it on a range bar chart.
          Attached Files

          Comment


            #6
            BradB,

            Unfortunately you are working with the unsupported Plot method. Please debug your use of ChartControl objects while keeping in mind of these code breaking changes: http://www.ninjatrader-support.com/H...il_28_2010.pdf

            When you are using 256 bars back the error is in your code segment commented as "Historical Boxes" somewhere. When using Infinite the error is in your code segment commented as "First Box" somewhere.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X