Williams Fractal
Created by Larry Williams, Fractal is a retrospective price pattern that identifies a central high or low point chevron. [Discuss] 💬

// C# usage syntax
IEnumerable<FractalResult> results =
quotes.GetFractal(windowSpan);
Parameters
windowSpan int - Evaluation window span width (S). Must be at least 2. Default is 2.
endType EndType - Determines whether Close or High/Low are used to find end points. See EndType options below. Default is EndType.HighLow.
The total evaluation window size is 2×S+1, representing ±S from the evaluation date.
Historical quotes requirements
You must have at least 2×S+1 periods of quotes to cover the warmup periods; however, more is typically provided since this is a chartable candlestick pattern.
quotes is a collection of generic TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
EndType options
EndType.Close - Chevron point identified from Close price
EndType.HighLow - Chevron point identified from High and Low price (default)
Response
IEnumerable<FractalResult>
- This method returns a time series of all available indicator values for the
quotesprovided. - It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first and last
Speriods inquotesare unable to be calculated since there’s not enough prior/following data.
👉 Repaint warning: this price pattern uses future bars and will never identify a
fractalin the lastSperiods ofquotes. Fractals are retroactively identified.
FractalResult
Date DateTime - Date from evaluated TQuote
FractalBear decimal - Value indicates a high point; otherwise null is returned.
FractalBull decimal - Value indicates a low point; otherwise null is returned.
Utilities
See Utilities and helpers for more information.
Chaining
This indicator is not chain-enabled and must be generated from quotes. It cannot be used for further processing by other chain-enabled indicators.