Hi Ivan!
Huge thanks for such a rapid reply – I don’t quite know how I was able to get this working but I wanted to share with the rest of the community this incase its helpful for anyone else out there.
Happy for any critiques or feedback if it could be better overall – but im using it right now on my chart and so far it is working.
All the best,
Snow
// =============================================
// Previous Day & Week High/Low + Equilibrium
// =============================================
DEFPARAM DrawOnLastBarOnly = True
// ---------- Previous Day ----------
TimeFrame(Daily, UpdateOnClose)
PDH = Highest[1](High)
PDL = Lowest[1](Low)
PDEQ = (PDH + PDL) / 2
// ---------- Previous Week ----------
TimeFrame(1 Week, UpdateOnClose)
PWH = Highest[1](High)
PWL = Lowest[1](Low)
// ---------- Back to Chart Timeframe ----------
TimeFrame(Default)
// ------------------- Drawing -------------------
// Previous Day
DRAWLINE(BarIndex-2, PDH, BarIndex, PDH) COLOURED(0, 255, 255) STYLE(Line, 1) // PDH - Cyan
DRAWLINE(BarIndex-2, PDL, BarIndex, PDL) COLOURED(255, 0, 20) STYLE(Line, 1) // PDL - Red
DRAWLINE(BarIndex-2, PDEQ, BarIndex, PDEQ) COLOURED(255, 0, 20) STYLE(DottedLine, 1) // PDEQ - Same red as PDL
// Previous Week
DRAWLINE(BarIndex-2, PWH, BarIndex, PWH) COLOURED(0, 255, 10) STYLE(Line, 1) // PWH - Green
DRAWLINE(BarIndex-2, PWL, BarIndex, PWL) COLOURED(255, 102, 0) STYLE(Line, 1) // PWL - Orange
// Labels on the right
DRAWTEXT("PDH", BarIndex+2, PDH, SansSerif, Standard, 10) COLOURED(0, 255, 255)
DRAWTEXT("PDL", BarIndex+2, PDL, SansSerif, Standard, 10) COLOURED(255, 0, 20)
DRAWTEXT("PDEQ",BarIndex+2, PDEQ, SansSerif, Standard, 10) COLOURED(255, 0, 20)
DRAWTEXT("PWH", BarIndex+2, PWH, SansSerif, Standard, 10) COLOURED(0, 255, 10)
DRAWTEXT("PWL", BarIndex+2, PWL, SansSerif, Standard, 10) COLOURED(255, 102, 0)
RETURN