TradingView
shijithlal
20 กรกฎา 2020 เวลา 5 นาฬิกา 41 นาที

Bank Nifty Volume 

Nifty Bank IndexNSE

คำอธิบาย

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.

เอกสารเผยแพร่

Simplify the script, remove some code from the original script which does not match with this script as of now.

เอกสารเผยแพร่

Updating chart

เอกสารเผยแพร่

Updated new Weightage values.

เอกสารเผยแพร่

Chart updated, remove other indictor from chart

เอกสารเผยแพร่

Stock weightage updated
ความคิดเห็น
tobhanusingh
thank you, is this up to date?
blissfulEagle70242
@tobhanusingh, looks like not. Weightages are not right.
et_ab
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)
shijithlal
@et_ab, Done. Thanks for pointing out.
lifekarofficial
Here is the latest working script, with updated 12 indexes :

// © amitvermansit

//@version=4

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

W_HDFCBANK=26.09
W_ICICIBANK=22.53
W_SBIN=12.51
W_AXISBANK=12.26
W_KOTAKBANK=11.21
W_INDUSINDBK=5.42
W_AUBANK=2.75
W_BANDHANBNK=2.04
W_FEDERALBNK=1.92
W_IDFC=1.39
W_PNB=1.18
W_RBLBANK=0.71

// 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_SBIN*sym("NSE:SBIN")/100 + W_AXISBANK*sym("NSE:AXISBANK")/100 + W_KOTAKBANK*sym("NSE:KOTAKBANK")/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_IDFC*sym("NSE:IDFC")/100 + W_PNB*sym("NSE:PNB")/100 + W_RBLBANK*sym("NSE:RBLBANK")/100)

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

plot(A, linewidth=5, style=plot.style_columns,color=colorofbar)
ssundarrajan
@lifekarofficial, Hi I am getting study error.I copy pasted your code and it is throwing error message Could not find function of function reference 'study')
Can you pls help Thanks.
yanithkumar12345
@ssundarrajan, now the version is 5, so study does not work....use indicator in place of study.
and in place of security use request.security
memrmojorisin
Index Component Change as of 30th Dec, 2022:
www1.nseindia.com/content/indices/ind_nifty_bank.pdf

Please change it to the following:

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

W_HDFCBANK=27.52
W_ICICIBANK=23.84
W_SBIN=10.33
W_KOTAKBANK=10.16
W_AXISBANK=10.14
W_INDUSINDBK=6.30
W_BANKBARODA=2.74
W_AUBANK=2.49
W_FEDERALBNK=2.33
W_IDFCFIRSTB=1.42

Delete these
W_BANDHANBNK=1.98
W_PNB=0.91
//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_BANKBARODA*sym("NSE:BANKBARODA")/100+W_BANDHANBNK*sym("NSE:BANDHANBNK")/100+W_IDFCFIRSTB*sym("NSE:IDFCFIRSTB")/100+W_AUBANK*sym("NSE:AUBANK")/100+W_PNB*sym("NSE:PNB")/100)

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

plot(A, linewidth=5, style=plot.style_columns,color=colorofbar)
SanskarB533
How can I add this in zerodha kite
เพิ่มเติม