Auto Fibonacci Extensions, Retracements & Pivot Points 



Structure, levels, and time - unified in one Fibonacci framework.

Fibonacci analysis is one of the most widely used approaches in technical trading - and one of the most inconsistently applied. Drawing levels manually introduces subjectivity, inconsistency, and timing delays. This script removes all of that. Swing detection is automatic, levels are drawn the moment structure confirms, and the entire framework updates in real time as the market evolves.


Automatic Swing Detection

The foundation of every Fibonacci tool in this script is automatic swing detection using ATR-based deviation and bar depth filtering. Rather than requiring manual anchor points, the script continuously identifies meaningful price swings - filtering out minor fluctuations while capturing the structural moves that matter.

Deviation controls the minimum price movement required to confirm a new swing, scaled to current volatility. Depth controls the minimum number of bars needed to validate a swing high or low. Both are fully configurable, allowing the detection sensitivity to be tuned to any market, asset class, or timeframe.


Fibonacci Tool Selection

Five modes are available, each addressing a different aspect of Fibonacci analysis:

Pivot Points - Structure-based reference levels derived from the prior period's high, low, and close. Updated automatically when the higher timeframe closes.

Retracements - Measures pullback levels within the most recent confirmed swing. Identifies where price is likely to find support or resistance on a correction before the trend resumes.

Retracements + Pivot Points - Combines internal retracement levels with structural pivot references, allowing confluence zones between the two frameworks to be identified at a glance.

Extensions - Projects continuation targets beyond the current swing range. Identifies where price may reach if the trend extends, based on the relationship between the prior move and the current structure.

Extensions + Pivot Points - Combines projected extension targets with pivot levels, highlighting where extensions align with structural references - often the highest-probability reaction zones on the chart.


Fibonacci Pivot Points

Pivot Points are calculated from the prior period's high, low, and close using a Fibonacci-weighted methodology, producing a central Pivot Point plus support and resistance levels at 0.382, 0.618, and 1.000 of the prior range. A fully configurable auto-mode selects the appropriate higher timeframe based on the current chart - intraday charts use daily or weekly pivots, daily charts use monthly, and weekly or monthly charts use yearly - so levels are always contextually relevant without manual adjustment.

An optional "Only Relevant Levels" filter displays only the levels on the correct side of the Pivot Point relative to current price, reducing visual noise. Historical pivot periods and line extension are both supported.


Fibonacci Time Zones

Most Fibonacci tools focus on where price may react. Time Zones add the dimension of when. Anchored to the most recent confirmed swing, vertical lines are projected forward at Fibonacci sequence intervals - 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 bars from the swing origin. These mark windows in time where price reactions, accelerations, or trend changes have historically shown elevated probability. Labels display the Fibonacci sequence number at each zone for immediate reference.


ZigZag Structure Visualization

An optional ZigZag overlay connects confirmed swing highs and lows with straight lines, filtering market noise and clarifying dominant price structure. Confirmed swing highs and lows are marked with directional labels. Temporary, unconfirmed swings are displayed in a distinct colour with a clear warning that they are provisional and subject to update until structure confirms - preventing misinterpretation of developing structure.


Volatility AddOns

High-volatility bars - where the bar's range exceeds ATR multiplied by a configurable threshold - are flagged with a ⚡ marker. These bars often accompany breakouts, news-driven moves, or shifts in volatility regime. The ATR length and multiplier are independently configurable. An alert fires when high volatility is detected.


Volume AddOns

Volume spikes - bars where traded volume exceeds the volume moving average by a configurable multiple - are flagged with a 🚦 marker as potential exhaustion signals. Extreme volume often marks climactic moves where the prevailing trend may be running out of fuel rather than accelerating. The default threshold uses 4.669 - a mathematically significant constant - as the multiplier.

Volume-weighted bar coloring applies Fibonacci-derived thresholds to distinguish high-conviction bars from low-participation moves. Deep green and dark red mark bars where volume significantly exceeded the average. Aqua and orange flag bars where volume was unusually low, signalling weak commitment behind the price move.


All Fibonacci levels are individually toggleable with configurable colours. Label format - levels, prices, or both - and label placement are fully configurable. Line extension, historical Fibonacci periods, and historical pivot point display are all independently controlled.