TradingView
webbie
25 กุมภา 2016 เวลา 19 นาฬิกา 21 นาที

Index Volume 

NASDAQ Composite IndexNASDAQ

คำอธิบาย

If you need to put the index volume on either the Nasdaq Composite (NASX) or NYSE (NYA), this will do it for you. Enjoy!
ความคิดเห็น
JJtraderJJ
Thanks for shearing. It is possible that the volume bar color change according to previous closed? as we can choose on in the default tredingview volume options. Tx
vns_ram1
@JJtraderJJ, below is the code.

// Index Volume: Dow Jones Index Volume
study("Index Volume")
// use TVOLQ for Nasdaq Composite, TVOL for NYSE Composite, TVOL.DJ for Dow Jones
s = security("TVOL.DJ", "D", close)
// use IXIC for Nasdaq Composite, NYA for NYSE Composite, DJI for Dow Jones
i = security("DJI", "D", close)
MA = sma(s,50)
plot(s, color = i > i[1] ? green : red, linewidth=4, style=histogram)
plot (MA, color=orange, linewidth=2)
เพิ่มเติม