EduardoMattje

Yesterday's open, high, low and close

EduardoMattje Mis à jour   
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.
Notes de version:
You can now choose to hide historical values.
Notes de version:
Fixed the last bar bug that was displaying current day values. Very annoying.
Notes de version:
Wrong graph ops
Notes de version:
Ok now the graph should be right and working.
Notes de version:
In Forex pairs, new data was being retrieved 1 candle before the closing of the day. Now it should be fixed.
Notes de version:
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.
Notes de version:
The script is now useful on daily and weekly charts, and you can set the period so that lines are shown on the chart.
Notes de version:
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.
Notes de version:
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 open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?