PROTECTED SOURCE SCRIPT
Key Levels+ Psvra+ Fvg by Riotwolftrading

Key Levels, PVSRA & FVG Synergy by Riotwolftrading
This Pine Script indicator for TradingView combines Key Levels, Fair Value Gaps (FVGs), Price Volume Spread Analysis (PVSRA), Volume Weighted Average Price (VWAP), and Asian Session Range to create a cohesive tool for traders focusing on price action, volume analysis, and market structure. The synergy of these features helps traders identify high-probability setups by aligning historical support/resistance zones, volume-driven momentum, and price imbalances, with VWAP and Asian Session Range providing trend and range context. This indicator is highly customizable, allowing traders to tailor visuals and settings to their trading style.
Why This Combination?
The integration of Key Levels, FVGs, PVSRA, VWAP, and Asian Session Range addresses the needs of traders who combine price action with volume analysis. Key Levels highlight critical support/resistance zones across multiple timeframes, FVGs pinpoint areas of price inefficiency for potential reversals or continuations, PVSRA reveals market strength through volume-colored candles, VWAP tracks trend direction, and Asian Session Range identifies key intraday ranges. Together, they enable traders to confirm entries and exits with multiple layers of confluence, reducing noise and enhancing decision-making.
Features and Functionality
1. Key Levels
Purpose: Plots historical high, low, and mid levels across daily, weekly, monthly, and yearly timeframes to identify support/resistance zones.
How It Works: Uses request.security to fetch price data (open, high, low) for specified periods. For example:
Daily: Previous day’s high/low and Monday’s high/low.
Weekly: Current and previous week’s high/low.
Monthly: Current and previous month’s high, low, open.
Yearly: Current and previous year’s high, low, open, mid.
Customization: Toggle levels on/off, extend lines, adjust colors, and add labels for clarity.
Usage: Traders can use these levels to identify breakout or reversal zones, especially when aligned with FVGs or high-volume candles.
2. Fair Value Gaps (FVGs)
Purpose: Highlights zones of price imbalance where rapid price moves leave “gaps” with low volume, indicating potential areas for price to revisit.
How It Works: Builds on open-source FVG logic by fadizeidan, with significant enhancements (constituting <10% of the codebase). The algorithm detects gaps by comparing price movements against volume thresholds, filtering insignificant gaps using a custom momentum-based approach. Boxes are drawn on the chart for timeframes like 15m, 90m, or 240m.
Credit: Thanks to fadizeidan for the foundational FVG logic, which we’ve extended with multi-timeframe detection and volume filtering.
Customization: Choose timeframes, toggle boxes, and adjust colors.
Usage: Enter trades when price revisits FVG zones, especially if supported by Key Levels or PVSRA signals.
3. Price Volume Spread Analysis (PVSRA)
Purpose: Colors candles based on volume to highlight market strength or weakness, helping traders confirm price moves.
How It Works: Calculates average volume over a user-defined lookback period. Candles are colored as follows:
Green/Blue: Bullish candles with volume ≥150% or ≥200% of average, indicating strong buying pressure.
Red/Fuchsia: Bearish candles with volume ≥150% or ≥200% of average, indicating strong selling pressure.
Gray/Black: Normal volume candles.
The thresholds are dynamically adjusted to market conditions, improving reliability.
Customization: Adjust lookback period, volume thresholds, and colors.
Usage: Confirm breakouts or reversals at Key Levels or FVGs when high-volume candles (green/blue or red/fuchsia) appear.
4. Volume Weighted Average Price (VWAP)
Purpose: Plots a dynamic average price weighted by volume, serving as a trend or support/resistance indicator.
How It Works: Computes VWAP by summing (price × volume) and dividing by total volume, resetting at user-defined intervals (e.g., session, week). The line updates dynamically on the last bar.
Customization: Choose reset period, toggle visibility, and adjust color.
Usage: Use VWAP to gauge trend direction or identify dynamic support/resistance, especially when price interacts with Key Levels or FVGs.
5. Asian Session Range
Purpose: Marks the high and low of the Asian session to highlight key intraday range levels.
How It Works: Identifies the Asian session (default: 2:00–9:00 Madrid time) using timestamp checks, plotting high/low lines and a box. The range is calculated using intraday price data.
Customization: Adjust timezone, session times, line/box visibility, and colors.
Usage: Trade breakouts or reversals from Asian session highs/lows, especially when aligned with FVGs or high-volume PVSRA candles.
How to Use
Add to Chart: Apply the indicator to a clean chart for optimal visibility.
Configure Settings: Use the inputs menu to:
Enable/disable features (e.g., show only daily Key Levels or 90m FVGs).
Adjust timeframes, colors, and label settings.
Set VWAP reset period or Asian session timezone.
Trading Strategy:
Entries: Look for price approaching a Key Level or FVG, confirmed by a high-volume PVSRA candle (green/blue for longs, red/fuchsia for shorts).
Exits: Target VWAP or the next Key Level, or exit on loss of momentum (normal-volume candles).
Context: Use Asian Session Range to identify intraday bias or breakout levels.
Example: On a 15m chart, enter a long when price revisits a 90m FVG near a daily Key Level, with a green PVSRA candle and price above VWAP. Exit at the next Key Level or VWAP rejection.
Technical Notes
Data Fetching: Uses request.security to pull price and volume data across timeframes, ensuring accurate calculations.
Dynamic Updates: Lines, boxes, and labels update on the last bar to reflect real-time data.
Performance: Optimized for minimal lag, with efficient loops and conditional checks.
Chart Clarity: Outputs (lines, boxes, candle colors) use distinct colors and labels to avoid confusion.
Why It’s Unique
Unlike standalone indicators, this script integrates multiple perspectives (price levels, volume, imbalances, trend) into a single tool, reducing chart clutter and enhancing confluence. The enhanced FVG logic, dynamic PVSRA thresholds, and multi-timeframe Key Levels provide a robust framework for price action traders, distinct from existing indicators.
Acknowledgments
Special thanks to fadizeidan for the open-source FVG logic, which inspired our enhanced implementation. Their code is a minor component (<10%) of this script, with significant improvements in filtering and integration.
Publish Notes
Chart: Published with a clean chart showing only this script’s outputs (Key Levels, FVG boxes, PVSRA candles, VWAP line, Asian Session Range). No additional indicators or drawings are included.
Happy trading! 🚀
This Pine Script indicator for TradingView combines Key Levels, Fair Value Gaps (FVGs), Price Volume Spread Analysis (PVSRA), Volume Weighted Average Price (VWAP), and Asian Session Range to create a cohesive tool for traders focusing on price action, volume analysis, and market structure. The synergy of these features helps traders identify high-probability setups by aligning historical support/resistance zones, volume-driven momentum, and price imbalances, with VWAP and Asian Session Range providing trend and range context. This indicator is highly customizable, allowing traders to tailor visuals and settings to their trading style.
Why This Combination?
The integration of Key Levels, FVGs, PVSRA, VWAP, and Asian Session Range addresses the needs of traders who combine price action with volume analysis. Key Levels highlight critical support/resistance zones across multiple timeframes, FVGs pinpoint areas of price inefficiency for potential reversals or continuations, PVSRA reveals market strength through volume-colored candles, VWAP tracks trend direction, and Asian Session Range identifies key intraday ranges. Together, they enable traders to confirm entries and exits with multiple layers of confluence, reducing noise and enhancing decision-making.
Features and Functionality
1. Key Levels
Purpose: Plots historical high, low, and mid levels across daily, weekly, monthly, and yearly timeframes to identify support/resistance zones.
How It Works: Uses request.security to fetch price data (open, high, low) for specified periods. For example:
Daily: Previous day’s high/low and Monday’s high/low.
Weekly: Current and previous week’s high/low.
Monthly: Current and previous month’s high, low, open.
Yearly: Current and previous year’s high, low, open, mid.
Customization: Toggle levels on/off, extend lines, adjust colors, and add labels for clarity.
Usage: Traders can use these levels to identify breakout or reversal zones, especially when aligned with FVGs or high-volume candles.
2. Fair Value Gaps (FVGs)
Purpose: Highlights zones of price imbalance where rapid price moves leave “gaps” with low volume, indicating potential areas for price to revisit.
How It Works: Builds on open-source FVG logic by fadizeidan, with significant enhancements (constituting <10% of the codebase). The algorithm detects gaps by comparing price movements against volume thresholds, filtering insignificant gaps using a custom momentum-based approach. Boxes are drawn on the chart for timeframes like 15m, 90m, or 240m.
Credit: Thanks to fadizeidan for the foundational FVG logic, which we’ve extended with multi-timeframe detection and volume filtering.
Customization: Choose timeframes, toggle boxes, and adjust colors.
Usage: Enter trades when price revisits FVG zones, especially if supported by Key Levels or PVSRA signals.
3. Price Volume Spread Analysis (PVSRA)
Purpose: Colors candles based on volume to highlight market strength or weakness, helping traders confirm price moves.
How It Works: Calculates average volume over a user-defined lookback period. Candles are colored as follows:
Green/Blue: Bullish candles with volume ≥150% or ≥200% of average, indicating strong buying pressure.
Red/Fuchsia: Bearish candles with volume ≥150% or ≥200% of average, indicating strong selling pressure.
Gray/Black: Normal volume candles.
The thresholds are dynamically adjusted to market conditions, improving reliability.
Customization: Adjust lookback period, volume thresholds, and colors.
Usage: Confirm breakouts or reversals at Key Levels or FVGs when high-volume candles (green/blue or red/fuchsia) appear.
4. Volume Weighted Average Price (VWAP)
Purpose: Plots a dynamic average price weighted by volume, serving as a trend or support/resistance indicator.
How It Works: Computes VWAP by summing (price × volume) and dividing by total volume, resetting at user-defined intervals (e.g., session, week). The line updates dynamically on the last bar.
Customization: Choose reset period, toggle visibility, and adjust color.
Usage: Use VWAP to gauge trend direction or identify dynamic support/resistance, especially when price interacts with Key Levels or FVGs.
5. Asian Session Range
Purpose: Marks the high and low of the Asian session to highlight key intraday range levels.
How It Works: Identifies the Asian session (default: 2:00–9:00 Madrid time) using timestamp checks, plotting high/low lines and a box. The range is calculated using intraday price data.
Customization: Adjust timezone, session times, line/box visibility, and colors.
Usage: Trade breakouts or reversals from Asian session highs/lows, especially when aligned with FVGs or high-volume PVSRA candles.
How to Use
Add to Chart: Apply the indicator to a clean chart for optimal visibility.
Configure Settings: Use the inputs menu to:
Enable/disable features (e.g., show only daily Key Levels or 90m FVGs).
Adjust timeframes, colors, and label settings.
Set VWAP reset period or Asian session timezone.
Trading Strategy:
Entries: Look for price approaching a Key Level or FVG, confirmed by a high-volume PVSRA candle (green/blue for longs, red/fuchsia for shorts).
Exits: Target VWAP or the next Key Level, or exit on loss of momentum (normal-volume candles).
Context: Use Asian Session Range to identify intraday bias or breakout levels.
Example: On a 15m chart, enter a long when price revisits a 90m FVG near a daily Key Level, with a green PVSRA candle and price above VWAP. Exit at the next Key Level or VWAP rejection.
Technical Notes
Data Fetching: Uses request.security to pull price and volume data across timeframes, ensuring accurate calculations.
Dynamic Updates: Lines, boxes, and labels update on the last bar to reflect real-time data.
Performance: Optimized for minimal lag, with efficient loops and conditional checks.
Chart Clarity: Outputs (lines, boxes, candle colors) use distinct colors and labels to avoid confusion.
Why It’s Unique
Unlike standalone indicators, this script integrates multiple perspectives (price levels, volume, imbalances, trend) into a single tool, reducing chart clutter and enhancing confluence. The enhanced FVG logic, dynamic PVSRA thresholds, and multi-timeframe Key Levels provide a robust framework for price action traders, distinct from existing indicators.
Acknowledgments
Special thanks to fadizeidan for the open-source FVG logic, which inspired our enhanced implementation. Their code is a minor component (<10%) of this script, with significant improvements in filtering and integration.
Publish Notes
Chart: Published with a clean chart showing only this script’s outputs (Key Levels, FVG boxes, PVSRA candles, VWAP line, Asian Session Range). No additional indicators or drawings are included.
Happy trading! 🚀
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.