Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawArrowDown/Up question

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

    #16
    Hi rontrade,

    Thanks for the video.

    I was able to duplicate the issue.

    It looks like you draw the line on every on bar update call.

    Somewhere you are getting a calculation with a bars ago value that is greater than the bars on the chart. This appears to happen the first time that startbar_v is set.

    You need to check your calculation and make sure that your bars ago value is less than the current bar value.

    I added:
    Print("CurrentBar: "+CurrentBar);
    DrawLine("slopedline" + a.ToString(),false, startbar_v, start_v, endbar_v, end_v, Color.Black, DashStyle.Dash,2);

    And got the print:
    xxxxxx: startbar:264/455 endbar:455/264
    CurrentBar: 454

    Thus the startbar bars ago value is greater than the current bar.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 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
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X