156
Plots daily open, high, low and close levels on charts

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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//Created By DisciplinedTrader.co.uk -- Updated 16.09.2016
//Updated for Forex and Intraday traders.  Previous Day OHLC
//Daily Session To be used on IntraDay Charts
study(title="DT_OHLC", shorttitle="DT_OHLC", overlay=true)
sy = input(false, title="Show Yesterdays OHLC?")


//PRevious OHLC
pdo = security(tickerid, 'D', open[1])
pdc = security(tickerid, 'D', close[1])
pdh = security(tickerid, 'D', high[1])
pdl = security(tickerid, 'D', low[1])



//Daily Plots
offs_daily = 0 
plot(pdo, title="PDO", style=line, linewidth=2, color=blue)
plot(pdc, title="PDC", style=line, linewidth=2, color=orange)
plot(pdh, title="PDH", style=line, linewidth=2, color=lime)
plot(pdl, title="PDL", style=line, linewidth=2, color=red)