Keltner Channels Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Two rails tell you whether price is outside. Six tell you how far. The keltner channels indicator draws its envelope at one, two and three ranges from a twenty-bar exponential average, each pair in its own colour, so a glance shows which band price is currently working in.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 7: Keltner EMA, Upper +1 ATR, Upper +2 ATR, Upper +3 ATR, Lower -1 ATR, Lower -2 ATR, Lower -3 ATR
Alerts popup, push notification, email, sound
Inputs 11

Which plots exist

Seven lines, all on the price chart.

`Keltner EMA` traces gold at width 2 through the centre.

`Upper +1 ATR` traces light sea green.

`Upper +2 ATR` traces dodger blue above it.

`Upper +3 ATR` traces medium orchid furthest out.

`Lower -1 ATR` to `Lower -3 ATR` mirror them in warm tints.

  • Keltner EMA: line, gold, width 2
  • Upper +1 ATR: line, light sea green, width 1
  • Upper +2 ATR: line, dodger blue, width 1
  • Upper +3 ATR: line, medium orchid, width 1
  • Lower -1 ATR: line, salmon, width 1
  • Lower -2 ATR: line, tomato, width 1
  • Lower -3 ATR: line, crimson, width 1
keltner channels indicator: All three band pairs around price, EURUSD H1.
All three band pairs around price, EURUSD H1.

How the source computes it

The centre

`InpEmaPeriod` `20` runs an exponential average of closes. Exponential weighting means the whole envelope follows a turn faster than a plain average would allow.

The spacing unit

`InpAtrPeriod` `20` gives the range figure. Range rather than deviation means a gap widens the channel at once, where a deviation figure would soak it up across the window.

Three distances

`InpMult1` `1.0`, `InpMult2` `2.0` and `InpMult3` `3.0` each produce a pair. The three rails on each side are the same measurement at increasing distances.

How to work with it

Price inside the first pair means ordinary trade.

Reaching the second pair is uncommon.

Reaching the third is genuinely rare.

Colour tells you which band at a glance.

All six rails move with the gold centre.

Warm-up needs about forty bars.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

A close finishing beyond the second pair is what speaks, not the first or third. `EnableAlerts` decides whether it does and a message already lands in the terminal, with phone, mail and the `SoundFile` route closed.

Every Keltner Channels Indicator input

Core settings

Setting What it does Default
InpEmaPeriod EMA period (middle line). Bars behind the centre line, `20`. 20
InpAtrPeriod ATR period. Bars behind the range figure, `20`. 20
InpMult1 Multiplier band 1. Ranges out to the first pair, `1.0`. 1.0
InpMult2 Multiplier band 2. Ranges to the second pair, `2.0`. 2.0
InpMult3 Multiplier band 3. Ranges to the third, `3.0`. 3.0

Alert settings

Setting What it does Default
EnableAlerts Whether a second-band close speaks, `true`. on
EnablePopup A message lands in the terminal, `true`. on
EnablePushNotify It carries on to a phone, `false`. off
EnableEmail It heads out as mail, `false`. off
EnableSound (see inputs panel) off
SoundFile Clip used by the desktop route, `”alert.wav”`. alert.wav
keltner channels indicator: Inputs panel, the three multipliers under the periods.
Inputs panel, the three multipliers under the periods.

Chart choice

Three bands need a chart where price travels far enough to reach them. EURUSD H1 is the reference chart, where the second pair gets touched weekly. On M5 price rarely reaches the outer rails. On H4 each touch is notable.

Where care is needed

Range widens after a move rather than before it.

Seven lines on one chart is a lot to read.

A rail touch says nothing about direction.

Price can ride the first band for days.

Copy the compiled Keltner Channels Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the Keltner Channels Indicator: Keltner channel on Wikipedia, Average True Range at StockCharts ChartSchool.

Download the Keltner Channels Indicator for MT4 and MT5

The zip holds the compiled Keltner Channels Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why does the alert use the Upper +2 ATR rail?

Because the first band gets touched constantly and the third almost never. Two ranges from the centre is uncommon enough to be worth reporting and common enough to fire more than once a quarter.

How does Upper +2 ATR differ from a deviation band?

Range measures how far bars travel including gaps, while deviation measures how scattered the closes are. A gap widens this rail immediately; a deviation band would barely register it.

Should InpEmaPeriod 20 match InpAtrPeriod 20?

They are independent, so no. Matching them keeps the centre and the width responding on the same horizon, but a fast centre with a slow width is a perfectly reasonable alternative.

What does the Keltner EMA line represent?

The twenty-bar exponential average that every rail measures from. Price crossing it is a separate observation from any rail touch, and it is the line the whole envelope pivots around.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Keltner Channels Indicator as one input. Always backtest before trading live.

Category: this is part of our Volatility collection. Also, truly, browse more Volatility for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment