Automatic Fibonacci Levels
Feb 26, 2026

The Automatic Fibonacci Levels indicator is an overlay tool that dynamically detects the dominant swing high and swing low within the visible chart area to provide real-time Fibonacci retracement and extension analysis. It automatically updates its grid as you scroll or zoom, identifying key institutional entry zones and extension targets without requiring manual anchor placement.
Usage
The indicator can be used to identify trend structure and potential reversal or continuation points based on current market context. When you zoom into a specific range, the tool recalculates to find the highest and lowest points visible on your screen.
- Bullish Trend: Identified when the swing low occurs before the swing high. The grid projects retracement levels downward from the high and extension targets upward.
- Bearish Trend: Identified when the swing high occurs before the swing low. The grid projects retracement levels upward from the low and extension targets downward.
- Optimal Trade Entry (OTE): Traders can look for entries within the highlighted "Entry Zone" (61.8%–78.6%), often used in SMC/ICT methodologies.
- Targeting: Use the "Target Zone" (-50% to -61.8%) and the four labeled Take-Profit (TP) levels to manage exits.
Details
Unlike standard Fibonacci tools that use fixed lookback periods (pivots) or manual drawings, this script utilizes the chart.left_visible_bar_time and chart.right_visible_bar_time variables. This ensures that the Fibonacci calculation is always relevant to the price action you are currently viewing. The trend direction is determined by the chronological sequence of the detected high and low, ensuring the grid orientation matches the market structure.
Settings
Main Settings
- Show All Elements: Master toggle to show or hide all Fibonacci visuals.
- Show Diagonal Swing Line: Draws a connecting line between the detected swing high and low.
- Line Width/Style: Customizes the visual appearance of the Fibonacci levels.
- Label Offset: Adjusts how far to the right of the current price the labels appear.
Fibonacci Levels
- Individual Levels (16 options): Toggle specific retracement and extension ratios ranging from 200% down to -100%.
Zones & TP
- Show Entry/Target Zone: Highlights the OTE and extension target areas with semi-transparent boxes.
- Show TP Labels: Displays TP1–TP4 markers at predefined Fibonacci levels.
- Show Level % Labels: Adds the specific percentage value next to each line.
Dashboard & Visuals
- Show Dashboard: Displays a panel with trend bias, swing range, and current zone status.
- Theme: Optimizes colors for "Dark", "Light", or "Auto" (detected from background).
FAQ
How do I access the Automatic Fibonacci Levels? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why does the grid move when I scroll the chart? The indicator is designed to analyze the visible range. As you scroll, new highs or lows enter the frame, and the indicator recalculates to ensure your analysis remains focused on the current view.
Are the Entry and Target zone alerts real-time? Yes, alerts fire when price closes within the specified zones for the first time, helping you monitor levels without staying glued to the screen.
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.