Indicators · condition block
Chandelier exit
The chandelier exit hangs a stop line below the highest high of recent candles, at a distance of a few ATRs. When the close drops below the line, the trend is considered over.
How the engine evaluates it
The line is the highest high of the last N candles (current candle included) minus multiplier × ATR(N), using Wilder's ATR with the same length.
below fires while the close is strictly under the line, above while it is strictly over it. The engine computes the long-side line only. Before your start date the engine loads extra history (at least 50 candles, up to 5,000, scaled to the longest indicator in the bot) so the indicator has settled by the first candle of the run.
line = highest high(N) − m × ATR(N)
Botscript syntax
In the Lab you pick this block from the Indicators group and fill in its fields. In the code view the same condition is written like this:
price below chandelier(22,3)
price above chandelier(22,3)
Settings
| Setting | Values | Default | Notes |
|---|---|---|---|
| Comparison | above, below | below | — |
| Length | 1 – 500 | 22 | Used for both the high window and ATR. |
| Multiplier | 0 – 100 | 3 | — |
| Timeframe | the run's candles, or 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w | the run's candles | Optional. At least the run's candle size and a whole multiple of it. |
On a higher timeframe
Add a timeframe at the end to read Chandelier exit from bigger candles than the run uses, for example price below chandelier(22,3) on 1d. The engine builds those candles from the run's own candles (UTC, weeks start on Monday) and evaluates the block only on candles that have closed, so there is no look-ahead. Lengths and lookbacks count the bigger candles.
Chandelier exit is a state on a higher timeframe: the result from the last completed bigger candle holds on every run candle until the next one closes.
The timeframe must be at least the run's candle size and a whole multiple of it; otherwise the run stops with an error and is not charged. Multi-timeframe conditions covers the details, including warm-up.
How traders use it
- Trailing stop:
price below chandelier(22,3)withsell 100%. - Trend filter:
price above chandelier(22,3)on entries.
Example bot
bot "Breakout With Chandelier Stop"
when price below chandelier(22,3)
then sell 100%
when breakout high 55
then buy 100%
- The exit rule comes first so it is checked before any new entry on the same candle.
- Buys 55-candle breakouts.
Pitfalls
- A tight multiplier exits on normal noise; a loose one gives back more profit.
- The line is computed from highs, so it does not depend on where you entered.
Chandelier exit: frequently asked questions
Why is it called a chandelier?
The stop hangs from the highest point of the move, like a chandelier from the ceiling.
Is there a short-side chandelier?
Not in this block. Bots on stratester are long-only, so the long-side line is what matters.
Does the line only go up?
It follows the highest high and ATR, so it can move down when old highs drop out of the window or ATR rises.
What are the standard settings?
22 candles and 3 × ATR, Chuck LeBeau's original values.
Related blocks
Simulated results are hypothetical. They include only the fee and slippage you set on the bot, not every real-world cost or market condition, and past performance does not guarantee future results. Nothing here is financial advice.