Indicators
Rebuild a CCI reading from five candles

Start with the candle under the cursor
Attach Commodity Channel Index to a chart, set the period to 5 and choose Typical Price. Open the Data Window and point to a closed candle. Record the high, low and close for that candle and its four predecessors, oldest first. Keep more decimals than the indicator displays. Typical price gives the high, low and close equal weight; substituting the close alone changes both the centre and the distance from it.
Build the denominator first
Use synthetic typical prices 98, 99, 100, 101 and 102. Their mean is 100. Measure each price against this same mean; the five absolute distances sum to 6. Dividing by 5 gives 1.2. A spreadsheet that takes a separate trailing mean at each row will quietly answer a different question. Strip out intermediate rounding and keep a column of the five distances so this mistake is visible.
CCI = (TP − mean(TP)) / (0.015 × mean(|TP − mean(TP)|))
Explain the final reading
The final price sits 2 units above the mean. Divide that distance by 0.015 times 1.2 to get about 111.11. Now replace the window with 96, 100, 100, 102 and 102. The mean and final price are unchanged, but the distances sum to 8. The new reading is about 83.33. The drop through 100 came entirely from the spread of the observations; there was no fall in the final price.
Check a disagreement at its source
Compare the intermediate values in order: timestamp, applied price, mean, mean absolute deviation, final rounding. Using a standard deviation function changes the denominator even on the first example. If all five prices are identical the expression has a zero denominator. Flag that row separately and inspect your terminal's convention before treating any displayed zero as a genuine crossing.
Take the result back to a chart
Pick one closed candle near a threshold and the next closed candle. Slide the window by exactly one row. Mark both the outgoing price and the incoming price. If the threshold crossing disappears when you accidentally keep the old mean, you have found a windowing error. Save the two timestamped worksheets with the symbol and timeframe so a second reader can reproduce the comparison.
Practice files
These CSV files contain synthetic teaching data, not market observations or investment results.















