Fractal bands - FXB.ta.FractalBands

The FXB.ta.FractalBands class calculates fractal bands: the high and low from the last confirmed fractal. It is a bar-based calculation, and requires candle data as an input. Parameters are as follows:

Parameter

Description

period

Number of bars required to form a fractal; the number either side of the mid-point. Defaults to 2, for a standard five-bar battern.

The calculation sets the primary output - GetValue() etc - to the high values. The signal values - GetSignalValue() etc - contain the low values.

The calculation only uses "confirmed" fractals, starting from the time at which a fractal was known to be confirmed. For example, with the standard period:2, when a new high forms that will only become the value of the band 3 bars later.