Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple indicator question

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

    Simple indicator question

    I'm trying to draw a horizontal rectangle at a given time to end of session.

    So say I have the 9:30time frame - I want to draw a horizontal rectangle from current high and low of the closing bar to end of session EACH day.
    I can currently get it to work for the given day but I can't get it to show up for each session or prior day. How can I do this?

    Curerntly I'm doing something like this and it works for the current day but I'd prefer to have this so it starts at my Time and ends at the end of the session and then only starts again on the next day at the specific time as well but I want to see it on all prior sessions also.

    Code:
    if(ToTime(Time[0]) == ToTime(9,0,0) ) {
    
    Draw.Rectangle(this, "startTime", Time[0], Low[0] - TickSize, Time[0].AddHours(+8.00), High[0] + TickSize, Brushes.Blue);
    }

    #2
    Never Mind - I realized what my issue was. I needed to update my tag name so that it had a unique id for each day. So simple.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    140 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X