Coral mt4
- Indicatori
- Ulises Calderon Bautista
- Versione: 1.0
### 🇺🇸 Coral Trend Indicator v1.0
The Coral Trend Indicator is a faithful port of LazyBear's TradingView script (10,900+ favorites) to MetaTrader 4 and MetaTrader 5. It applies Tim Tillson's T3 Moving Average algorithm (1998) as a color-coded trend filter on the price chart.
#### How it works
The indicator passes the price through six cascaded Exponential Moving Averages, then combines stages 3 through 6 using binomial polynomial coefficients derived from the Constant D parameter. This produces a smooth line with reduced lag compared to a single moving average of equivalent smoothness.
Trend direction is determined by slope:
- **Uptrend**: current value is above the previous bar's value (green line)
- **Downtrend**: current value is below the previous bar's value (red line)
- **Neutral**: no change between bars (blue line)
#### Visual features
- Color-changing trend line drawn on the price chart
- Three-state coloring: green (up), red (down), blue (neutral)
- Optional color bars mode that paints candles by trend direction (MQL5 only)
- Multi-channel alert system on trend changes (popup, sound, push, email)
#### Parameters
| Parameter | Default | Description |
|---|---|---|
| Smoothing Period | 21 | Filter length — higher values produce smoother output |
| Constant D | 0.4 | Volume factor (0.0–2.0) — controls responsiveness vs smoothness |
| Applied Price | Close | Price type used for calculation |
| Show Trend Line | true | Display the Coral line on chart |
| Color Bars | false | Color candles by trend direction (MQL5 only) |
| Line Width | 3 | Trend line thickness (1–5) |
| Enable Alerts | false | Activate the alert system |
| Alert: Popup | true | Show popup alert on trend change |
| Alert: Sound | false | Play sound on trend change |
| Alert: Push | false | Send push notification on trend change |
| Alert: Email | false | Send email on trend change |
#### Key characteristics
- Does not repaint: alerts fire on closed bars only
- Compatible with all symbols and timeframes
- Coefficients precomputed at initialization for efficient tick processing
- Equivalent alpha mapping: Smoothing Period 21 corresponds to T3 period 11
#### Original source
Coral Trend Indicator [LazyBear] — TradingView, published January 14, 2015
