Keltner Channel
A moving average with bands set at a multiple of average true range. It looks like Bollinger Bands and is built from a different measurement: Bollinger's width is the standard deviation of the closes, Keltner's is the size of the bars. Widen the bars without touching a single close and Bollinger does not move at all while Keltner doubles.
- Default
- 20 ± 2 × ATR(20)
- Raschke variant
- 20 ± 2 × ATR(10)
- vs Wilder's ATR
- iATR(32–33) ≈ Wilder(20)
توضيحي — بيانات اصطناعية، ليست تسعيرة مباشرة.
What a Keltner Channel tells you
A Keltner Channel is a moving average with a band drawn at a fixed multiple of average true range above and below it. That is one word different from the description of Bollinger Bands — multiple of average true range instead of multiple of standard deviation — and the difference is not a matter of degree. Standard deviation is computed from closing prices; true range is computed from each bar's high, low and previous close. They answer different questions: how far the closes scatter, against how much ground the market covers within a bar. The cleanest way to see it is to take a series, leave every close exactly where it is, and make the bars taller. Measured that way, Bollinger's half-width does not change by a single unit and Keltner's doubles. The two lines are usually within about a tenth of each other in size, which is precisely why the distinction gets lost: they look interchangeable and are not.
- The width comes from the bars, not from the closes
- MetaTrader has no Keltner — it is an iMA and an iATR combined
- And MetaTrader's iATR is not Wilder's ATR, which is what the usual definition assumes
- 1 Centre line: a moving average of the applied price, EMA by convention
- 2 Width: average true range over its own period, times a multiplier
- 3 Bands: the centre plus and minus that width, recomputed every bar
عرض الصيغة وتفاصيل الحساب
MetaTrader has no Keltner Channel, so the calculation below is the one the Builder’s node performs with two handles. The centre line and the width are separate indicators, and each brings its own definition.
mid = MA(applied_price, period) <- iMA, EMA by convention
width = ATR(atr_period) * multiplier <- iATR
upper = mid + width
lower = mid - width
The second line is where the platform detail lives. ATR.mq5, bundled under Indicators/Examples, computes:
TR[i] = max(high[i], close[i-1]) - min(low[i], close[i-1])
ATR[i] = ATR[i-1] + (TR[i] - TR[i-N]) / N <- a rolling window, i.e. an SMA
Wilder’s ATR — the one nearly every description of this indicator assumes — is:
ATR[i] = (ATR[i-1] * (N-1) + TR[i]) / N <- nothing leaves, it only decays
Both are linear filters whose weights sum to one, so their long-run averages must agree, and measured over 2,700 bars at period 20 they do: 9.571 against 9.573 pips. What separates them is timing. On a series whose volatility tripled at a fixed bar:
before after bars to reach 90% of the new level
iATR(20) 3.31 9.63 19
Wilder ATR(20) 3.30 9.64 59
Matching the period does not close the gap. Wilder’s 1/N smoothing has the centre of mass of a simple average over 2N-1 = 39 bars, so iATR(39) is the analytic answer — but sweeping the period, the closest match was 32–33. Decomposing shows why:
iATR(n) vs Wilder ATR(20), walk-high series
n mean sd corr
20 9.571/9.573 1.100/0.778 0.8897
25 9.572/9.573 0.977/0.778 0.8947 <- correlation peaks
32 9.573/9.573 0.855/0.778 0.8782 <- |diff| minimised
39 9.574/9.573 0.767/0.778 0.8482 <- sd matches, as predicted
The means agree at every period. The standard deviations line up at 39 exactly as the theory says, and the correlation is already falling by then; the smallest average difference sits between the two.
The other half of the page is what the width is measured from. Take a series, leave every open and close where it is, and triple the wick length:
closes Bollinger half-width Keltner half-width
walk-low max|d| = 0.0 max|d| = 0.0 3.18 -> 6.38 (x2.00)
walk-high max|d| = 0.0 max|d| = 0.0 9.57 -> 19.18 (x2.00)
trending max|d| = 0.0 max|d| = 0.0 4.81 -> 9.62 (x2.00)
Bollinger cannot see the change, because it never looks at a high or a low. That is the whole distinction, and it survives into the trade count — at widths that differ by only 11%, the trending series produced 1358 closes above Bollinger’s upper band and 2393 above Keltner’s.
Finally, the 1960 original used plain high-minus-low rather than true range. With no gaps the two are the same width to within 0.00%; with gaps on 15% of bars the original reads 23.87% narrower, which is exactly the distance true range was invented to count.
الإشارات
الإشارات المتميزة والقابلة للاختبار التي يوفرها Keltner — والنظام الملائم لكل منها.
Centre-line Bias
جاهز في المنشئReturn to the Centre
جاهز في المنشئThe Squeeze
تفسير يدويتنفيذ MT5
ما يحسبه ويرسمه ميتاتريدر 5 فعليًا — وهو المرجع الذي كُتبت وفقه كل قاعدة في هذه الصفحة.
ملاحظات المنصة
يعمل بشكل أفضل / استخدم بحذر
لا يوجد مؤشر ذو ميزة شاملة. إليك أين يساعد Keltner — وأين يضلل.
يعمل بشكل أفضل
- Breakout rules, where the threshold should scale with how far the market has been travelling
- Instruments that gap, where true range counts the gap and a close-based width does not
- Stops and targets expressed as a multiple of the same width the entry used
- Any rule whose multiplier was measured on this platform's ATR rather than borrowed
استخدم بحذر
- Assuming it is Bollinger with different arithmetic — the input series is not the same
- Porting a multiplier from a chart drawn with Wilder's ATR; the width turns three times slower there
- Trading band breaks without a direction filter — measured, they are 1.76× as frequent as Bollinger's
- Reading the original 1960 formula and the modern one as the same indicator
بناء استراتيجية Keltner
اربط الإشارة بقواعد الدخول والخروج، ثم صدّر EA MT5 قابلاً للترجمة — بدون كود.
- Three Keltner Channel nodes at 20 with a 2.0 multiplier — the upper edge, the lower edge, and a centre on H4
- The Bid crossed against the upper edge, once upward and once downward
- The Bid compared against the H4 centre, feeding both directions
- Cross up while above the H4 centre → Close short, then Open Buy · SL 60 / TP 180
- Cross down while below it → Close long, then Open Sell, mirrored
دمج Keltner مع مؤشرات أخرى
نادراً ما يقف مؤشر واحد وحده. هذه التوليفات تغطي النقاط العمياء لـ Keltner.
Keltner + Bollinger Bands
- Keltner Channel
- Bollinger Bands
- And gate
No template holds both. Add a Bollinger node beside the Keltner nodes and compare the two upper values to detect the squeeze.
افتح المنشئ →Keltner + ATR
- Keltner Channel
- ATR
- And gate
Add an ATR node with the same period as the channel's width and use it for the stop distance.
افتح المنشئ →Keltner + Envelopes
- Keltner Channel
- Envelopes
- Compare
Add an Envelope node at the same period to see how differently a fixed percentage behaves when volatility changes.
افتح المنشئ →المعاملات
قيم أولية للتحقق على زوجك الخاص وإطارك الزمني — ليست إعدادات مضمونة.
| المعامل | الافتراضي | نطاق الاختبار المقترح | ما يفعله |
|---|---|---|---|
| Period | 20 | 1–999 | The centre line's length. Convention is 20 with an exponential average, which is what the template ships. Switching the centre to a simple average is not cosmetic: measured on the same series, the two centres differ by 0.89 to 2.58 pips on average and the number of bars closing outside the upper band rose from 955 to 1439 — about half again as many — because a slower centre lets price run further from it before the band catches up. |
| ATR period | 20 | 1–999 | The width's own length, kept separate from the centre so the common variant of a 20-bar centre with a 10-bar width can be expressed. Shorter widths react to a single violent bar; longer ones describe the session. Note that this period is fed to MetaTrader's iATR, which is a simple moving average rather than Wilder's smoothing — measured, the iATR period that comes closest to Wilder's ATR at 20 is 32 or 33. |
| Multiplier | 2.0 | 0.1–100 | How many average true ranges away the bands sit. Two is the usual figure and is what the measurements on this page use. It is the parameter most worth re-measuring on your own instrument, because it interacts with the ATR period: a shorter width with a larger multiplier and a longer width with a smaller one can produce bands of the same average size that behave completely differently when volatility turns. |
| Line | Upper | Upper / Main / Lower | Which of the three the node publishes. One node emits one line, so the template uses three; they are created with the same symbol, timeframe and periods, so the terminal serves them from the same pair of indicators rather than from three of each. |
| Method | EMA | SMA / EMA / SMMA / LWMA | How the centre line is averaged. EMA is the convention and the node's default. This one is worth setting explicitly rather than leaving to a default somewhere else in the chain: a centre that quietly falls back to a simple average is a different strategy, not a slightly different one. |
| Shift | 1 | 0–100 | Which bar the bands are read from. The template uses 1 so the channel is fixed for the duration of the bar being traded. With shift 0 the band moves as the bar forms, and a break can appear and disappear inside the same bar — the usual way a backtest and a live account stop agreeing. |
| Timeframe | Current | Current / M1–MN1 | Which series the handles are created on. The template puts the centre-line gate on H4 while the bands stay on the trading timeframe. Warm-up is worth a thought here: measured, the centre line needs the most history of the three parts — about 100 bars against 40 for the ATR. |
الإعدادات المسبقة الأولية
أمثلة السوق
أين يعمل Keltner، وأين يفشل، وكيف يغير الفلتر النتيجة.
A break with the higher timeframe behind it
The close pushes outside the upper band while the H4 centre line is already below price. The gate is what makes this different from the break two bars earlier, which had the same shape and no direction.
The break inside a range
Price closes outside the band and returns within two bars. On a ranging series the bands are narrow, and a narrow band is broken often — this is the case the higher-timeframe gate exists to refuse.
The squeeze before it matters
Bollinger's bands have fallen entirely inside Keltner's — the compression state. Measured, this holds on 12.7% to 16.6% of bars in runs of about six, so it describes a regime rather than marking a moment.
المؤشرات ذات الصلة
FAQ
- Is the Keltner Channel built into MetaTrader 5?
- No. There is no iKeltner function. It is built from two that do exist — iMA for the centre line and iATR for the width — which is what the Builder's node does. That is also why the node has two period settings instead of one.
- What is the difference between Keltner Channels and Bollinger Bands?
- The input. Bollinger's width is the standard deviation of the closing prices; Keltner's is the average true range, which is computed from each bar's high, low and previous close. Measured, taking a series and tripling the wick length without moving any close leaves Bollinger's half-width unchanged to the last bit and exactly doubles Keltner's. The two are usually within about 11% of each other in size, which is why the difference is easy to miss.
- Which one is wider?
- Usually Bollinger, but not by much and not always. Measured at the same period with the conventional constants, Keltner ran 0.89 to 0.96 times as wide across three synthetic series. The gap was largest on the trending one, because a sustained move inflates the standard deviation of the closes while leaving true range roughly where it was.
- Does MetaTrader's ATR match Wilder's?
- No, and this is the caveat that matters most here. The bundled ATR.mq5 computes a rolling simple average of true range; Wilder's ATR is a 1/N smoothing that never discards anything. Their long-run averages agree — 9.57 against 9.57 pips measured — but after volatility tripled, the platform's version reached 90% of the new level in 19 bars against Wilder's 59.
- What ATR period matches Wilder's at 20?
- 32 or 33, measured. The analytic answer is 39, from matching the centre of mass, and the standard deviations do agree there — but the correlation between the two series is already falling by 39, and the closest overall match lands between the two effects. Expect a close match, not the same line.
- Should the centre be an EMA or an SMA?
- EMA is the convention and the node's default. It is not a small choice: measured, the two centres differ by 0.89 to 2.58 pips at period 20, and moving to a simple average raised the count of bars closing above the upper band from 955 to 1439 on the same series.
- What is the Keltner squeeze?
- The state where Bollinger's bands sit entirely inside Keltner's — the closes have stopped scattering relative to how far the bars are still travelling. Measured, it holds on 12.7% to 16.6% of bars, in runs averaging about six. It needs both indicators on the chart, because it is a comparison between two different measurements rather than a reading of one.
- How much history does it need?
- About 100 bars, and the centre line is what decides that. Measured at period 20 against a full-history baseline: the platform's ATR was exact at 40 bars, Wilder's was off by 0.038 there and reached 0.0009 at 100, and the EMA centre was off by 0.25 at 40 and 0.028 at 60.
- Is this the same as the original Keltner Channel?
- No. The 1960 version averaged high minus low around a simple average of the typical price; the modern one uses true range around an EMA. With no gaps the two widths are identical, measured to within 0.00%. With gaps on 15% of bars the original reads 23.87% narrower, because plain range does not count the distance covered while the market was closed.
- Can I build this without coding?
- Yes. The template is three Keltner nodes at period 20 with a 2.0 multiplier — one on the upper line, one on the lower, and one on the centre read from H4 — a price node, two Cross nodes for the band breaks, two Compare nodes against the H4 centre, two And gates, two Close nodes wired ahead of the entries, and Open Buy / Open Sell on a fixed lot. The periods and the multiplier are set in the Builder; the compiled EA exposes them along with the stop distances, lot size and maximum spread as inputs.
مقالات ذات صلة
Glossary