Anchored Auto Fibonacci Retracement with Alerts
Jul 29, 2024

The Anchored Auto Fibonacci Retracement indicator automatically generates and updates Fibonacci levels based on a user-selected anchor point. This tool streamlines technical analysis by dynamically adjusting the retracement levels as price creates new highs or lows relative to the chosen starting candle.
Usage
To use the indicator, select a starting candle via the chart interaction or settings. The tool automatically detects whether to draw a bullish or bearish retracement by analyzing subsequent price action. If new highs are formed after the anchor, it anchors to the low; if new lows are formed, it anchors to the high.
As price expands, the Fibonacci levels adjust automatically to encompass the entire move. If price retraces fully beyond the anchor point (mitigation), the levels become static, signifying the end of that specific price move's relevance. Users can also enable the "Freeze" feature to stop expansion once a certain retracement level is reached after a grace period.
Details
The script is designed to handle dynamic market environments where manual Fibonacci drawing would require constant adjustment. It supports up to twelve customizable levels. A key implementation detail is the "Mitigation" logic: once the originating price is breached, the script ceases to update its calculations to maintain the historical context of the broken move. This indicator was inspired by the Fibonacci Toolkit by LuxAlgo and utilizes optimized alert logic to minimize the need for multiple alert configurations.
Settings
Main Settings
- Start: Select the anchor candle for the Fibonacci retracement.
- Extend Retracement Levels: When enabled, level lines extend beyond the current candle into the future using dashed lines.
- Freeze level/Grace: Stops the Fibonacci expansion once price retraces to a specific level after a set number of bars.
Retracement Levels
- Level Visibility: Checkboxes to toggle up to 12 different Fibonacci levels.
- Level Value: Numerical input for the specific Fibonacci ratio (e.g., 0.618).
- Color: Customizable color picker for each level's line.
- Alert: Individual toggle and text box for per-level retracement alerts.
Other Alerts
- Alert on expansion: Triggers when price moves further from the anchor, causing levels to adjust.
- Alert on mitigation: Triggers when the Fibonacci levels are fully retraced.
- Alert on freeze/stop: Notifies the user when the levels stop extending due to price action.
FAQ
How do I access Anchored Auto Fibonacci Retracement?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I set alerts for specific levels?
Yes, each level has a dedicated alert checkbox and a custom message field. When price crosses a visible level with an active alert, a notification will trigger.
Why did the Fibonacci levels stop moving?
The levels stop adjusting if the "Freeze" level is reached or if the anchor point is "mitigated" (price pulls back beyond the starting point). This preserves the structure for analysis even after the move is completed.
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.