stoneybucks
New member
I searched and did not find a basic intraday indicator for high of day and low of day, so I created what I was looking for in my trading. This script is intended to make both HOD and LOD easily recognizable and kept in mind via both line and chart bubble for trading. This will continue to update in real time as NHOD or NLOD are set.
Code:
#Intraday HOD/LOD Plot
#Stoneybucks
#Simple green HOD and red LOD line and bubble plotting each, and it updates intraday as new ones are set HOD/LOD are set. Bubble is intentionally shifted to ideally be out of the way from viewing price as the day progresses.
plot highLine = HighestAll(if IsNaN(close[-1])
then high(period = "Day")
else Double.NaN);
plot lowLine = LowestAll(if IsNaN(close[-1])
then low (period = "Day")
else Double.NaN);
input showBubble = yes;
input ShiftBubble = -75;
def n1 = ShiftBubble + 1;
def cond = showBubble and IsNaN(close[ShiftBubble]) and !IsNaN(close[n1]) ;
AddChartBubble(cond, highLine, Concat("HOD: ", Round(highLine)), Color.GREEN);
input showBubble1 = yes;
input ShiftBubble1 = -75;
def n2 = ShiftBubble + 1;
def cond1 = showBubble and IsNaN(close[ShiftBubble]) and !IsNaN(close[n2]) ;
AddChartBubble(cond, lowLine, Concat("LOD: ", Round(lowLine)), Color.RED);
Last edited by a moderator: