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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      128 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      117 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X