BNF VWAP & MA
Jun 10, 2020

The BNF VWAP & MA indicator provides a comprehensive analysis tool for the Bank Nifty index by combining volume-weighted calculations of its constituent stocks with customizable moving averages. It aims to help traders analyze the underlying volume dynamics driving the index through a specialized VWAP and dual moving average system.
Usage
The indicator can be used to identify trend direction and potential entry or exit points based on the relationship between price, the custom VWAP, and moving averages.
- Bank Nifty VWAP: The script calculates a custom VWAP using the specific weights of Bank Nifty constituent stocks (e.g., HDFCBANK, ICICIBANK, AXISBANK, etc.). This provides a more accurate representation of the volume-weighted average price of the index components.
- Moving Average Crossovers: Users can enable two separate moving averages. A common strategy involves looking for crossovers between the two MAs or observing when the price crosses the main MA.
- Price vs. VWAP: The script plots "LONG" and "SHORT" labels when the price crosses above or below the calculated VWAP line, respectively.
- Alerts: Integrated alerts trigger when moving averages cross or when the price interacts with the VWAP, allowing for automated monitoring.
Details
The indicator's core logic relies on a weighted volume calculation. It pulls volume data from the top 12 Bank Nifty stocks and applies their respective index weights (ranging from HDFC Bank at ~32.58% to PNB at ~0.50%). This weighted volume is then used to derive a "Weighted Index Volume," which forms the basis for the custom VWAP calculation.
The moving average function is highly versatile, supporting nine different types: SMA, EMA, WMA, TEMA, RMA, HullMA, SWMA, VWAP, and ALMA. Additionally, users can choose to "Refine" these averages using volume data, effectively turning standard MAs into volume-weighted versions.
Settings
General Settings
- Use Current Chart Resolution?: When checked, the moving averages use the timeframe of the current chart.
- Use Different Timeframe?: Allows the selection of a specific timeframe for calculations if the above box is unchecked.
- Optional Values 1 & 2: Parameters specifically for the ALMA (Arnaud Legoux Moving Average) offset and sigma.
- Use Volume to Refine?: When enabled, it applies volume weighting to the selected moving average type.
Moving Averages
- UMA Main Source: The price source for the first moving average (default is close).
- UMA Main Moving Average Length: The lookback period for the first moving average.
- UMA Main Type: Selection between 9 different types of moving averages.
- Want to use a Second MA: Toggle to display and calculate a second moving average.
- Show Dots on Cross of Both MA's: Displays visual markers on the chart when the two moving averages intersect.
Volume & VWAP
- Use Current Chart Resolution? (Volume): Determines the timeframe used for the constituent stocks' volume data.
- VWAP Period: The lookback period for the custom Bank Nifty VWAP calculation.
FAQ
How do I access BNF VWAP & MA?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I use this for stocks outside the Bank Nifty?
While the moving average components can be applied to any ticker, the VWAP calculation is hardcoded to use Bank Nifty constituent stocks (HDFC Bank, ICICI Bank, etc.). Therefore, the VWAP line is specifically designed for Bank Nifty analysis.
What do the "LONG" and "SHORT" labels signify?
These labels appear when the price crosses over (Long) or under (Short) the custom Bank Nifty VWAP line, suggesting a shift in momentum relative to the volume-weighted average price of the index components.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.