Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawline question

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

    Drawline question

    Hi Support,

    I have a question regarding drawline, for example as below

    DrawLine(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, DashStyle dashStyle, int width)

    DrawLine("tag1", false, 10, 1000, 0, 1000, Color.LimeGreen, DashStyle.Dot, 2);


    Is there anyway to drawline,so that it starts from the left of the screen to like 50 bars and it remains there as horizontal line.


    Thanks
    Commodity_trader

    #2
    You will not be able to know which bar is on the left most edge of the screen, but you can draw a line of 50 bars. Your startBarsAgo will be 50 and your end barsAgo will be 0. That will draw a line of 50. If you don't resubmit this line of code you will not move the code.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      if (CurrentBar < 50) DrawLine("tag1", false, CurrentBar, 1000, 0, 1000, Color.LimeGreen, DashStyle.Dot, 2);

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      156 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      76 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X