OPEN-SOURCE SCRIPT
Updated Volume Flow Ratio

Volume Flow Ratio (VFR) Indicator
Overview
The Volume Flow Ratio (VFR) is a sophisticated volume analysis tool that measures current trading volume relative to the maximum volume of the previous period. Unlike traditional volume indicators that show raw volume or simple moving averages, VFR provides context by comparing current activity to recent maximum activity levels.
Core Features
1. Split Period Analysis
- Multiple Timeframe Options:
- Daily: Compares to previous day's maximum
- Weekly: Week-to-week comparison
- NYSE Weekly: Specialized for stock market trading (Monday-Friday only)
- Monthly: Month-to-month analysis
- Quarterly: Quarter-to-quarter perspective
- Yearly: Year-over-year volume comparison
2. Ratio-Based Measurement
- Displays volume as a ratio (0 to 1+) rather than raw numbers
- 1.0 represents volume equal to previous period's maximum
- Example: If previous max was 50,000 contracts:
- Current volume of 25,000 shows as 0.5
- Current volume of 75,000 shows as 1.5
3. Triple Coloring Modes
- Moving Average Based:
- Compares current ratio to its moving average
- Customizable MA period
- Green: Above MA (higher than average activity)
- Red: Below MA (lower than average activity)
- Previous Candle Comparison:
- Simple increase/decrease from previous bar
- Green: Higher than previous bar
- Red: Lower than previous bar
- Candle Color Based:
- Syncs with price action
- Green: Bullish candles (close > open)
- Red: Bearish candles (close < open)
Primary Use Cases
1. Volume Profile Analysis
- Perfect for traders who need to understand when markets are most active
- Helps identify unusual volume spikes relative to recent history
- Useful for timing entries and exits based on market participation
2. Market Activity Traders
Ideal for traders who:
- Need to identify high-liquidity periods
- Want to avoid low-volume periods
- Look for volume breakouts or divergences
- Trade based on institutional participation levels
3. Mean Reversion Traders
Helps identify:
- Overextended volume conditions (potential reversals)
- Volume exhaustion points
- Return to normal volume levels after spikes
4. Momentum Traders
Useful for:
- Confirming trend strength through volume
- Identifying potential trend exhaustion
- Validating breakouts with volume confirmation
Advantages Over Traditional Volume Indicators
1. Contextual Analysis
- Shows relative strength rather than raw numbers
- Easier to compare across different time periods
- Automatically adjusts to changing market conditions
2. Period-Specific Insights
- Respects natural market cycles (daily, weekly, monthly)
- Special handling for NYSE trading days
- Eliminates weekend noise in stock market analysis
3. Flexible Visualization
- Three distinct coloring methods for different trading styles
- Clear reference line at 1.0 for quick analysis
- Histogram style for easy pattern recognition
Best Practices
For Day Traders
- Use Daily split for intraday volume patterns
- MA coloring mode with shorter periods (5-10)
- Focus on ratios during market hours
For Swing Traders
- Weekly or NYSE Weekly splits
- Longer MA periods (15-20)
- Look for sustained volume patterns
For Position Traders
- Monthly or Quarterly splits
- Candle color mode for trend confirmation
- Focus on major volume shifts
Limitations
- Requires one full period to establish baseline
- May be less effective in extremely low volume conditions
- NYSE Weekly mode specific to stock market hours
This indicator is particularly valuable for traders who understand that volume is a crucial component of price action but need a more sophisticated way to analyze it than simple volume bars. It's especially useful for those who trade based on market participation levels and need to quickly identify whether current volume is significant relative to recent history.
Overview
The Volume Flow Ratio (VFR) is a sophisticated volume analysis tool that measures current trading volume relative to the maximum volume of the previous period. Unlike traditional volume indicators that show raw volume or simple moving averages, VFR provides context by comparing current activity to recent maximum activity levels.
Core Features
1. Split Period Analysis
- Multiple Timeframe Options:
- Daily: Compares to previous day's maximum
- Weekly: Week-to-week comparison
- NYSE Weekly: Specialized for stock market trading (Monday-Friday only)
- Monthly: Month-to-month analysis
- Quarterly: Quarter-to-quarter perspective
- Yearly: Year-over-year volume comparison
2. Ratio-Based Measurement
- Displays volume as a ratio (0 to 1+) rather than raw numbers
- 1.0 represents volume equal to previous period's maximum
- Example: If previous max was 50,000 contracts:
- Current volume of 25,000 shows as 0.5
- Current volume of 75,000 shows as 1.5
3. Triple Coloring Modes
- Moving Average Based:
- Compares current ratio to its moving average
- Customizable MA period
- Green: Above MA (higher than average activity)
- Red: Below MA (lower than average activity)
- Previous Candle Comparison:
- Simple increase/decrease from previous bar
- Green: Higher than previous bar
- Red: Lower than previous bar
- Candle Color Based:
- Syncs with price action
- Green: Bullish candles (close > open)
- Red: Bearish candles (close < open)
Primary Use Cases
1. Volume Profile Analysis
- Perfect for traders who need to understand when markets are most active
- Helps identify unusual volume spikes relative to recent history
- Useful for timing entries and exits based on market participation
2. Market Activity Traders
Ideal for traders who:
- Need to identify high-liquidity periods
- Want to avoid low-volume periods
- Look for volume breakouts or divergences
- Trade based on institutional participation levels
3. Mean Reversion Traders
Helps identify:
- Overextended volume conditions (potential reversals)
- Volume exhaustion points
- Return to normal volume levels after spikes
4. Momentum Traders
Useful for:
- Confirming trend strength through volume
- Identifying potential trend exhaustion
- Validating breakouts with volume confirmation
Advantages Over Traditional Volume Indicators
1. Contextual Analysis
- Shows relative strength rather than raw numbers
- Easier to compare across different time periods
- Automatically adjusts to changing market conditions
2. Period-Specific Insights
- Respects natural market cycles (daily, weekly, monthly)
- Special handling for NYSE trading days
- Eliminates weekend noise in stock market analysis
3. Flexible Visualization
- Three distinct coloring methods for different trading styles
- Clear reference line at 1.0 for quick analysis
- Histogram style for easy pattern recognition
Best Practices
For Day Traders
- Use Daily split for intraday volume patterns
- MA coloring mode with shorter periods (5-10)
- Focus on ratios during market hours
For Swing Traders
- Weekly or NYSE Weekly splits
- Longer MA periods (15-20)
- Look for sustained volume patterns
For Position Traders
- Monthly or Quarterly splits
- Candle color mode for trend confirmation
- Focus on major volume shifts
Limitations
- Requires one full period to establish baseline
- May be less effective in extremely low volume conditions
- NYSE Weekly mode specific to stock market hours
This indicator is particularly valuable for traders who understand that volume is a crucial component of price action but need a more sophisticated way to analyze it than simple volume bars. It's especially useful for those who trade based on market participation levels and need to quickly identify whether current volume is significant relative to recent history.
Release Notes
- Added Auto Split ModeRelease Notes
- Upgraded to V6Release Notes
- Added Multiple LevelsRelease Notes
- Added DeltaRelease Notes
- Added Candle Range (TR / Open - Close)Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.