OPEN-SOURCE SCRIPT
Volume-Weighted Fibonacci Pivot

This indicator automatically plots dynamic Fibonacci retracement and extension levels based on a volume-weighted pivot point within a user-defined lookback period or date range. It intelligently calculates a central "pivot" price biased toward high-volume bars, then draws symmetric levels both upward (extensions) and downward (retracements) for balanced confluence analysis.
How It Works (Technical Methodology)
Lookback Period Determination
Multiple filter modes control the data range used for calculations:
"Last X Bars": Fixed number of recent bars (default 400, max 4999).
"Manual Date": User-specified start date.
"Interactive (Chart)": Confirmed start date via input.
"None": Full available history (falls back to max bars).
Optionally, when using "Last X Bars", calculations can pull data from a higher/lower user-selected timeframe via request.security() for multi-timeframe alignment.
A dotted vertical line marks the start point in date-based modes.
Range and Pivot Calculation
Within the selected period:
Highest high and lowest low define the full price range.
Average volume is computed across the period.
Volume-Weighted Pivot: Average close price only from bars where volume > average volume (fallback to simple midpoint if no high-volume bars).
This creates a "smart" central pivot that leans toward areas of greater participation, often aligning with institutional activity.
Fibonacci Level Generation
User-configurable ratios (default: 0.236, 0.382, 0.5, 0.618, 0.786, 1.0, 1.272, 1.414, 1.618).
Levels are calculated symmetrically around the volume-weighted pivot:
Upward: Pivot + (Range × Ratio × Correction Factor) – teal/cyan shades.
Downward: Pivot - (Range × Ratio × Correction Factor) – red shades.
Correction Factor (default 0.5): Scales level spacing for tighter/wider grids without altering ratios.
Only the user-defined number of active lines (default 9) are drawn.
Visual Construction
Central Pivot Line: Thick yellow horizontal line with label showing exact price.
Up/Down Levels: Dashed lines extended into the future, labeled with ratio direction ("Up" or "Dn").
All objects redraw only on the last bar for performance, clearing previous drawings.
Multi-Timeframe Option
When enabled with "Last X Bars":
Pulls high/low/volume data from specified timeframe.
Aligns the pivot and levels to higher-timeframe structure while displaying on current chart – ideal for intraday traders seeking HTF confluence.
How to Use
This tool provides clean, volume-aware Fibonacci grids for identifying potential support/resistance, reversal zones, and targets.
Volume-Weighted Pivot: Often acts as a strong mean reversion level or fair value area.
Upward Levels (Teal): Potential resistance/extensions in bullish moves; watch for reactions on retests.
Downward Levels (Red): Potential support/retracements in bearish moves.
Confluence: High probability when price reacts at levels aligning with other tools (order blocks, pivots, volume profile).
Correction Factor: Lower values (<0.5) for tighter grids in ranging markets; higher (>0.5) for trending markets.
Multi-Timeframe Mode: Use on lower charts (e.g., 15m) with HTF input (e.g., 4H or Daily) to project major structure levels.
Common Setups:
Pullbacks to 0.618–0.786 zones for continuation entries.
Breaks beyond 1.0–1.618 for extension targets.
Reactions near pivot line for mean reversion trades.
Adjust ratios and active line count to match your preferred Fibonacci style (classic retracement vs. extensions).
Disclaimer
This indicator is a technical analysis tool and should be used in conjunction with other forms of analysis. Past performance does not guarantee future results. Always use proper risk management.
How It Works (Technical Methodology)
Lookback Period Determination
Multiple filter modes control the data range used for calculations:
"Last X Bars": Fixed number of recent bars (default 400, max 4999).
"Manual Date": User-specified start date.
"Interactive (Chart)": Confirmed start date via input.
"None": Full available history (falls back to max bars).
Optionally, when using "Last X Bars", calculations can pull data from a higher/lower user-selected timeframe via request.security() for multi-timeframe alignment.
A dotted vertical line marks the start point in date-based modes.
Range and Pivot Calculation
Within the selected period:
Highest high and lowest low define the full price range.
Average volume is computed across the period.
Volume-Weighted Pivot: Average close price only from bars where volume > average volume (fallback to simple midpoint if no high-volume bars).
This creates a "smart" central pivot that leans toward areas of greater participation, often aligning with institutional activity.
Fibonacci Level Generation
User-configurable ratios (default: 0.236, 0.382, 0.5, 0.618, 0.786, 1.0, 1.272, 1.414, 1.618).
Levels are calculated symmetrically around the volume-weighted pivot:
Upward: Pivot + (Range × Ratio × Correction Factor) – teal/cyan shades.
Downward: Pivot - (Range × Ratio × Correction Factor) – red shades.
Correction Factor (default 0.5): Scales level spacing for tighter/wider grids without altering ratios.
Only the user-defined number of active lines (default 9) are drawn.
Visual Construction
Central Pivot Line: Thick yellow horizontal line with label showing exact price.
Up/Down Levels: Dashed lines extended into the future, labeled with ratio direction ("Up" or "Dn").
All objects redraw only on the last bar for performance, clearing previous drawings.
Multi-Timeframe Option
When enabled with "Last X Bars":
Pulls high/low/volume data from specified timeframe.
Aligns the pivot and levels to higher-timeframe structure while displaying on current chart – ideal for intraday traders seeking HTF confluence.
How to Use
This tool provides clean, volume-aware Fibonacci grids for identifying potential support/resistance, reversal zones, and targets.
Volume-Weighted Pivot: Often acts as a strong mean reversion level or fair value area.
Upward Levels (Teal): Potential resistance/extensions in bullish moves; watch for reactions on retests.
Downward Levels (Red): Potential support/retracements in bearish moves.
Confluence: High probability when price reacts at levels aligning with other tools (order blocks, pivots, volume profile).
Correction Factor: Lower values (<0.5) for tighter grids in ranging markets; higher (>0.5) for trending markets.
Multi-Timeframe Mode: Use on lower charts (e.g., 15m) with HTF input (e.g., 4H or Daily) to project major structure levels.
Common Setups:
Pullbacks to 0.618–0.786 zones for continuation entries.
Breaks beyond 1.0–1.618 for extension targets.
Reactions near pivot line for mean reversion trades.
Adjust ratios and active line count to match your preferred Fibonacci style (classic retracement vs. extensions).
Disclaimer
This indicator is a technical analysis tool and should be used in conjunction with other forms of analysis. Past performance does not guarantee future results. Always use proper risk management.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。