Dao động MomentumBreakoutMean Reversion Có trong Builder

Commodity Channel Index (CCI)

CCI

CCI measures how far price has strayed from its own statistical average, scaled so that roughly three quarters of readings fall between −100 and +100. It is unbounded, so it reads both exhaustion and breakout strength depending on which side of those levels you trade.

Default period
14
Common levels
+100 / −100
Centre
Zero line
OverboughtOversoldCentreline 50Divergence

Minh họa — dữ liệu tổng hợp, không phải giá thực.

What CCI tells you

CCI expresses the distance between the current typical price and its own moving average, divided by how much that distance usually is. A reading of +100 means price is about as far above its average as it normally gets — which reads as exhaustion in a range and as strength in a breakout.

  • Above +100: price is unusually far above its own average
  • Below −100: unusually far below
  • Crossing zero: the current price has passed back through its average
  1. 1 Take the typical price of each bar
  2. 2 Measure its distance from the moving average
  3. 3 Scale by the average of those distances
Hiển thị công thức & chi tiết tính toán

CCI compares price to its own average and then scales that distance by how large the distance usually is:

  1. Compute the typical price of each bar: TP = (High + Low + Close) / 3. This is the applied price the indicator uses by default.
  2. Take a simple moving average of typical price over the period.
  3. Compute the mean absolute deviation over the same window — the average distance between typical price and that moving average.
  4. Divide and scale: CCI = (TP − SMA(TP)) / (0.015 × mean deviation).

That division is also what separates CCI from the plainest version of the same idea. The Detrended Price Oscillator stops one step earlier — it subtracts a moving average from price and hands you the difference, with no division by anything. The reading stays in the instrument’s own units, so no fixed level survives a change of symbol, which is exactly the problem the next constant solves here.

The 0.015 constant is the whole reason ±100 means anything. Lambert chose it so that, for a normally-behaved instrument, roughly 70–80% of readings would land inside ±100 — making a reading beyond that level statistically unusual rather than arbitrary. Nothing in the formula caps the output, so “unusual” and “impossible” are not the same thing.

In MQL5 the call is iCCI(symbol, period, ma_period, applied_price) and it returns a handle to a single buffer. applied_price is a full ENUM_APPLIED_PRICE argument; the typical-price configuration described above is the conventional default rather than a fixed property. Donald Lambert introduced CCI in 1980 for commodity cycles, despite the name it works on any instrument.

Tín hiệu

Các tín hiệu có thể backtest của CCI — và điều kiện thị trường phù hợp với từng tín hiệu.

±100 Breakout

Sẵn sàng trong Builder
Điều kiện
CCI pushes through +100 or −100
Điều kiện tốt nhất
Trending markets
Sử dụng thông thường
Enter in the direction of a move that has become statistically unusual

±100 Reversion

Sẵn sàng trong Builder
Điều kiện
CCI returns from beyond +100 or −100
Điều kiện tốt nhất
Ranging markets
Sử dụng thông thường
Fade an extreme once it starts to unwind

Zero-Line Crossover

Sẵn sàng trong Builder
Điều kiện
CCI crosses zero
Điều kiện tốt nhất
Either regime
Sử dụng thông thường
Flip momentum bias, or exit a faded position

Divergence

Logic nâng cao
Điều kiện
Price makes a new extreme, CCI does not
Điều kiện tốt nhất
Trend exhaustion
Sử dụng thông thường
Anticipate a stall before price confirms

Triển khai trong MT5

Những gì MetaTrader 5 thực sự tính và vẽ — cơ sở tham chiếu cho mọi quy tắc trên trang này.

Bộ đệm

Chỉ số Bộ đệm MT5 vẽ dưới dạng Chứa gì
0 MAIN_LINE Line The CCI value. Unbounded in both directions — the ±100 levels are convention, not limits.

Ghi chú nền tảng

Hoạt động tốt nhất / sử dụng cẩn thận

Không có chỉ báo nào có lợi thế toàn diện. Đây là nơi CCI hỗ trợ — và nơi nó gây hiểu lầm.

Hoạt động tốt nhất

  • Instruments with clear cycles
  • As a breakout confirmation
  • With a regime filter
  • On higher timeframes

Sử dụng cẩn thận

  • Trading ±100 both ways at once
  • Assuming ±100 is a boundary
  • Short periods on noisy pairs
  • Optimised levels without validation

Xây dựng chiến lược CCI

Kết nối tín hiệu vào quy tắc vào lệnh và thoát lệnh, sau đó xuất EA MT5 có thể biên dịch — không cần code.

  1. CCI (14, Typical price)
  2. CCI above +100 → Open Buy · SL 40 / TP 80
  3. CCI below −100 → Open Sell

Kết hợp CCI với các chỉ báo khác

Một chỉ báo hiếm khi đứng một mình. Các cặp kết hợp này bù đắp điểm mù của CCI.

CCI + ADX

  1. ADX > 25
  2. CCI crosses +100
  3. Buy
Lý do
Decide which way to trade ±100 — through it when a trend exists, back from it when one does not
Điều kiện tốt nhất
Either, selected by the filter

No single-flow template pairs CCI with ADX. Start from CCI Level and add an ADX node with a Compare at 25 into an And gate.

Mở Builder →

CCI + Moving Average

  1. Price > MA
  2. CCI crosses +100
  3. Buy
Lý do
Take the breakout reading only in the direction of the underlying trend, so a statistical extreme never becomes a counter-trend entry
Điều kiện tốt nhất
Trend continuation

No single-flow template pairs CCI with a moving average. Add an MA node and a Price node into a Compare, gated with And ahead of the entry.

Mở Builder →

CCI + Bollinger Bands

  1. Price at lower band
  2. CCI < −100
  3. Buy
Lý do
Cross-check one deviation-based extreme against another, since the two measure distance-from-average on different scales
Điều kiện tốt nhất
Range / reversal

No single-flow template pairs CCI with Bollinger Bands. Start from Bollinger Bounce and add a CCI node with a Compare at −100.

Mở Builder →

Tham số

Giá trị ban đầu để xác nhận trên cặp tiền và khung thời gian của bạn — không phải cài đặt được đảm bảo.

Tham số Mặc định Khoảng thử nghiệm đề xuất Chức năng
Period 14 7–40 Window for both the moving average and the mean deviation. Lambert used 20; MT5 defaults to 14. Longer periods make ±100 a rarer, more meaningful event.
Applied price Typical Typical / Close / Open / High / Low / Median / Weighted Price series the calculation runs on. Typical price — (high + low + close) / 3 — is the original definition and MT5's default here, unlike most oscillators which default to Close.
Levels +100 / −100 ±80 to ±200 Your levels, not indicator inputs — iCCI has no threshold argument. Wider levels make signals rarer; ±200 is common on volatile instruments.
Shift 0 0–3 Which bar back the value is read from. Shift 1 compares against a fully closed bar.

Cài đặt sẵn ban đầu

Reactive 7 Frequent ±100 events
MT5 default 14 The Builder template's baseline
Lambert's original 20 Fewer, larger excursions

Ví dụ thị trường

Nơi CCI hoạt động, nơi nó thất bại, và bộ lọc thay đổi kết quả như thế nào.

Thành công

Breakout through +100

A range resolves upward and CCI pushes through +100 as it goes, with the reading staying elevated for the whole leg — the momentum case the template trades.

Thất bại

Fading a trend at +100

CCI crosses +100 and a fade is taken against it. The reading climbs past +250 and stays there for two sessions; ±100 was never a limit.

Đã lọc

Regime decides the direction

With a trend filter attached, +100 is traded through in a trending session and faded in a quiet one — the same level, two opposite rules, chosen by regime.

FAQ

Should I buy or sell when CCI crosses +100?
Both are established strategies and they are opposites, which is why the regime matters more than the level. Crossing +100 in a trending market is a momentum entry — the Builder template trades it this way. Returning from beyond +100 in a range is a fade. Pick one and let a filter decide when it applies; running both at once means one of them is always wrong.
Is CCI bounded like RSI?
No. The 0.015 constant in the formula scales typical readings into roughly ±100, but there is no ceiling. Readings past ±300 happen in strong moves. That is the single most important difference between CCI and a genuinely bounded oscillator such as RSI or Stochastic.
Why does CCI use typical price by default?
Because Donald Lambert defined it that way — typical price, (high + low + close) / 3, folds in the whole bar rather than just its settlement. iCCI does take a full ENUM_APPLIED_PRICE argument, so Close and the rest are available; MT5 and the Builder simply default to Typical, unlike most other oscillators.
What period should I use?
MT5 defaults to 14 and Lambert used 20; both are reasonable starting points. Shorter periods make ±100 an everyday event and longer ones make it rare, which changes what the level means far more than the number itself suggests. Re-validate on your own pair and timeframe.
Can I build a CCI EA without coding?
Yes for level and zero-line rules. The CCI Level template wires a CCI node into Compare nodes at +100 and −100, with the period and applied price exposed as EA inputs. Divergence is the exception — it needs multi-bar swing detection the node palette does not cover.
How should I validate settings before going live?
Backtest on quality tick data first, then run the EA on a demo account before risking money. When optimising, hold back data the search never saw and prefer settings that stay profitable across periods over the single in-sample peak — chasing that peak is overfitting the noise. No default or preset here is a performance promise; every value is a starting point to re-validate on your own pair and broker.

Glossary

Thuật ngữ chính