Chandelier Exit with Signal Stats MT5
- Indicadores
- Thanh Trung Tran
- Versão: 1.0
A line-by-line MQL5 port of "Chandelier Exit", (c) 2019-present Alex Orekhov (everget), distributed under the GPL-3.0 license. The original is published on TradingView. This port is released under the same license.
Also available for MetaTrader 4 (free): https://www.mql5.com/en/market/product/203729
Same logic as the original:
- ATR = multiplier x ta.atr(length) (Wilder RMA, seeded with an SMA).
- Long stop = highest(close or high, length) - ATR. It only moves up while the previous close stays above the previous stop.
- Short stop = lowest(close or low, length) + ATR. It only moves down while the previous close stays below the previous stop.
- Direction: long when the close breaks above the previous short stop, short when it breaks below the previous long stop, otherwise unchanged.
- Buy / Sell when the direction flips, with a dot at the start of each new stop line.
- State highlight between OHLC/4 and the active stop, drawn behind the candles.
Inputs (original defaults): ATR Period 22, Multiplier 3.0, Use Close Price for Extremums on.
Made for MetaTrader 5:
- No repainting. A Buy or Sell arrow is drawn when its bar closes and never moves or disappears afterwards. Tested bar by bar on 619,687 one-minute gold bars plus H1, M15, H4 and D1 charts: every value seen when a bar closed equals the final value.
- Alerts on a new signal: popup, sound only, push notification to the MetaTrader 5 mobile app, or e-mail. Once per signal, on the closed bar.
- Highlight strength input (5-60 %); the fill color is mixed with your chart background.
- Signal statistics panel. It buys at the bar after a Buy, sells after a Sell, and closes and reverses at the opposite signal. It shows the trades and win rate, the net result in money at your lot size after spread and commission, profit factor, average win and loss, longest losing streak, maximum drawdown, the open trade and the cost per trade. Click its header to fold it to one line; put it in any corner. Its colors follow your chart, dark or light.
- Daily session filter for the statistics, in your own time zone (overnight windows allowed), with session shading and an optional close at session end. Off by default.
- Trade marks on the chart: hover a mark for prices, exit reason and result.
- Works on any symbol and timeframe.
For EA developers (iCustom): buffers 6 = Buy (price of the stop), 7 = Sell, 8 = long stop, 9 = short stop, 10 = direction (+1 / -1); EMPTY_VALUE means no value. Simplest call with the default inputs: iCustom(_Symbol, _Period, "Market\\Chandelier Exit with Signal Stats MT5") . If you pass inputs, each input group heading counts as one parameter (pass an empty string for it). Signals on the closed bar (shift 1) are final.
The panel describes past signals so you can judge them yourself. It is not a backtest and not a promise of results.
Source code and license: free and open source under the GNU General Public License v3.0 (GPL-3.0), the same as the original. The complete MQL5 source code is free: ask the author by private message on MQL5 and you will receive it at no cost. This offer stays open for at least three years.
This is a visual tool. It does not place trades and does not predict prices. Test any rule built on it before you trade with it.
More from the author (MetaTrader 5):
- UT Bot Alerts with Signal Stats MT5 (free): https://www.mql5.com/en/market/product/209458
- Range Filter Buy Sell with Signal Stats MT5 (free): https://www.mql5.com/en/market/product/209459
- Adaptive SuperTrend KMeans MT5 (free): https://www.mql5.com/en/market/product/209466
- Tester vs Live Trade Matcher MT5 (free): https://www.mql5.com/en/market/product/209467
- GoldSwing T24 MT5 - trend trading with short holding times: https://www.mql5.com/en/market/product/209324
- Gold Momentum Breakout MT5 - momentum, long and short: https://www.mql5.com/en/market/product/209325
- GoldIBH MT5 - three gold strategies in one EA: https://www.mql5.com/en/market/product/209326
- Gold Entry MT5 - two trend systems in one EA: https://www.mql5.com/en/market/product/209327
