JamesPowell

Session bars

this script marks off the extended hours trading for NY session. Shades the off hours and overnight data. Highlights the regular trading session for NY session. It can be adjusted for any particular market.

I use it specifically to show the missing data on the SPY as compared with the continuous data on the SPX500 .
從常用腳本中移除 新增至常用腳本

評論

Thank you
回覆
@Gwalleo, you are welcome. If you are interested we have a nice public chat room here on tradingview just follow this link https://www.tradingview.com/chat/#GLTODfGzJGbU1YVv
回覆
This doesn't work for me, all I see is green.
回覆
JamesPowell Melegito2018
@Melegito2018, use the settings button and change the colors and settings to your preference. You can also change to time as well if need be.
回覆
Melegito2018 JamesPowell
@JamesPowell, I don't know how to change something that doesn't make sense. At this point I tried to take out both t0 and t1 just to see what t will do. I think // means comment, but it doesn't work as I still have green and red. Why can't I upload picture here?!
t=time(period,"0930-0910")
//t0=time(period, "2000-2030")
//t1=time(period, "0400-0400")
//bgcolor(color = na ( t0 ) ? na:blue, transp=60)
//bgcolor(color = na ( t1 ) ? na:red, transp=60)
bgcolor(color = na ( t ) ? red:green, transp=70)
plot(close)

What I have under style backgroud color is 0 and 1.
On the chart I have green from Dec 10 14 and red from Dec 14 to 17 (that is weekend.) still makes no sense to me.
回覆
Melegito2018 Melegito2018
@Melegito2018, ok, my mistake, changed it to 9030-9040 now the green works but I still have the red. But the only reason I changed your original was that it was just gree.
回覆
Melegito2018 Melegito2018
@Melegito2018, Now all I have is this :
study("Session bars", overlay=true)
t=time(period,"0930-1600")
bgcolor(color = na ( t ) ? red:green, transp=70)

And the 5 day chart is all green. and under style, there is color 0 and color 1
What is red:green or na:blue ?
回覆
JamesPowell Melegito2018
@Melegito2018 I just PM'd you. Perhaps I can help. Look for my private message to you.
回覆


If i pasted this picture correctly the chart on the left is the SPX500 and on the right is the SPY. Notice on the left chart each shaded area has two blue vertical lines and the chart on the right appears to have only one blue vertical line. In fact there are two lines on the right chart as well. They are laid over each other is all. The same script if applied to both charts. The chunk of data between the two bars on the left chart is simply just not recorded on the chart on the right. The grey area on the right hand chart is there because i have the extended hours data button pressed so it reflects in the graph.

Often what appears to us as a gap on the SPY chart is smoothed out and explained by the continuous data on the left hand chart of the SPX500. There really is no "gap" really, only a lack of recorded data on one chart compared to the other.
+2 回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出