shijithlal

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 .

There is a similar script by @daytraderph which is built for Bank Nifty (custom volume ) . I took the same and built for Nfity.

Nifty has 50 stocks and you cant call security method more than 40 times from one Pine script, so this is the limitation of this script. It consider top 40 stocks and find the volume (which contribute pretty much around 95% of the volume ) and convert the same to 100 %
Release Notes: Updating chart
Release Notes: Updating chart
Release Notes: New weightage updated
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

will it update automatically as the nifty 50 average weightage stocks changes?
+21 Reply
Thank You, Getting Memory limit excided error. What is the recomended time frame to load this chart?
+5 Reply
shijithlal tsghosh
@tsghosh, I am also getting the issue, still working on the same to solve it.
+1 Reply
Pls add also moving Average in this scipt
Reply
working very nice...
10x
Reply
Nice work ! I understand the limitation of 40 calls from PINE script to security. But how you are sure that this contributes 95% ? is it from any NSE data ?
Reply
but the weightages change everymonth...isnt it ? ..your values could be abit off
Reply
if you can make a script which take volume of IND50US, onanda, and config it with time of nifty 50, indian opening and closing time, will be great.
Reply
V := V + (V * 4.95 / 100)

what is the reason behind choosing the 4.95 value ?
Reply
@kp03, As of now the total volume calculated with limited scripts (because of max security call issue) will come to a number and adding 4.95 % of the same to it will give 100 %. That is the logic
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