Chandelier Exit
Where to put a trailing stop, from the recent extreme and the market’s typical move.
What it measures
Section titled “What it measures”The long exit hangs below the highest high of the window by multiplier × ATR; the short exit sits above the lowest low by the same distance.
How traders read it
Section titled “How traders read it”Traders holding a long position exit when the price closes below the long exit, and the reverse for a short. It is a way to let a trend run while protecting gains, not an entry signal.
Formula
Section titled “Formula”long exit = highest high of the last periods bars − multiplier × ATR(periods)short exit = lowest low of the last periods bars + multiplier × ATR(periods)Settings and output
Section titled “Settings and output”Call: chandelierExit(periods, multiplier)
| Setting | Chart default |
|---|---|
periods: Periods |
22 |
multiplier: Multiplier |
3 |
What you get: a list of 2, in this order: 1. a number (“chandelierExit Short”); 2. a number (“chandelierExit Long”).
Warm-up: with chandelierExit(22, 3), it asks for 22 bars of history and a run-up of 44, and its first value came on bar 23 of the example data.
The prices are made up, hourly, and the same on every page, so the chart shows how the indicator behaves, not how a market behaved.
In an algorithm
Section titled “In an algorithm”function onIntervalClose() { const exits = chandelierExit(22, 3); const longExit = exits[1]; if (OPEN_POSITIONS_COUNT > 0 && CLOSE < longExit) { closeAllPositions(); }}It gives [short exit, long exit].