Highest Point on each Intraday

cheual

cheual

New member
I'd like to create a simple script that'll have a point @ close at the HIGHEST point of each intraday everyday on my screen.

Can someone help with creation of this script.

Thank You!
 
T

tomsk

Well-known member
VIP
I'd like to create a simple script that'll have a point @ close at the HIGHEST point of each intraday everyday on my screen.

Can someone help with creation of this script.

Thank You!


@cheual Per your request here is your high during regular trading hours study being plotted on your charts. Remember to run this at intraday aggregations, e.g. 15 mins, etc

Code:
# High RTH
# tomsk
# 1.6.2020

declare hide_on_daily;

def active = GetTime() >= RegularTradingStart(GetYYYYMMDD());
def H = if active and !active[1]
        then high
        else if active and high > H[1]
             then high
             else H[1];
def Hbn = if high == H then barNumber() else Double.NaN;
plot HLine = if barNumber() >= HighestAll(Hbn) then H else Double.NaN;
HLine.SetDefaultColor(Color.Yellow);
# High RTH
 
cheual

cheual

New member
Hi Tomsk,

The above script does not plot prior date's highs which is my initial intent. What would be the line of code to achieve that?
 
T

tomsk

Well-known member
VIP
Well that's because you were not clear when you initiated that request. That would be a different code. Next time be real explicit
Here is the high previous day - run this on an intraday aggregation, e.g. 15 min

Code:
# High Previous Day
# tomsk
# 1.7.2020

declare hide_on_daily;

def active = GetTime() >= RegularTradingStart(GetYYYYMMDD());
plot PH = if active then high(period = AggregationPeriod.Day)[1] else Double.NaN;
PH.SetLineWeight(2);
PH.SetDefaultColor(Color.Yellow);
# End High Previous Day
 
Last edited:

Similar threads

Top