- The **Coral** filter is a smooth, low-lag trend indicator that chains six cascaded EMA passes and combines stages 3–6 using polynomial coefficients...
The **Coral** filter is a smooth, low-lag trend indicator that chains six cascaded EMA passes and combines stages 3–6 using polynomial coefficients derived from a "Constant D" parameter. Originally adapted by [LazyBear](https://www.tradingview.com/u/LazyBear/) from an MT4 implementation, Coral produces a responsive trend line with significantly less lag than a single EMA of equivalent smoothness.
**Category:** Trends (IIR)
**Minimum bars:**`period`
## Origin and Sources
The Coral filter appeared in TradingView as "Coral Trend Indicator" by LazyBear, who adapted it from MetaTrader 4 code. The algorithm uses 6 cascaded EMAs — a technique similar to T3 (Tillson T3) — combined with polynomial weighting controlled by a single "Constant D" parameter.
The name "Coral" is not an acronym; it refers to the smooth, organic appearance of the resulting trend line.
## Calculation
### Parameters
| Parameter | Type | Default | Range | Description |
Coral is most similar to T3 in structure (6 cascaded EMAs), but uses a different coefficient derivation. T3 uses a "volume factor" to compute its combination weights, while Coral uses "Constant D" with a cubic polynomial.
## Pitfalls and Edge Cases
1.**Lag in trending markets**: Like all smoothing indicators, Coral lags behind price. Higher periods and higher cd values increase lag.
2.**Whipsaw in ranging markets**: Frequent crossovers during consolidation can produce false signals.
3.**cd range**: cd must be in [0, 1]. Values outside this range produce invalid coefficients.
4.**Warmup**: The 6-cascade structure means Coral needs more bars than a single EMA to fully stabilize, despite the warmup period being set to `period`.
CORAL(N, cd) runs 6 cascaded EMA stages with a shared alpha. The polynomial combination (bfr = −cd³·I6 + c3·I5 + c4·I4 + c5·I3) uses 4 precomputed coefficients computed at construction — so runtime is just 4 FMAs.
O(1) per bar. Six scalar FMAs for the cascade and 4 FMAs for the polynomial combination. WarmupPeriod = N. The shared alpha `di = (N-1)/2 + 1` slightly lengthens the effective period relative to standard EMA.
### Batch Mode (SIMD Analysis)
| Operation | Vectorizable? | Notes |
| :--- | :---: | :--- |
| 6 cascaded EMA passes | No | Each stage is a recursive IIR depending on previous output |
| Polynomial combination | Yes | 4 FMAs with constant coefficients; vectorizable across bars once EMA stages are computed |
All 6 EMA stages are recursive IIR — inherently sequential. The polynomial combination is the only vectorizable phase, but it contributes only 4 of the 40 total cycles. Batch mode coefficient: no meaningful SIMD speedup over scalar.