Chandelier Exit Trend System
The chandelier exit is Chuck LeBeau's, published and widely taught: hang the stop from the ceiling, not the floor. For a long, the stop sits a chosen multiple of ATR below the highest high reached since entry, and it only ever moves up - never back down, even if price pulls back and the highest high stops advancing. The mirror applies to a short. The name comes from the image of the stop hanging from wherever price has reached, like a chandelier from a ceiling, rather than being anchored to the entry price the way a conventional stop loss is. This EA implements it as a complete system rather than an add-on indicator: entries are a plain Donchian channel breakout - the previous closed bar's close breaking above the highest high, or below the lowest low, of the prior InpEntryLookback bars - and the chandelier stop is the only exit that exists. There is no separate take profit and no opposite-signal reversal; the entire point of the method is that letting the trailing stop do all the work is what allows a genuine trend to run as far as it will go, only closing the trade once price itself gives back enough of its own extreme to trigger the stop. The ATR anchoring is configurable in two independent places: InpAtrLookback controls how many bars back the highest-high/lowest-low anchor looks, and InpAtrPeriod controls the ATR itself - they default to the same value LeBeau originally used but do not have to move together. InpAtrMultiplier is the classic 3.0 by default; tightening it trails closer and gives back less profit per trade at the cost of more stop-outs during normal volatility, and loosening it does the reverse. Notes and limitations - One position at a time, tracked by InpMagicNumber. Entries are only evaluated while flat; while a position is open, every tick is spent ratcheting its chandelier stop instead. - The stop is updated every tick, not once per bar, so it reacts to an intrabar move toward it immediately - but it can still only ever move in the trade's favour, by design. - There is no take profit and no signal-based exit. The chandelier stop is the only way a trade closes, which is the method as published, not an omission. - A trending market with this system can give back a meaningful chunk of open profit before the ATR-based stop catches up - that give-back is the known trade-off of a trailing-stop-only exit, not a bug. - Attribution: the chandelier exit technique is Chuck LeBeau's. This is an original implementation of a published, widely taught method.
Expert advisor · MT5 · v1.0 · Free
About Chandelier Exit Trend System
Chandelier Exit Trend System is an expert advisor (trading robot) for MetaTrader 5 based on ATR. It increases the lot size after a losing trade (martingale), can size trades from your balance and risk percent and has a news filter. It has 11 settings, such as Entry lookback, Atr lookback and Atr period. MQL source code included.
It also trades breakouts.
Files in the download: ChandelierExitTrendSystem.ex5, ChandelierExitTrendSystem.mq5, ChandelierExitTrendSystem.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Entry lookback | 20 | Donchian breakout lookback, in bars, for entries |
| Atr lookback | 22 | Bars back for the chandelier's highest-high / lowest-low anchor |
| Atr period | 22 | ATR period used for the chandelier's stop distance |
| Atr multiplier | 3.0 | ATR multiple subtracted/added to the anchor - LeBeau's original default is 3.0 |
| Use risk sizing | false | Size by percent risk to the initial stop instead of a fixed lot |
| Risk percent | 1.0 | Percent of equity risked per trade, used only when risk sizing is on |
| Fixed lots | 0.10 | Lot size when risk sizing is off, or as a fallback |
| Magic number | 20260903 | Magic number for orders opened by this EA |
| Slippage pips | 3 | Slippage tolerance, in pips |
| Max retries | 5 | Attempts per trade action before giving up |
| Retry wait ms | 500 | Pause between attempts, milliseconds |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: Breakout · ATR · Channels & Envelopes · Trend · Trailing Stop & Break-even · Martingale · Risk & Lot Size · News Trading · MT5 Expert Advisor · MQL5 Source Code