TradingView
MarkMcFX
Oct 12, 2021 2:09 PM

Market Sessions Open/Close Levels 

US Nas 100OANDA

Description

This indicator displays the market open and close price levels for the main trading sessions (Sydney, Tokyo, Frankfurt, London and New York). The Daily Line changes color depending on if price is trading above or below the level. Feel free to add or replace levels depending on your trading style and trading times.
Comments
SoftBallSalat
This is gold! probably one of the best indicators here in tradingview! i have adapted it a bit for me and added more closing lines. but if i change the view from Dax to Dow Jones for example, the lines do not adjust with the new times. Open and Closing Lines are then in the wrong place.

Is there a way to automatically adjust the time so that the lines always open or close at the respective time?
MarkMcFX
@SoftBallSalat, Thanks for the coins and the compliment! I wasn't expecting this to be that popular, I'm glad its helping others with their trading. I'm not quite sure how to fix your problem, it works for me on the Oanda data feed, maybe there is a gap in data causing the problem? I'm very much a beginner with coding, as you can see in the comment below I copy pasted this indicator together while only making small changes. If you want to go into detail with your issue feel free to message me on telegram and I can see what I can do @markcoasts
SoftBallSalat
@MarkMcFX, good morning, thank you, i will contact you :)
yannitegui
question why not Tokyo close and Frankfurt close?
Kaustubh1993
This is the probably the second or third time in all of my life i've commented on a script, cannot thank you enough for making it so easy and nice to use :)
God bless you my friend!
cfitzgerald
I really like this indicator but it is buggy - for example any lines starting from 16:00-16:01 are invisible. I really want a line that shows US Market close price ( i.e previous day close). I am based in Europe and this would be at 22:00 here (UTC+2) it is really hard to set up the time for each line without a time zone selection. Any chance you can look into this? Otherwise a great idea for an indicator thanks!
bsdvs23
Do you have a script that captures the closing price at 1600 for the futures and extends throughout the overnight into morning hours? Like a close to close from 1600 to 1600? Goal is to have the High, Low, and Close captured under this scenario.
MarkMcFX
@bsdvs23, Hey there, not sure how this would work on futures. The source code would have to be changed and I'm not skilled enough to make a modification like that. I actually didn't code any of this, I took pieces of code from a few different indicators and copy pasted it all together. Only made a few small changes. The only thing I can think to do in your case is copy paste this section of code making 3 separate "Daily Lines". Once you have the 3 blocks of code, you can change "close" to high and low for the 2 additional lines.

odl = input(true, title="Sydney/Daily Open")
dopen = security(syminfo.ticker, 'D', close[1], barmerge.gaps_off, barmerge.lookahead_on)
dcolor = close < dopen ? color.red : color.blue
plot(odl and dopen ? dopen :na , title="Sydney/Daily Open",style=plot.style_linebr, color=dcolor, linewidth=3)

Feel free to message me on telegram if you want some additional help @markcoasts
bsdvs23
@MarkMcFX, thanks brother, I appreciate the info. I’ve dabbled here and there just as many others probably have. I’ll see what I can come up with and give a shout out as applicable. Appreciate the response - that’s goes a long way. Take care! - Bill
More