Close Minus Moving Average – CMMA
Note: Please install before CMMA Log ATR indicator.
Note 2 – there is an updated version for SQX Build 140 and above.
The idea for this indicator came from Timothy Masters, author of the book Statistically Sound Indicator For Financial Market Prediction.
We simply compute the moving average of log closing prices over a look-back period that does not include the current case and subtract it from the log value of the current closing price. The normalization of this indicator is composed of three components. The most important one is divided by the actual range of log prices with ATR, which includes the current bar. This scaling compensates for both regimes and markets with different inherent volatility. A second normalization is that we divide by the square root of one plus the lookback.
Source: Statistically Sound Indicators For Financial Market Prediction: Algorithms in C++
The indicator has one line:
- CMMA
We have added these conditions as custom blocks:
- CMMA is above/below Level
- CMMA is rising/falling
- CMMA crosses above/below Level
Indicator is implemented for: MT4/MT5/Tradestation/ Multicharts.
You can download the indicator and conditions here.


Excellent !!! Thank you Ivan !!!
Seems to have errors during compile
Can you please send us a strategy affected by this? Please send to support@Kevin.com email
Figured it out, need to import LogATR first before CMMA. Thanks.
Hello
Pseudo Code not generated for this indicator, error “When calling macro “printInput””
MT4, MT5 & Easylanguage code are ok.
Please fix the indicator, it seems an interesting one.
try adding “true” in the template (CMMA.tpl, in user\extend\Code\PseudoCode\blocks folder), not sure if it’s correct fix but the error seems to go away
Hi Ivan, first of all, thank you, your contributions are always excellent. In this case, I tried installing CMMA on my SQ and it won’t compile (I tried both). Is there another version of the indicators? My SQ version is 142.2336. Thanks!