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 de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.