Chandelier exit
How the chandelier exit hangs a stop at a multiple of the average true range below the highest high, and another above the lowest low, and how to use it in a QTSurfer strategy.
The chandelier exit, by Chuck LeBeau, hangs a stop from the highest high of the last N bars, at a multiple of the average true range below it, for a long position; and another from the lowest low, above it, for a short one.
Try it on a series below and change the period and the multiplier.
The series are samples, synthetic ones and real crypto ones. They show how the indicator behaves, not what it earns. The lines are computed in your browser by the engine’s own indicator class, so they are the lines a strategy reads.
What it computes
long exit = highest high of the last N bars − multiplier × ATR(N)
short exit = lowest low of the last N bars + multiplier × ATR(N) The defaults are 22 and 3. The engine rejects a negative multiplier when it builds the indicator. The main line it registers is the long exit, and the short exit comes beside it as ShortExit. The first value is on update N, and the chart draws from there.
Reading it
- Each line is a ratchet in a trend: in a rise the long exit climbs with the highest high and never falls while the high holds. It falls when the high leaves the window or the range widens.
- The close breaks them often. On the real series of the chart, with the defaults, the close is below the long exit on 26 % to 31 % of the bars and above the short exit on 24 % to 28 %.
- The multiplier is the one number to tune: 3 is the usual; a smaller one stops out sooner.
In a strategy
uses pro.chandelierExit
setup:
chandelierExit(22, 3) chandelierExit(22, 3) registers chand22_3 (the long exit), with chand22_3ShortExit beside it. In Java the class is ChandelierExitRTIndicator, in com.wualabs.qtsurfer.engine.indicators.trend.pro, and a group takes it with indicators.add("chand22_3", new ChandelierExitRTIndicator(22, 3)).
The period and the multiplier are parameters, so a parameter sweep can explore them, and walk-forward analysis tells you whether what it found holds outside the sample, which is the defence against overfitting.
This is a pro indicator: it comes with the Pro and Elite plans, and a strategy brings it in with a uses line (see the QTScript guide). It reads whole bars, so it belongs in a kline strategy.
Related
- SuperTrend: a stop that follows the average range and flips.
- Chande Kroll stop: another stop from the extremes and the average range.
- Donchian channel: the highest high and lowest low it hangs from.
- QTScript indicators and Java indicators: every indicator a strategy can call, with its forms and the names it registers.