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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      77 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X