Chandelier Exit Scanner MT4
- Индикаторы
-
Allan Aparece Ninal
Я разрабатываю индикаторы и советники (Expert Advisors) для MetaTrader 5.
Как я работаю:
- Каждый индикатор проверяется на перерисовку: сигналы определяются только на закрытых барах, а тест на каждом тике подтверждает, что они потом не меняются. - Версия: 1.0
- Активации: 10
Chandelier Exit Scanner MT4 is a paid indicator for MetaTrader 4. It draws the Chandelier Exit stop with a choice of ATR average, a second stop from a higher timeframe (closed bars only), a warning when price comes near the stop, an optional trend filter, flip statistics shown next to their chance level, and a scanner of the state on other symbols and timeframes. Run the free demo in the Strategy Tester on your own symbol before you decide.
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.
Pro adds the same stop from a higher timeframe (H4 by default) to show whether the bigger trend agrees, the distance from price to the stop in ATRs, and how often past flips on your chart reached one or two times their risk before the stop.
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 while long and red while short, turning amber when price is closer than 0.5 ATR to it. Only the active side is drawn, so the line breaks where it flips.
- A light fill between price and the stop (one vertical bar per chart bar in MetaTrader 4). The candles stay in front of it.
- The higher-timeframe stop (H4 by default) as a thin dashed line, green or red by that timeframe's side. It moves only when a bar of that timeframe closes.
- Arrows where it flips. With the trend filter on, flips against the filter line are drawn grey.
- Optional: candles coloured by the side, and the filter line (ZLSMA or EMA).
- Dashboard rows at the bottom right: the side and the distance to the stop in ATRs, whether the higher-timeframe stop agrees, bars since the last flip, and the flip statistics.
- A scanner panel (top right): the side on each symbol and timeframe as a mark (+ long, – short), the closed bars since the flip and the distance to the stop in ATRs. Fresh flips are drawn stronger, cells near their stop in amber. Click a cell to open that chart. The chart's right margin widens so the panel, names and rows never cover the last bar; it goes back when you remove the indicator.
Worked example
EURUSD H1, default inputs, from the test data of this indicator (broker history, server time). On the bar of 2026-12-01 15:00 the side was long with the stop at 1.08918. The close (1.08953) was 0.36 ATR from it (ATR 0.00099), under the 0.5 ATR near distance: the stop turned amber and the near-stop alert fired when the next bar opened. On the same chart the statistics row read: 191 flips, +1R before -1R 47% (chance 50%), +2R 31% (33%), average -0.05R.
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, ATR as Wilder, simple or exponential average |
| Timeframes | The chart's, plus a second stop from one higher timeframe; scanner on up to 6 timeframes |
| 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 | Flip; price near the stop; a wick touches the stop (off by default); the higher timeframe starts or stops agreeing (off by default); a scanner cell flips. 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 work without optimising: 22 bars, ATR 22 (Wilder), 3.0 ATRs, the H4 stop beside it.
- Read the rows: the side and the distance to the stop, whether H4 agrees, bars since the last flip, and how past flips did.
- Change the higher timeframe, the ATR average, or switch on the trend filter (ZLSMA 50 is the common pairing) or the candle colours.
- Set the scanner symbols (Market Watch or your own list) and timeframes. Click a cell to open that chart.
- Switch on the alerts you want.
Who it is for
Traders who use an ATR trailing stop to stay in a trend and to see when it ends, who want the higher-timeframe stop beside it, a warning before the stop is hit, and the same reading on many symbols at once. It is a reading tool, not an automatic buy and sell signal.
How it works under the hood
- ATR: Wilder's average by default (the first value is the simple average of the first n true ranges), or a simple or exponential average of the true range.
- 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.
Higher timeframe, distance and filter
The higher-timeframe stop runs the same rules on that timeframe's bars. A chart bar shows the stop of the last higher-timeframe bar that closed at or before the chart bar opened, so it never changes afterwards. If you pick a timeframe that is not above the chart's, that stop is switched off on that chart. The distance is (close - stop) / ATR on the side held. The filter line is ZLSMA (2 x LSMA - LSMA of the LSMA) or an EMA of the close; a flip on its side is to long with the close above the line, or to short below it.
Flip statistics
For each flip in the last 5,000 closed bars, the risk R is the distance from the close to the stop on that bar. The row shows how often price then reached +1R before -1R, and +2R before -1R (a bar that touches both counts as -1R first; flips still open are left out), next to the share a random walk would give (50% and 33%), and the average result in R if each flip were held to the next flip. These are history figures for your chart, not a forecast.
Scanner
For each symbol and timeframe the scanner reads the last "Closed bars the scan reads" bars (500 by default) and runs the same rules. A cell shows the side, the closed bars since the flip and the distance to the stop.
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). |
| ATR average | Wilder | Wilder, simple or exponential. |
| Second stop from a higher timeframe; timeframe | true; H4 | Must be above the chart's timeframe. |
| Filter line; length | off; 50 | Off, ZLSMA or EMA; 2-500. |
| Arrows / arrows kept | true / 30 | 1-200, the newest are kept. |
| Fill; near the stop | true; 0.5 | Near = closer than this many ATRs (0.1-5). |
| Colour the candles; candles in front of the fill | false; true | Your chart setting comes back when you remove the indicator. |
| Names / rows / statistics row; statistics bars | true / true / true; 5000 | 500-50000 closed bars. |
| Show the scanner | true | Switch. |
| Which symbols, my list, suffix, most symbols | Market Watch, 5 names, none, 10 | Market Watch or your list (1-60). A broker suffix is found automatically. |
| Timeframes; closed bars per cell | M15,H1,H4; 500 | Comma separated; 300-5000. |
| Corner, distances, font size, click opens, template, colours | top right, 10, 24, 9, true, none, Soft Desk | Panel layout. |
| 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: flip / near the stop | true / true | Switches. |
| Alert: a wick touches the stop / the higher timeframe agrees or stops | false / false | Switches. |
| Alert: a scanner cell 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 |
| 3 | Distance from the close to the stop, in ATR |
| 4 | Closed bars since the last flip |
| 5 | A wick touched the previous stop: 1 long stop, -1 short stop |
| 6 / 7 | Higher-timeframe stop / its side |
| 8 | Agrees with the higher timeframe: 1 yes, 0 no |
| 9 | Filter line (empty when off) |
| 10 | Flip on the filter's side: 1 / -1 (every flip when the filter is off) |
| 11 | ATR |
How it was checked
- Values: compared with an independent Python version of the rules, on broker history. 17 files (EURUSD, XAUUSD; H1, H4; 4 input settings, covering close and high / low extremes, lookbacks 10-50 and multipliers 1.5-4.5, every ATR average, H4 and D1 stops and both filters) held 1,449,744 buffer values and 9,321 flips. There were 0 differences.
- Repaint: 17 Strategy Tester runs (1 with every tick, 16 with open prices only). 111,020 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 (which shows them next to the chance level), and I make no claim about what price does after them.
Not tested: alerts on a live chart (the tester is silent for alerts), the scanner cells against the Python rules (they use the same engine), 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.
- The higher-timeframe stop needs that timeframe's history. Until it has loaded, the row says loading; the indicator keeps trying for about 8 minutes, and if the history is still missing after that, reload the chart.
- 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.
Why does the H4 stop look like steps? It moves only when an H4 bar closes, so it never changes afterwards.
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 Scanner, with the same rules.
Try it first
Run the free demo in the Strategy Tester in visual mode on your own symbol and timeframe. Check the stops, the rows and the statistics against the candles before you buy. The scanner needs live symbols, so it shows less in the tester.
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 Scanner: the same indicator for MetaTrader 5.
- Chandelier Exit Signals MT4: the free edition (the chart's stop with Wilder ATR, fill, arrows, pill and flip alert; no higher timeframe, near-stop warning, filter, statistics or scanner).
- 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.
