Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.VerticalLine barsAgo not working

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

    Draw.VerticalLine barsAgo not working

    I have been trying to add a basic vertical line to my chart that appears on 25 bars back however, the bar will only show if I put Zero or a Negative number in the barsAgo parameter, which of course pushes it out to the future. I have successfully added a vertical bar using the time parameter, but that is not what I am looking for.

    Some code I have tried with no luck is:

    Code:
    Draw.VerticalLine(this, "vlBarsBack", 25, Brushes.Red); //-FAILS
    VerticalLine vl = Draw.VerticalLine(this, "vlBarsBack", 25, false, ""); //-FAILS
    
    DateTime date1 = new DateTime(2019, 5, 15, 18, 0, 0);
    Draw.VerticalLine(this, "vlBarsBackTime", date1, Brushes.Blue); //- WORKS but not what I am looking for.
    Any thoughts? This seems like a bad question, but I cannot figure out where I am going wrong. All code is located in OnBarUpdate method.

    #2
    Hello [email protected]

    Thanks for your post.

    I have answered your post in this thread: https://ninjatrader.com/support/foru...go-not-working

    Please help keep the forum organized by not placing duplicate posts in different forum sections, thanks for your understanding.

    Comment


      #3
      No problem. I'm sure you saw my post 13 minutes before you posted this stating it been deleted.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X