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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      29 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      17 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      9 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      15 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      18 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X