Created by Charles Le Beau, the Chandelier Exit is an adjusted Average True Range (ATR) offset from price that is is typically used for stop-loss and can be computed for both long or short types. [Discuss]
// usage IEnumerable<ChandelierResult> results = quotes.GetChandelier(lookbackPeriods, multiplier, type);
int - Number of periods (
N) for the lookback evaluation. Default is 22.
double - Multiplier number must be a positive value. Default is 3.
ChandelierType - Direction of exit. See ChandelierType options below. Default is
Historical quotes requirements
You must have at least
N+1 periods of
quotes to cover the warmup periods.
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.
ChandelierType.Long - Intended as stop loss value for long positions. (default)
ChandelierType.Short - Intended as stop loss value for short positions.
- This method returns a time series of all available indicator values for the
- 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
Nperiods will have
nullChandelier values since there’s not enough data to calculate.
DateTime - Date from evaluated
double - Exit line
See Utilities and helpers for more information.
Results can be further processed on
ChandelierExit with additional chain-enabled indicators.
// example var results = quotes .GetChandelier(..) .GetEma(..);
This indicator must be generated from
quotes and cannot be generated from results of another chain-enabled indicator or method.