Yesterday's open, high, low and close

A very simple script to plot the yesterday's OHLC, to be used in an intraday graph.

There were other scripts like this, but their code was ugly, filthy, smelly, and WET, so I did this.
Release Notes: You can now choose to hide historical values.
Release Notes: Fixed the last bar bug that was displaying current day values. Very annoying.
Release Notes: Wrong graph ops
Release Notes: Ok now the graph should be right and working.
Release Notes: In Forex pairs, new data was being retrieved 1 candle before the closing of the day. Now it should be fixed.
Release Notes: Now you can select which timeframe do you want to pull the data from, so you choose to plot the last week OHLC, or the last month.
Release Notes: The script is now useful on daily and weekly charts, and you can set the period so that lines are shown on the chart.
Release Notes: I changed the default style of the lines to be the regular lines instead of the step lines, so now, if you have selected the display current values options, the lines should be visible even at the start of the day.
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?