OPEN-SOURCE SCRIPT
Fractal Structure Auto Fibo

Fractal Structure Auto Fibo
This tool is designed for price action traders and structural analysts who want to optimize their charting. It automatically identifies valid market swings using fractal logic, draws clear ZigZag lines, and automatically draws Fibonacci retracement levels for the most recent trading range.
Key Features
Dynamic Fractal Detection: Identifies valid swing peaks and troughs based on a user-defined review period (n). It filters out market noise and visually marks confirmed swing points with clear arrows (⮝ / ⮟).
- The difference from other Fractal indicators is that it scans fractal levels; if there are multiple consecutive highs or lows, it selects the highest/lowest as the main fractal level. Eliminate structural doubts.
Draw a live ZigZag map: Connect confirmed structural points to give you a clear, unambiguous view of the current market trend.
Smart automatic Fibonacci: Eliminate the need to manually draw Fibonacci retracement levels!


Automatically identify the nearest swing peaks and troughs.
Automatically reverse based on the current trend (0.0 is at the peak in an uptrend to measure corrections, and vice versa).
Extend dashed Fibonacci levels forward to the current candle to create a clean, uncluttered chart.
Settings & Customization
Fractal Period (n): Determines the sensitivity of the pivot points. Larger numbers filter out small corrections for macro structure, while smaller numbers capture small swings.
Automatic Fibonacci On/Off: Easily turn the Fibonacci display on or off to keep your chart clean. Includes customizable line and text colors.
For Developers (Open Source)
The code is highly optimized using Pine Script v5 array to manage drawing objects (Lines and Labels). It automatically removes old Fibonacci levels and dynamically redraws new ones, ensuring your platform doesn't reach its maximum line limit. Feel free to copy this script to add your own order conditions, alerts, or advanced SMC filters!
Happy using the script and successful trading!
This tool is designed for price action traders and structural analysts who want to optimize their charting. It automatically identifies valid market swings using fractal logic, draws clear ZigZag lines, and automatically draws Fibonacci retracement levels for the most recent trading range.
Key Features
Dynamic Fractal Detection: Identifies valid swing peaks and troughs based on a user-defined review period (n). It filters out market noise and visually marks confirmed swing points with clear arrows (⮝ / ⮟).
- The difference from other Fractal indicators is that it scans fractal levels; if there are multiple consecutive highs or lows, it selects the highest/lowest as the main fractal level. Eliminate structural doubts.
Draw a live ZigZag map: Connect confirmed structural points to give you a clear, unambiguous view of the current market trend.
Smart automatic Fibonacci: Eliminate the need to manually draw Fibonacci retracement levels!
Automatically identify the nearest swing peaks and troughs.
Automatically reverse based on the current trend (0.0 is at the peak in an uptrend to measure corrections, and vice versa).
Extend dashed Fibonacci levels forward to the current candle to create a clean, uncluttered chart.
Settings & Customization
Fractal Period (n): Determines the sensitivity of the pivot points. Larger numbers filter out small corrections for macro structure, while smaller numbers capture small swings.
Automatic Fibonacci On/Off: Easily turn the Fibonacci display on or off to keep your chart clean. Includes customizable line and text colors.
For Developers (Open Source)
The code is highly optimized using Pine Script v5 array to manage drawing objects (Lines and Labels). It automatically removes old Fibonacci levels and dynamically redraws new ones, ensuring your platform doesn't reach its maximum line limit. Feel free to copy this script to add your own order conditions, alerts, or advanced SMC filters!
Happy using the script and successful trading!
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.