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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      673 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      577 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X