OPEN-SOURCE SCRIPT
Williams Fractals by YoungA

Williams Fractals - Dynamic Period Indicator
This indicator identifies fractal patterns on the chart based on Bill Williams' fractal theory. A fractal is a price formation where the middle candle has the highest high (for down fractal) or lowest low (for up fractal) compared to surrounding candles.
Key Features:
- Customizable period - set any number of bars on each side (n=1 for 3-bar fractal, n=2 for 5-bar fractal, etc.)
- Down Fractal (▼) - white triangle above the bar indicates a local high
- Up Fractal (▲) - white triangle below the bar indicates a local low
- Non-repainting - fractals appear only after the required number of confirmation bars have closed
- 50% transparency for better chart visibility
How it works:
The indicator checks if the central bar's high/low is the highest/lowest among n bars to the left and n bars to the right. Fractals are displayed with an offset to show exactly where the pattern formed.
Perfect for:
✓ Identifying potential reversal points
✓ Drawing support/resistance levels
✓ Combined with other Bill Williams indicators (Alligator, Awesome Oscillator)
✓ Multi-timeframe analysis
Coded by: YoungA
This indicator identifies fractal patterns on the chart based on Bill Williams' fractal theory. A fractal is a price formation where the middle candle has the highest high (for down fractal) or lowest low (for up fractal) compared to surrounding candles.
Key Features:
- Customizable period - set any number of bars on each side (n=1 for 3-bar fractal, n=2 for 5-bar fractal, etc.)
- Down Fractal (▼) - white triangle above the bar indicates a local high
- Up Fractal (▲) - white triangle below the bar indicates a local low
- Non-repainting - fractals appear only after the required number of confirmation bars have closed
- 50% transparency for better chart visibility
How it works:
The indicator checks if the central bar's high/low is the highest/lowest among n bars to the left and n bars to the right. Fractals are displayed with an offset to show exactly where the pattern formed.
Perfect for:
✓ Identifying potential reversal points
✓ Drawing support/resistance levels
✓ Combined with other Bill Williams indicators (Alligator, Awesome Oscillator)
✓ Multi-timeframe analysis
Coded by: YoungA
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.