shijithlal

Bank Nifty Volume

Why this Script : Nifty 50 does not provide volume and some time it is really useful to understand the volume .

This is the pine script which calculate the nifty 50 volume .

Logic :

Take each stock contribute to nifty 50 and find it's volume .
Multiply the same with contribution percentage of the same on Nifty 50
Add up all of them and find the total volume .

I took the open source code from @daytraderph script called, Custom Volume

I will make sure I will update the contribution percentage of all stocks my self instead o you update using input methods. This is the difference. Some people don't know where to look at this to update the value, so for them this script might be useful. And this is the only difference comparing to Custom Volume script.
Release Notes: Simplify the script, remove some code from the original script which does not match with this script as of now.
Release Notes: Updating chart
Release Notes: Updated new Weightage values.
Release Notes: Chart updated, remove other indictor from chart
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Comments

Bro help me plz it's not working

version=4
//@Author Shijith

study(title="Bank Nifty Volume", shorttitle="Volume")

W_HDFCBANK=28.48
W_ICICIBANK=20.51
W_AXISBANK=13.23
W_KOTAKBANK=13.10
W_SBIN=12
W_INDUSINDBK=4.62
W_AUBANK=2.24
W_BANDHANBNK=1.97
W_FEDERALBNK=1.30
W_IDFCFIRSTB=1.00

// custom function
sym(s) => security(s,timeframe.period, volume)

// make the weighted index
A = (W_HDFCBANK*sym("NSE:HDFCBANK")/100+W_ICICIBANK*sym("NSE:ICICIBANK")/100 +W_AXISBANK*sym("NSE:AXISBANK")/100+W_KOTAKBANK*sym("NSE:KOTAKBANK")/100+W_SBIN*sym("NSE:SBIN")/100+W_INDUSINDBK*sym("NSE:INDUSINDBK")/100+W_AUBANK*sym("NSE:AUBANK")/100+W_BANDHANBNK*sym("NSE:BANDHANBNK")/100 +W_FEDERALBNK*sym("NSE:FEDERALBNK")/100+W_IDFCFIRSTB*sym("NSE:IDFCFIRSTB")/100)

colorofbar = open < close ? color.green : color.red

plot(A, linewidth=5, style=plot.style_columns,color=colorofbar)
Reply
thank you, is this up to date?
Reply
Total of Weightages add up to 98.82
Will this represent correctly ?
Reply
Hi Bro

with changes in weigtage i did change values & removed the banks bank of baroda & PNB but while running it throws compilation error can you please check else upload latest script .

//@version=4
//@Author Shijith

study(title="Bank Nifty Volume", shorttitle="Volume")

W_HDFCBANK=28.83
W_ICICIBANK=19.61
W_KOTAKBANK=14.89
W_AXISBANK=14.36
W_SBIN=10.44
W_INDUSINDBK=4.39
W_BANDHANBNK=2.71
W_FEDERALBNK=1.42
W_RBLBANK=1.15
W_IDFC=0.92

// custom function
sym(s) => security(s,timeframe.period, volume)

// make the weighted index
A = (W_HDFCBANK*sym("NSE:HDFCBANK")/100 + W_ICICIBANK*sym("NSE:ICICIBANK")/100 + W_AXISBANK*sym("NSE:AXISBANK")/100+W_KOTAKBANK*sym("NSE:KOTAKBANK")/100+ W_SBIN*sym("NSE:SBIN")/100+W_INDUSINDBK*sym("NSE:INDUSINDBK")/100 +W_FEDERALBNK*sym("NSE:FEDERALBNK")/100 +W_RBLBANK*sym("NSE:RBLBANK")/100+W_IDFC*sym("NSE:IDFC")/

colorofbar = open < close ? color.green : color.red

plot(A, linewidth=5, style=plot.style_columns,color=colorofbar)
Reply
@et_ab, Done. Thanks for pointing out.
+5 Reply
Thanks bro...very useful....better than investing.com, there cant see volume on 1 minute....!!!
Reply
HOW TO ADD VOLUME INDICATOR TO THE CHART IN USING TRADINGVIEW THRU UPSTOX.... PLZ HELP
Reply
shijithlal lukhbir
@lukhbir, You can not use trading view through upstox. They have only the Basic UI. You cant access any such indicator outside of Trading view platform as of now.
Reply
Try to same Nifty50
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out