EduardoMattje

Yesterday's open, high, low and close

EduardoMattje Atualizado   
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.
Notas de Lançamento:
You can now choose to hide historical values.
Notas de Lançamento:
Fixed the last bar bug that was displaying current day values. Very annoying.
Notas de Lançamento:
Wrong graph ops
Notas de Lançamento:
Ok now the graph should be right and working.
Notas de Lançamento:
In Forex pairs, new data was being retrieved 1 candle before the closing of the day. Now it should be fixed.
Notas de Lançamento:
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.
Notas de Lançamento:
The script is now useful on daily and weekly charts, and you can set the period so that lines are shown on the chart.
Notas de Lançamento:
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.
Notas de Lançamento:
Now the prices should correctly be displayed in extended sessions, which required me to make a very big "gambiarra".

I also added an option to show the prices for tomorrow, but it's a bit ugly, since PineScript doesn't let me use the "time_trading_day" of the next day.
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?