Intraday High and Low Label


Category:
0
0

Looking for a intraday high and low label from 0930 to 1600. I found this premarket high and low label in the search. https://www.hahn-tech.com/ans/premarket-highlow-label/  I did change the times from 0400-0929 to 0930-1600. However, if the intraday high is not as high as the premarket high, the label still displays the premarket high value. Only way it displays the intraday high is if it is higher than the premarket high. I am guessing I need to change something else in this script but cant figure it out. Thanks in advance.

RESOLVED
Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on May 19, 2020 7:38 pm
146 views
0
Private answer

The most directly and simple method to get the high and low of the regular session hours is to reference the daily time frame from the intraday chart.

input timeFrame = AggregationPeriod.DAY;
def dailyHigh = high(period = timeFrame);
def dailyLow = low(period = timeFrame);
AddLabel(yes, Concat("Daily High: ", dailyHigh), Color.GREEN);
AddLabel(yes, Concat("Daily Low: ", dailyLow), Color.RED);

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on May 19, 2020 8:14 pm