Skip to Content

Fractals

Fractals are Bill Williams fractals: points above local highs and below local lows of the price. They mark the bars where the price reversed and help you see the nearest levels it bounced off.

The indicator is drawn over the price chart.

How it is calculated

Period is the window width in bars. On each side of the bar being checked, n = (Period − 1) / 2 bars are taken (the fractional part is dropped, n is at least 1): with period 5, that is 2 bars on the left and on the right.

  • An up fractal (Up) is a bar high strictly above the highs of n bars on the right and n bars on the left. Between the bar and those n left bars, up to four bars with the same or lower high are allowed (a flat top).
  • A down fractal (Down) is the same with lows.

The point is placed at the bar’s high or low. A fractal appears only once there are n more bars to the right of the bar, so the last n bars of the chart have no fractals.

The calculation matches the Williams Fractals indicator in TradingView.

Parameters

ParameterDescriptionDefault
PeriodThe window width in bars, including the bar itself. At least 1.5

Plots

ParameterDescriptionDefault
UpUp fractals.Green
DownDown fractals.Red

Style

Each point series has the Plot (show the points), Label (show the last value on the right scale) and Color fields. The size of the points depends on the bar width.

How to add an indicator to the chart is described in Adding an indicator; parameters are changed in the indicator manager.

Last updated on