mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-25 13:58:04 +00:00
v0.8.6: update indicator docs, ndepend tooling, ALMA refactor, gitignore cleanup
This commit is contained in:
@@ -13,9 +13,7 @@
|
||||
| **PineScript** | [cma.pine](cma.pine) |
|
||||
|
||||
- The Cumulative Moving Average (CMA) calculates the arithmetic mean of ALL data points seen so far, not just a fixed window.
|
||||
- Parameterized by `source`.
|
||||
- Output range: Varies (see docs).
|
||||
- Requires `1` bars of warmup before first valid output (IsHot = true).
|
||||
- **Similar:** [SMA](../../trends_FIR/sma/Sma.md), [EMA](../../trends_IIR/ema/ema.md) | **Trading note:** Cumulative Moving Average; running mean of all data points. Anchored VWAP without volume weighting.
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
The Cumulative Moving Average (CMA) calculates the arithmetic mean of ALL data points seen so far, not just a fixed window. Unlike SMA or EMA which use a sliding window, CMA treats every historical value with equal weight. As the sample size grows, each new value has diminishing impact on the average.
|
||||
@@ -124,4 +122,4 @@ CMA is a fundamental statistical operation rather than a standard TA library ind
|
||||
1. **Responsiveness**: CMA becomes nearly unresponsive after many values. For a reactive average, use SMA or EMA instead.
|
||||
2. **Memory of Bad Data**: A single extreme outlier early in the stream permanently affects the average. Consider filtering before feeding CMA.
|
||||
3. **No Period Parameter**: Unlike SMA/EMA, CMA has no period. It always includes all data. This is by design.
|
||||
4. **Session Resets**: If you need per-session averages, call `Reset()` at session boundaries.
|
||||
4. **Session Resets**: If you need per-session averages, call `Reset()` at session boundaries.
|
||||
Reference in New Issue
Block a user