Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

B5 - Chart - Index out of range

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

    B5 - Chart - Index out of range

    From the log:

    1)
    Chart rendering failed. There is likely a problem with a chart object's OnRender method. D2D error = 'Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index'

    2)
    Unhandled exception: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    Reproduce it this way:

    - Open new chart with some data series
    - Compress the time scale to the max by moving - with pressed mouse button on the timescale - the last bar to the right chartpanel border.
    Now move the last bar - with pressed mouse button on the timescale - to the left chartpanel border to make future timeline visible. Exception is raised.

    See attached example screenshot.

    Regards,
    patapata
    Attached Files
    Last edited by patapata; 10-25-2015, 02:39 AM.

    #2
    Hello patapata,

    Thank you for your post.

    I was able to reproduce and I have created a video to submit to our development department.

    http://screencast.com/t/bGYazzt0fvis

    Please let me know if you find any other unexpected behavior to report.
    Last edited by NinjaTrader_ChelseaB; 10-27-2015, 09:45 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Until Ninja fixes this, you can stop the error by adding this at the beginning of OnRender

      if (chartControl.SlotsPainted >= ((BarsArray[0].Count) - 2) )
      return;

      This simply checks the number of bars on the screen and drops out of OnRender if they hit the total number of bars in the chart...(ie "squeezing the chart)....
      Perhaps not the most elegant solution but it seems to work.

      Your rendering stops of course....but no error thrown...and everything pops back when you 'unsqueeze' the chart..
      Last edited by photog53; 12-04-2015, 08:43 AM.

      Comment


        #4
        Hello,

        This issue is tracked with ID #NTEIGHT-9026.

        This should be corrected in Beta 7 which available for download. Please give this a try and let me if you are still able to reproduce.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Kaledus, Today, 01:29 PM
        5 responses
        12 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Waxavi, Today, 02:00 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        5 responses
        23 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by gentlebenthebear, Today, 01:30 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by PhillT, Today, 02:16 PM
        2 responses
        7 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X