// Nombres de bougies constituant la fractale (impair)
Ncandles=5
// Nombres de bougies de chaque côté de la bougie extrême
Nside=(Ncandles-1)/2
// Définition de la fractale supérieure
fractal=high[Nside]>=highest[Ncandles](high)
// Beispielcode Screener
SCREENER[fractal[5]]
Bear in mind that Fractals appear on candlesticks in the past, so even scanning a fractal occurrence 5 bars ago doesn’t mean that the fractal will be displayed 5 bars ago from the current bar.