CCI explained, and how to write it as a condition
The Commodity Channel Index has nothing to do with commodities any more. It is a measure of how far price has stretched from its own recent average, in units of how much it usually varies — which is what lets one level mean the same thing on gold, on a currency pair and on a coin.
What it measures
Each bar, CCI takes the typical price — the average of the high, low and close — and compares it with the average typical price over the last N bars, twenty by default. The difference is then divided by how much the typical price has usually strayed from that average over the same window. The result is centred on zero: positive when price is above its recent average, negative when below, and larger the further it has stretched.
The division is the point. A reading of +100 does not mean "price is some fixed amount above average"; it means "price is further above average than it usually gets on this market". That makes the levels portable between instruments in a way a fixed price distance is not. The conventional reading is that above +100 and below −100 are the unusual regions; most bars on most markets fall between them.
The settings
- Period. How many bars the average and the typical deviation are measured over. Twenty is the default. Shorter reaches ±100 more often; longer makes ±100 a rarer event.
- Threshold. The level the "greater than", "less than" and "crosses" conditions compare against. One hundred is the default; the zero-line conditions ignore it.
- Smoothing. Optionally, an average applied to the reading itself — none by default. Useful if the raw line is too jumpy to cross a level cleanly on the timeframe you read.
Writing it as a condition
These are the comparisons SixOne8 offers, in the builder's own words.
- Above zero / below zero. Price is above, or below, its recent average. A state.
- Crosses above / below zero. The bar where it moves through zero. A moment.
- Greater than / less than the threshold. True for every bar the reading is beyond the level you set. A state.
- Crosses above / crosses below the threshold. True only on the bar it moves through the level — the usual choice for a trigger.
- Rising / falling. The reading is higher, or lower, than the bar before.
CCI(20) on 1h · crosses below · -100
Read it as a sentence: on the 1-hour chart, the twenty-period CCI has just dropped through −100 — price has stretched unusually far below its own average. That is what the scanner evaluates at each hourly close.
Two ways people read it
The same crossing is read in opposite directions by different strategies, and the app does not take a side. One reading treats a cross beyond ±100 as a stretch that is likely to ease: a condition that fires on crosses below −100 in a long strategy, paired with a slower condition that says the larger trend is still up. The other treats a cross above +100 as a move gathering pace, and uses it as a trigger in the direction of the stretch. Both are legitimate things to test; neither is true in general. Which one holds on the market and timeframe you care about is exactly what an entry check measures.
Before you trust it
Run an entry check. It will tell you whether, on the market you care about, the moments this condition fired moved any differently from a random moment over the history tested. That is a fact about the past on that market, and it is the only kind of fact a test here produces.