Account for all five terms
Let P be the source price, I the trendline, a the fixed alpha and q = 1 − a. Brackets indicate previous bars. The recurrence is I = (a − a²/4)P + (a²/2)P[1] − (a − 3a²/4)P[2] + 2qI[1] − q²I[2]. Ehlers gives this formula in equation 2.9 and the indicator in Figure 3.4. The table evaluates each coefficient at a = 0.07.
- These terms work together. The negative coefficients mean I need not lie between recent prices. It is not a weighted average with exclusively positive weights.
- The three price coefficients sum to a², while the two state coefficients sum to 1 − a². With P and both states equal to 100, the next I remains 100. This is a useful constant-input check.
- The default input is hl2 = (high + low)/2. Changing it to close changes the observations. This version holds alpha fixed; it does not estimate a dominant cycle or adapt alpha like MAMA.
- Sierra Chart documents the same recurrence but accepts length n and maps it to a = 2/(n + 1). Alpha 0.07 corresponds algebraically to n ≈ 27.5714; rounding that to an integer changes the coefficient.
| Term | Coefficient | Role in this recurrence |
|---|---|---|
| Current price P | 0.068775 | Introduces the newest observation. |
| Previous price P[1] | 0.002450 | Adds the one-bar input contribution. |
| Price two bars ago P[2] | −0.066325 | Subtracts an older input contribution. |
| Previous trendline I[1] | 1.860000 | Carries the preceding recursive state. |
| Trendline two bars ago I[2] | −0.864900 | Completes the second-order feedback. |