Skip to content

Free MT5 indicator

Keltner Channel Breakout

EMA and ATR Keltner Channel for MT5 with arrows on closed-bar breakouts, an optional EMA slope filter and once-per-bar alerts.

Breakoutv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

The Keltner Channel places an envelope around an exponential moving average, with the distance set by the Average True Range. Because ATR measures how far price usually travels in a bar, the channel widens in volatile markets and narrows in quiet ones. This version adds arrows on bars that close outside the channel, which many traders read as a sign of momentum.

How it works

  • Middle line = EMA of the close, with smoothing factor 2 / (EMA period + 1).
  • True range = the largest of: high - low, |high - previous close|, |low - previous close|.
  • ATR = Wilder smoothing of the true range: ATR = previous ATR + (true range - previous ATR) / ATR period.
  • Upper channel = EMA + multiplier x ATR. Lower channel = EMA - multiplier x ATR.
  • Up arrow: a closed bar closes above the upper channel after the previous close was at or below it. Down arrow: the mirror image at the lower channel.
  • With the slope filter on, an up arrow also needs the EMA to be higher than on the previous bar, and a down arrow needs it lower.

Signals are evaluated only once a bar has closed, so arrows do not flicker on the live bar.

How to use it

A close outside the channel shows that price moved further than its recent typical range, which can mark the start of a trend leg. Traders often combine it with the direction of a longer moving average or a higher timeframe so that they only act on breakouts in the dominant direction. The slope filter gives a basic version of that.

Inside the channel, the EMA often acts as a dynamic mean that price returns to. A practical stop-loss for a breakout idea is the middle line or the opposite channel, depending on your risk-reward ratio. The indicator works on any symbol and timeframe; H1 to D1 usually give fewer, more meaningful signals than M1 or M5.

Settings

InputDefaultWhat it changes
EMA period (middle line)20Responsiveness of the channel centre
ATR period10Smoothness of the channel width
ATR multiplier2.0Larger values give a wider channel and fewer arrows
EMA slope filterfalseRemoves arrows that go against the EMA direction
Popup alert / Push notificationfalseAlerts once per bar on a new arrow

Limitations

  • In ranging markets price can close just outside the channel and then reverse, producing whipsaws.
  • The EMA and ATR both lag, so the channel reacts to volatility changes after they start.
  • The first bars on the chart are used to warm up the averages and show no arrows.
  • Spread widening around news can push closes outside the channel on small timeframes.

Key inputs

Key inputs of Keltner Channel Breakout
InputDefaultDescription
EMA period (middle line)20Length of the exponential moving average in the middle of the channel.
ATR period10Bars used for the Wilder-smoothed Average True Range.
ATR multiplier2.0Channel half-width in ATR units.
Only signal in the direction of the EMA slopefalseWhen on, up arrows need a rising EMA and down arrows a falling EMA.
Popup alert on a new breakoutfalseShows an MT5 alert once per bar when a new arrow appears.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators