PROTECTED SOURCE SCRIPT
BankNifty Aggregate Weighted OBV

Description-
This indicator calculates the aggregate On Balance Volume (OBV) of the entire Bank Nifty Index by analyzing its 12 individual constituents rather than the index futures volume.
Why is this different?
Standard OBV on the Bank Nifty Index usually analyzes the volume of the Index Futures or the raw index volume (which can be inaccurate or derivative-heavy). This script queries the real-time volume and price action of the 12 specific banks that make up the index (HDFC, ICICI, SBI, Axis, Kotak, etc.).
How it works-
Weighted Calculation:- It calculates the Net Flow (Volume * Weightage) for every single bank for the current bar.
Aggregation:- It sums the Net Flow of all 12 banks to create a "Total Sector Flow."
Accumulation:- It generates the OBV line based on this aggregated sector flow.
Normalization:- Unlike simple summation scripts, this calculates flow per bar before accumulating, ensuring that stocks with longer trading histories do not skew the data.
Features:
Customizable Weights:- Users can adjust the weightage of each bank if NSE rebalances the index.
Toggle Constituents:- You can turn specific banks on/off to see their impact.
Signal Line:- Includes an SMA/EMA signal line to help identify volume trend reversals.
Trend Coloring:- The fill color changes (Green/Red) based on the OBV's position relative to the signal line.
How to use:
Trend Confirmation: If Bank Nifty price is rising but this Weighted OBV is falling, it indicates a divergence and potential weakness in the move (lack of institutional participation).
Breakouts: Use the Signal Line crossover to validate breakout moves.
This indicator calculates the aggregate On Balance Volume (OBV) of the entire Bank Nifty Index by analyzing its 12 individual constituents rather than the index futures volume.
Why is this different?
Standard OBV on the Bank Nifty Index usually analyzes the volume of the Index Futures or the raw index volume (which can be inaccurate or derivative-heavy). This script queries the real-time volume and price action of the 12 specific banks that make up the index (HDFC, ICICI, SBI, Axis, Kotak, etc.).
How it works-
Weighted Calculation:- It calculates the Net Flow (Volume * Weightage) for every single bank for the current bar.
Aggregation:- It sums the Net Flow of all 12 banks to create a "Total Sector Flow."
Accumulation:- It generates the OBV line based on this aggregated sector flow.
Normalization:- Unlike simple summation scripts, this calculates flow per bar before accumulating, ensuring that stocks with longer trading histories do not skew the data.
Features:
Customizable Weights:- Users can adjust the weightage of each bank if NSE rebalances the index.
Toggle Constituents:- You can turn specific banks on/off to see their impact.
Signal Line:- Includes an SMA/EMA signal line to help identify volume trend reversals.
Trend Coloring:- The fill color changes (Green/Red) based on the OBV's position relative to the signal line.
How to use:
Trend Confirmation: If Bank Nifty price is rising but this Weighted OBV is falling, it indicates a divergence and potential weakness in the move (lack of institutional participation).
Breakouts: Use the Signal Line crossover to validate breakout moves.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Chaitanya M.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Chaitanya M.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.