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 yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        21 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        4 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X