Commodity Channel Index Calculator
Calculate CCI from entered high, low and close bars using typical price, the current-window mean absolute deviation and the standard 0.015 constant.
Enter ordered high-low-close bars
Use one consistent symbol, timeframe and broker feed. Every close must fall inside its entered range.
One row per line: high, low, close, with an optional label first. Commas, semicolons or tabs are accepted.
Entered-series Commodity Channel Index
Entered Directional Indicators 1.0.0.
| Label | High | Low | Close | Typical price | SMA | Mean deviation | CCI |
|---|
How the entered CCI is calculated
Mean deviation = Mean of |Typical price − current-window SMA|
CCI = (Current typical price − SMA) ÷ (0.015 × Mean deviation)
Each completed N-bar window has one typical-price average and one N-divisor mean absolute deviation. The current typical-price difference is divided by 0.015 times that deviation.
When mean deviation is zero, this model returns CCI zero, matching the published MetaQuotes CCI source implementation.
Worked example from the audited fixture
How to interpret the result
The negative value means the latest typical price is below this window’s typical-price average after scaling by mean deviation. The 0.015 constant changes the scale, not the evidence. No overbought, oversold or trading state is assigned.
Assumptions and limits
- Every bar must satisfy high at least low and close inside the inclusive high-low range.
- All bars must use one symbol, timeframe and broker feed.
- Labels are descriptive; the page does not parse dates, sort bars or repair gaps.
- The constant is fixed at 0.015 and the deviation uses all N observations in the current window.
- Values near plus or minus 100 are not classified as thresholds, reversals or trade signals.
Frequently asked questions
- Enter at least the selected period of ordered high, low and close bars from one consistent symbol, timeframe and broker feed.
- The entered high, low and close are added and divided by three for each bar.
- It is the arithmetic mean of the N typical prices in the completed rolling window.
- The absolute distance between each window typical price and that window average is summed and divided by N.
- Version 1.0.0 uses the standard fixed constant 0.015.
- The model reports CCI zero, matching the published MetaQuotes CCI source implementation.
- Not necessarily. Available history, applied price and implementation details can change early or customized values.
- No. The page does not classify thresholds, cycles, divergence, direction, entries or exits.
Sources and methodology
- MetaQuotes Code Base — Commodity Channel Index — Published MetaQuotes source for typical price, deviation and denominator handling.
- MetaTrader 5 Help — Commodity Channel Index — Official indicator context and component definitions.
- MetaTrader 5 Help — Technical Indicators — Official typical-price definition.
Continue entered-indicator analysis
Compare the chart feed and trading terms
Use one consistent broker feed for every entered observation and verify the symbol's price precision, spread and trading conditions before using any measurement in a plan.
Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

