Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Line (Plot line between 2 days' given time)

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

    Draw.Line (Plot line between 2 days' given time)

    Hello,
    How can I draw line on back date, I am using time input so its plotting only for current day, I want to give start point as yesterday's time? Not sure how to give date input in Draw.Line.
    Any other better way to do this?
    Thanks!

    #2
    Hello s.kinra,

    Thank you for your post.

    You'd need to use .AddDays() to get the correct bar for the same time yesterday. I'm attaching a quick example indicator I created that can be run on a 1 minute chart that will draw a line from a bar to the bar at the same time the previous day you can use as a jumping off point for your own logic.

    Here's also a publicly available link to Microsoft's documentation for AddDays():
    Returns a new DateTime that adds the specified number of days to the value of this instance.


    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment


      #3
      Hello Kate,
      Thanks for the valuable information, this gives me clarity on how I can manage the dates. Appreciated!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      72 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X