Previous Daily Open/High/Low/Close

This indicator plots the previous day's open, high, low and close levels on the chart

Published by Luke (DisciplinedTrader.co.uk)
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Hello there and thank you for the indicator! Do you know if it is possible to adjust previous H/L/C levels only on current (todays) session? Pretty much like you have but you do not see the levels over the previous session. I am asking because I like to try and keep the charts as clean as possible. Thank you again!
+1 Reply
Hi. I would like to get last 5 days close in an intraday chart for a strategy. It seems to be not working properly. I gave it like this.

day1Close = security(syminfo.tickerid, '1D', close)
day2Close = security(syminfo.tickerid, '2D', close)
day3Close = security(syminfo.tickerid, '3D', close)
day4Close = security(syminfo.tickerid, '4D', close)

1D and 2D close are same

Can you please guide me on how to do this.
gibt mir das in hand