Follow the public recurrence
Let P be the chosen price series, S its smoothed value, C the cycle and a the fixed alpha. Brackets count earlier bars. Ehlers publishes the four-bar weights and the recursive filter; Sierra Chart documents the same core recurrence. This example retains the one-bar trigger from the book rather than adopting Sierra Chart's separately smoothed trigger.
- Arithmetic check with hypothetical established states: S = 103, S[1] = 102, S[2] = 100, C[1] = 2 and C[2] = 1 gives C = −0.931225 + 3.72 − 0.8649 = 1.923875. The trigger is 2.
- The weights sum to one. A constant input stays constant after smoothing, then its second difference is zero. A linear ramp also has zero second difference; with zero startup cycle values, its cycle stays zero even though price trends.
- A larger alpha reduces the persistence of the recursive state. It also changes frequency response and amplitude. Do not equate alpha to the number of bars in a measured market cycle.
| Stage | Calculation |
|---|---|
| Input | P = (high + low)/2 |
| Smoother | S = (P + 2P[1] + 2P[2] + P[3])/6 |
| Cycle recurrence | C = (1 − a/2)² × (S − 2S[1] + S[2]) + 2(1 − a)C[1] − (1 − a)²C[2] |
| Delayed trigger | T = C[1] |
| Coefficients at a = 0.07 | 0.931225, 1.86 and −0.8649 |