OPEN-SOURCE SCRIPT
Updated ST Fractals With Percentage Difference

This indicator identifies Williams Fractals on your price chart, helping traders spot potential reversal points and short-term highs and lows. This changes default value to 1 and adds percentage difference similar to ST Fractals option on MT5
How It Works:
Up Fractals (▲): Plotted above a candle that is higher than its surrounding candles — a potential short-term top.
Down Fractals (▼): Plotted below a candle that is lower than its surrounding candles — a potential short-term bottom.
Fractals are only drawn if the price difference from the next candle exceeds a minimum percentage, to avoid signals caused by small fluctuations.
The script ensures that both up and down fractals never appear on the same candle, keeping your chart clear.
Settings:
Periods (n): Determines how many candles before and after are considered to find a fractal. Default: 2.
Min % Difference: Filters out insignificant fractals by requiring a minimum difference from the next candle. Default: 0.01%.
Usage Tips:
Can be used to identify support and resistance levels.
Often combined with trend indicators or moving averages to confirm reversals.
Works best in markets with clear trends or volatility, rather than very flat markets.
Visuals:
Green triangle ▲ → Up Fractal (potential top)
Red triangle ▼ → Down Fractal (potential bottom)
How It Works:
Up Fractals (▲): Plotted above a candle that is higher than its surrounding candles — a potential short-term top.
Down Fractals (▼): Plotted below a candle that is lower than its surrounding candles — a potential short-term bottom.
Fractals are only drawn if the price difference from the next candle exceeds a minimum percentage, to avoid signals caused by small fluctuations.
The script ensures that both up and down fractals never appear on the same candle, keeping your chart clear.
Settings:
Periods (n): Determines how many candles before and after are considered to find a fractal. Default: 2.
Min % Difference: Filters out insignificant fractals by requiring a minimum difference from the next candle. Default: 0.01%.
Usage Tips:
Can be used to identify support and resistance levels.
Often combined with trend indicators or moving averages to confirm reversals.
Works best in markets with clear trends or volatility, rather than very flat markets.
Visuals:
Green triangle ▲ → Up Fractal (potential top)
Red triangle ▼ → Down Fractal (potential bottom)
Release Notes
change the short nameRelease Notes
change default inputOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.