TradingView
EduardoMattje
2020년 10월 10일 오후 3시 14분

Yesterday's open, high, low and close 

JP Morgan Chase & Co.NYSE

설명

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.

릴리즈 노트

You can now choose to hide historical values.

릴리즈 노트

Fixed the last bar bug that was displaying current day values. Very annoying.

릴리즈 노트

Wrong graph ops

릴리즈 노트

Ok now the graph should be right and working.

릴리즈 노트

In Forex pairs, new data was being retrieved 1 candle before the closing of the day. Now it should be fixed.

릴리즈 노트

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.

릴리즈 노트

The script is now useful on daily and weekly charts, and you can set the period so that lines are shown on the chart.

릴리즈 노트

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.

릴리즈 노트

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.
코멘트
geekavigk
I need any tutorial, please i can't make yesterday OHLC line, please help me
Betze
my closes in the futures are false, any suggestions to fix it?
cash markets are fine
kjs1
Many thanks!
kjs1
Can you add an option to display just yesterdays levels only - not all the preceding days.
EduardoMattje
@kjs1, Ok done
UnknownUnicorn10108136
can we get prior day data without using security()? as lookahead=barmerge.lookahead_on is not working for me.... i am on hourly chart, and simply need yesterday's OHLC. Currently i am using security() but its leading to delayed alerts due to repainting... many thanks for your help
kjs1
Could you add a feature to show previous day only versus historical values?
Thanks
EduardoMattje
@kjs1, I can't understand what you're asking, please elaborate
zakademus
This is great, thankyou
Is there any chance that the lines can be projected forward for say 5 to 10 candles?
DarumaTrades
Very useful and thank you. Is there any way to make the calculations for tomorrow's more offset from the current bar?
더보기