Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.ArrowLine

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

    Draw.ArrowLine

    Hi, I have a function which draws an arrow in left top corner of chart
    Code:
    barsPainted = ChartBars.ToIndex - ChartBars.FromIndex;
    height = chartScale.Height/16;
    width = chartScale.Width/32;
    
    Draw.ArrowLine(this, "myArrow", CurrentBar-ChartBars.FromIndex-(barsPainted/32), chartScale.GetValueByY((float)(height+height/64)), CurrentBar-ChartBars.FromIndex-(barsPainted/32), chartScale.GetValueByY((float)(height+height*2)), Brushes.Red,DashStyleHelper.Solid, 7);
    On my first PC it works perfectly but on my second PC it throws an "object reference not set to an instance of an object". I can't find why does this exception occures only o second PC.

    Update: PC which does not work has windows 7 OS

    Update 2: Error looks like: "Error on calling 'OnRender' method on bar 5546: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."
    while currentBar = 5545, why does OnRender method trying to recive non exist bar
    Last edited by dv926844; 05-25-2017, 04:04 AM. Reason: Investigation

    #2
    What is the OS on the working version ?
    Not that this has fixed it in my Case but Have you updated your video
    card drivers on the Win7 version ?

    Comment


      #3
      Hello dv926844,

      Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the log and trace files for the day in subject which you can find in My Documents>NinjaTrader8>Log and My Documents>NinjaTrader8/Trace folders.

      I look forward to your email.
      Alan P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X