• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 TazoTodua, Today, 02:02 AM
    0 responses
    2 views
    0 likes
    Last Post TazoTodua  
    Started by rehema, Today, 01:29 AM
    0 responses
    5 views
    0 likes
    Last Post rehema
    by rehema
     
    Started by Papercut110, Yesterday, 11:25 PM
    0 responses
    3 views
    0 likes
    Last Post Papercut110  
    Started by cgjecv, Yesterday, 09:42 PM
    0 responses
    4 views
    0 likes
    Last Post cgjecv
    by cgjecv
     
    Started by fxRichard, Yesterday, 08:34 PM
    0 responses
    3 views
    0 likes
    Last Post fxRichard  
    Working...
    X