Chandelier Exit Signals MT4
- インディケータ
- バージョン: 1.0
Chandelier Exit Signals MT4 is a free indicator for MetaTrader 4. It draws the Chandelier Exit: a trailing stop that hangs 3 ATRs below the highest close of the last 22 bars while the trend is up, and 3 ATRs above the lowest close while it is down. Green under price while long, red above price while short, with an arrow where it flips. Every value is written when a bar closes and never changes afterwards.
It draws and alerts. It does not trade. It shows where a trailing stop would sit and which side of it price is on. It is not a signal system and it promises no profit. The section How it was checked shows what was tested and what was not.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
In plain words
Chuck LeBeau's Chandelier Exit hangs a stop from the top of the recent move, like a chandelier from the ceiling. While the trend is up, the stop sits a fixed number of ATRs (the average bar range) below the highest close of the last bars. When the trend makes a new high, the stop moves up with it; it never moves down while the trend lasts. When a bar closes below it, the stop flips: it now hangs above the lowest close and follows price down.
So the line answers two questions at once: which side the trend is on, and where a trailing stop for that side would be now.
The stop follows the trend that has already happened. It does not say what price will do next.
What you see on the chart
- The stop: green under price while long, red above price while short. Only the active side is drawn, so the line breaks where it flips.
- A light fill between price and the stop, in the same colour (drawn as one vertical bar per chart bar in MetaTrader 4).
- An arrow on the bar where it flips (the last 30 are kept).
- The stop's name and price at its right end, for example CE 22 x3.0 1.08055.
- A status pill at the bottom right, for example CE 22 x3.0 | long | stop 1.08055 | flipped 7 bars ago.
Worked example
EURUSD H1, default inputs, from the test data of this indicator (broker history, server time). On the bar of 2026-12-04 15:00 the close (1.08348) went above the short stop of the bar before (1.08275), so the indicator flipped to long. The new long stop is the highest close of the last 22 bars (1.08348) minus 3 x ATR (0.00132): 1.07951. The arrow sits on that bar and the flip alert fires when the next bar opens.
Key facts
| Item | Detail |
|---|---|
| Type | Indicator for MetaTrader 4, in the chart window |
| Stop | Highest / lowest close (or high / low) of 2-500 bars, minus / plus 0.1-20 x ATR of 1-500 bars, Wilder ATR |
| Timeframes | The chart's |
| When a value is final | When its bar has closed. Data on the forming bar stays empty. |
| After a reload or timeframe change | The same closed bars give the same values. Old events send no alerts. |
| Alerts | It flips to long or short. Pop-up, sound, push, e-mail. Closed bars only. |
| Trades | No. It places no orders. |
| Other products needed | None |
| Tested on | EURUSD, XAUUSD on H1, H4 charts, plus the repaint and error runs below |
Quick start
- Attach the indicator to any chart. The defaults (22 bars, ATR 22, 3.0 ATRs, extremes from the close) are the common TradingView setting and work without optimising.
- Read the colour and the pill: long or short, where the stop is, how long ago it flipped.
- For the classic LeBeau version, set extremes from the close to false (high / low). A smaller multiplier gives a tighter stop and more flips.
- Leave the flip alert on, or switch it off.
Who it is for
Traders who use an ATR trailing stop to stay in a trend and to see when it ends. It is a reading tool, not an automatic buy and sell signal.
How it works under the hood
- ATR: Wilder's average of the true range; the first value is the simple average of the first n true ranges.
- Long stop = highest close (or high) of the last n bars - multiplier x ATR. While the close of the bar before is above the previous long stop, the long stop cannot fall.
- Short stop = lowest close (or low) of the last n bars + multiplier x ATR. While the close of the bar before is below the previous short stop, the short stop cannot rise.
- Side: long when the close goes above the previous short stop, short when it goes below the previous long stop, otherwise unchanged. A flip is a closed bar where the side changes.
Inputs
| Input | Default | What it does |
|---|---|---|
| Lookback; ATR length; ATR multiplier | 22; 22; 3.0 | 2-500 bars; 1-500 bars; 0.1-20. |
| Extremes from the close | true | false = highest high / lowest low (LeBeau's original). |
| Arrows / arrows kept | true / 30 | 1-200, the newest are kept. |
| Fill / name and price / status pill | true / true / true | Drawing switches. With the fill on, the candles stay in front of it. |
| Debug log for bug reports | false | See Found a problem? |
| Pop-up alert | true | Alert window in the terminal. |
| Play a sound | false | Plays the sound file below. |
| Sound file | alert.wav | File from the terminal Sounds folder. |
| Push notification | true | Needs your MetaQuotes ID. |
| false | Needs e-mail set up in the terminal options. | |
| Alert: it flips | true | Switch. |
Alerts and Expert Advisor use
Alerts. One message per closed bar, sent when the next bar opens, for example: Chandelier 22 x3.0 flipped to long, stop 1.07951. Nothing is sent while the history loads, twice for the same bar, or in the Strategy Tester.
Buffers for Expert Advisors (iCustom). The data buffers come first. The forming bar stays empty: read from shift 1.
| Buffer | Content |
|---|---|
| 0 | The active stop |
| 1 | Side: 1 long, -1 short |
| 2 | Flipped on this bar: 1 to long, -1 to short |
How it was checked
- Values: compared with an independent Python version of the rules, on broker history. 25 files (EURUSD, XAUUSD; H1, H4; 6 input settings, covering close and high / low extremes, lookbacks 10-50 and multipliers 1.5-4.5) held 534,936 buffer values and 12,196 flips. There were 0 differences.
- Repaint: 25 Strategy Tester runs (1 with every tick, 24 with open prices only). 164,124 closed bars were compared with the values read when they closed. 0 changed after the close, and 0 values appeared on the forming bar.
- Error check: 42 finished MT4 Strategy Tester runs of the test harness, 0 error lines in the tester log. Same indicator source as the MT5 edition, compiled with the MT4 compiler.
Trading-rule test: I have not tested the flips as a trading rule beyond the statistics row, and I make no claim about what price does after them.
Not tested: alerts on a live chart (the tester is silent for alerts), and the MQL5 Market validator itself.
Limits
- A trailing stop lags by design. A flip comes after the move has turned, and in a range it flips often.
- It needs as many bars as the longer of the lookback and the ATR length before it has a value.
- It gives no target or lot size. The stop is a reading, not an order.
- Alerts need the terminal to be running with the chart open.
FAQ
Does it repaint? No value changes after its bar has closed. The stop is also drawn on the forming bar and moves with price there, but the side, the flips, the arrows and the alerts use closed bars only.
Close or high / low? The close (TradingView's common setting) reacts to closing prices only; high / low is LeBeau's original and sits a little further away. Try both in the tester on your symbol.
Can an Expert Advisor read it? Yes. Read the buffers listed under Alerts and Expert Advisor use, from shift 1.
Is there a MetaTrader 5 version? Yes, Chandelier Exit Signals, with the same rules.
Try it first
It is free. Attach it to a chart on a demo account, or run it in the Strategy Tester in visual mode on history.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Smooth MA Signals MT4 | Add it to the same chart. | A smooth average (Hull, ZLEMA, McGinley) as a trend filter beside the stop. |
| UT Bot Signal Alerts MT4 | Compare on the same chart. | Another ATR trailing stop, built from the close instead of the recent extreme. |
| Session Levels MT4 | Add it to the same chart. | Session boxes and the previous day and week levels, for where the stop sits against a level. |
Related products
- Chandelier Exit Signals: the same indicator for MetaTrader 5.
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk of loss. Past behaviour of an indicator does not predict future results.
