MQL5/MQL4 port of dman103's Heikin Ashi Trend Indicator (TradingView). Combines HA candle smoothing with Tilson T3 moving average for clean trend signals. SAR-style positioning, 4-state color system with squeeze detection, 11 visual styles, multi-channel alerts. Non-repainting. All instruments and timeframes.
  • MQL5 56.8%
  • MQL4 43.2%
Find a file
2026-04-16 08:34:54 -06:00
Coral_Trend.mq4 Initial commit for Coral-Trend 2026-04-16 08:34:54 -06:00
Coral_Trend.mq5 Initial commit for Coral-Trend 2026-04-16 08:34:54 -06:00
README.md Initial commit for Coral-Trend 2026-04-16 08:34:54 -06:00

Coral Trend Indicator


🇺🇸 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 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇲🇽 Coral Trend Indicator v1.0

El Coral Trend Indicator es un port fiel del script de LazyBear en TradingView (más de 10,900 favoritos) para MetaTrader 4 y MetaTrader 5. Aplica el algoritmo T3 Moving Average de Tim Tillson (1998) como filtro de tendencia coloreado sobre el gráfico de precios.

Cómo funciona

El indicador pasa el precio a través de seis Medias Móviles Exponenciales en cascada y luego combina las etapas 3 a 6 usando coeficientes polinomiales binomiales derivados del parámetro Constant D. Esto produce una línea suave con menor retraso que una media móvil simple de suavizado equivalente.

La dirección de la tendencia se determina por la pendiente:

  • Alcista: el valor actual está por encima del valor de la barra anterior (línea verde)
  • Bajista: el valor actual está por debajo del valor de la barra anterior (línea roja)
  • Neutral: sin cambio entre barras (línea azul)

Características visuales

  • Línea de tendencia con cambio de color dibujada sobre el gráfico de precios
  • Coloración de tres estados: verde (alcista), rojo (bajista), azul (neutral)
  • Modo opcional de coloreo de velas por dirección de tendencia (solo MQL5)
  • Sistema de alertas multicanal en cambios de tendencia (popup, sonido, push, email)

Parámetros

Parámetro Valor por defecto Descripción
Smoothing Period 21 Longitud del filtro — valores mayores producen salida más suave
Constant D 0.4 Factor de volumen (0.0–2.0) — controla capacidad de respuesta vs suavizado
Applied Price Close Tipo de precio usado para el cálculo
Show Trend Line true Mostrar la línea Coral en el gráfico
Color Bars false Colorear velas por dirección de tendencia (solo MQL5)
Line Width 3 Grosor de la línea de tendencia (1–5)
Enable Alerts false Activar el sistema de alertas
Alert: Popup true Mostrar alerta emergente en cambio de tendencia
Alert: Sound false Reproducir sonido en cambio de tendencia
Alert: Push false Enviar notificación push en cambio de tendencia
Alert: Email false Enviar email en cambio de tendencia

Características clave

  • No repinta: las alertas se disparan solo en velas cerradas
  • Compatible con todos los símbolos y marcos temporales
  • Coeficientes precalculados en la inicialización para procesamiento eficiente
  • Mapeo de alpha equivalente: Smoothing Period 21 corresponde a T3 período 11

Fuente original

Coral Trend Indicator [LazyBear] — TradingView, publicado el 14 de enero de 2015 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇷🇺 Coral Trend Indicator v1.0

Coral Trend Indicator — точный порт скрипта LazyBear с TradingView (более 10 900 добавлений в избранное) для MetaTrader 4 и MetaTrader 5. Индикатор реализует алгоритм скользящей средней T3 Тима Тилсона (1998) в виде цветной линии тренда на ценовом графике.

Как работает

Индикатор пропускает цену через шесть последовательных экспоненциальных скользящих средних, затем комбинирует этапы с 3-го по 6-й с использованием биномиальных полиномиальных коэффициентов, определяемых параметром Constant D. В результате получается плавная линия с меньшим запаздыванием по сравнению с одиночной скользящей средней аналогичной степени сглаживания.

Направление тренда определяется по наклону:

  • Восходящий тренд: текущее значение выше значения предыдущего бара (зелёная линия)
  • Нисходящий тренд: текущее значение ниже значения предыдущего бара (красная линия)
  • Нейтральный: значение не изменилось (синяя линия)

Визуальные элементы

  • Линия тренда с изменением цвета на ценовом графике
  • Трёхцветная индикация: зелёный (рост), красный (падение), синий (нейтральный)
  • Опциональная окраска свечей по направлению тренда (только MQL5)
  • Многоканальная система оповещений при смене тренда (всплывающее окно, звук, push, email)

Параметры

Параметр По умолчанию Описание
Smoothing Period 21 Длина фильтра — большие значения дают более плавный результат
Constant D 0.4 Фактор объёма (0.0–2.0) — баланс между отзывчивостью и сглаживанием
Applied Price Close Тип цены для расчёта
Show Trend Line true Отображать линию Coral на графике
Color Bars false Окрашивать свечи по направлению тренда (только MQL5)
Line Width 3 Толщина линии тренда (1–5)
Enable Alerts false Включить систему оповещений
Alert: Popup true Всплывающее оповещение при смене тренда
Alert: Sound false Звуковой сигнал при смене тренда
Alert: Push false Push-уведомление при смене тренда
Alert: Email false Email-уведомление при смене тренда

Ключевые характеристики

  • Не перерисовывает: оповещения срабатывают только по закрытым барам
  • Совместим со всеми инструментами и таймфреймами
  • Коэффициенты рассчитываются при инициализации для быстрой обработки тиков
  • Эквивалентное отображение alpha: Smoothing Period 21 соответствует периоду T3 = 11

Оригинальный источник

Coral Trend Indicator [LazyBear] — TradingView, опубликован 14 января 2015 г. https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇯🇵 Coral Trend Indicator v1.0

Coral Trend IndicatorはLazyBearのTradingViewスクリプト(お気に入り登録10,900件以上)をMetaTrader 4およびMetaTrader 5向けに忠実に移植したものです。Tim TillsonのT3移動平均アルゴリズム(1998年)を価格チャート上のカラートレンドフィルターとして実装しています。

仕組み

本インジケーターは価格を6段階の指数移動平均(EMA)に順次通し、ステージ3から6をConstant Dパラメーターから導出された二項多項式係数で合成します。同等の平滑度を持つ単一移動平均と比較して、遅延が少ない滑らかなラインを生成します。

トレンド方向は傾きで判定します:

  • 上昇トレンド:現在値が前のバーの値を上回る(緑のライン)
  • 下降トレンド:現在値が前のバーの値を下回る(赤のライン)
  • 中立:バー間で変化なし(青のライン)

表示機能

  • 価格チャート上に色が変化するトレンドライン
  • 3状態カラー表示:緑(上昇)、赤(下降)、青(中立)
  • トレンド方向によるローソク足着色モード(MQL5のみ)
  • トレンド変化時のマルチチャネルアラート(ポップアップ、サウンド、プッシュ通知、メール)

パラメーター

パラメーター デフォルト値 説明
Smoothing Period 21 フィルター長 — 大きい値ほど滑らかな出力
Constant D 0.4 ボリュームファクター(0.0–2.0)— 応答性と平滑性のバランス
Applied Price Close 計算に使用する価格タイプ
Show Trend Line true Coralラインをチャートに表示
Color Bars false トレンド方向でローソク足を着色(MQL5のみ)
Line Width 3 トレンドラインの太さ(1–5)
Enable Alerts false アラートシステムを有効化
Alert: Popup true トレンド変化時にポップアップ表示
Alert: Sound false トレンド変化時にサウンド再生
Alert: Push false トレンド変化時にプッシュ通知
Alert: Email false トレンド変化時にメール送信

主な特徴

  • リペイントなし:アラートは確定バーのみで発動
  • すべての銘柄・時間足に対応
  • 初期化時に係数を事前計算し、ティック処理を効率化
  • Smoothing Period 21はT3期間11に相当

元のソース

Coral Trend Indicator [LazyBear] — TradingView、2015年1月14日公開 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇨🇳 Coral Trend Indicator v1.0

Coral Trend Indicator 是 LazyBear 在 TradingView 上发布的脚本(超过 10,900 次收藏)向 MetaTrader 4 和 MetaTrader 5 的忠实移植。它将 Tim Tillson 的 T3 移动平均算法(1998年)实现为价格图表上的彩色趋势过滤线。

工作原理

该指标将价格依次通过六级指数移动平均线(EMA),然后使用由 Constant D 参数推导的二项式多项式系数,将第 3 至第 6 级进行合成。与同等平滑度的单一移动平均线相比,生成的曲线更平滑且滞后更小。

趋势方向通过斜率判定:

  • 上升趋势:当前值高于前一根K线的值(绿线)
  • 下降趋势:当前值低于前一根K线的值(红线)
  • 中性:K线之间无变化(蓝线)

显示功能

  • 价格图表上绘制变色趋势线
  • 三态着色:绿色(上升)、红色(下降)、蓝色(中性)
  • 可选的按趋势方向着色K线模式(仅限MQL5)
  • 趋势变化时的多通道报警系统(弹窗、声音、推送通知、邮件)

参数

参数 默认值 说明
Smoothing Period 21 过滤器长度 — 值越大输出越平滑
Constant D 0.4 容量因子(0.0–2.0)— 控制响应速度与平滑度的平衡
Applied Price Close 用于计算的价格类型
Show Trend Line true 在图表上显示Coral线
Color Bars false 按趋势方向着色K线(仅限MQL5)
Line Width 3 趋势线粗细(1–5)
Enable Alerts false 启用报警系统
Alert: Popup true 趋势变化时弹出报警
Alert: Sound false 趋势变化时播放声音
Alert: Push false 趋势变化时发送推送通知
Alert: Email false 趋势变化时发送邮件

关键特性

  • 不重绘:报警仅在已确认的K线上触发
  • 兼容所有交易品种和时间周期
  • 初始化时预计算系数,确保高效的逐笔处理
  • Smoothing Period 21 对应 T3 周期 11

原始来源

Coral Trend Indicator [LazyBear] — TradingView,2015年1月14日发布 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇧🇷 Coral Trend Indicator v1.0

O Coral Trend Indicator é uma portagem fiel do script de LazyBear no TradingView (mais de 10.900 favoritos) para MetaTrader 4 e MetaTrader 5. Implementa o algoritmo T3 Moving Average de Tim Tillson (1998) como um filtro de tendência colorido no gráfico de preços.

Como funciona

O indicador passa o preço por seis Médias Móveis Exponenciais em cascata e, em seguida, combina os estágios 3 a 6 usando coeficientes polinomiais binomiais derivados do parâmetro Constant D. O resultado é uma linha suave com menor atraso em comparação com uma média móvel simples de suavização equivalente.

A direção da tendência é determinada pela inclinação:

  • Tendência de alta: valor atual está acima do valor da barra anterior (linha verde)
  • Tendência de baixa: valor atual está abaixo do valor da barra anterior (linha vermelha)
  • Neutro: sem alteração entre barras (linha azul)

Recursos visuais

  • Linha de tendência com mudança de cor desenhada no gráfico de preços
  • Coloração de três estados: verde (alta), vermelho (baixa), azul (neutro)
  • Modo opcional de coloração de velas por direção de tendência (apenas MQL5)
  • Sistema de alertas multicanal em mudanças de tendência (popup, som, push, email)

Parâmetros

Parâmetro Valor padrão Descrição
Smoothing Period 21 Comprimento do filtro — valores maiores produzem saída mais suave
Constant D 0.4 Fator de volume (0.0–2.0) — controla responsividade vs suavização
Applied Price Close Tipo de preço usado no cálculo
Show Trend Line true Exibir a linha Coral no gráfico
Color Bars false Colorir velas pela direção da tendência (apenas MQL5)
Line Width 3 Espessura da linha de tendência (1–5)
Enable Alerts false Ativar o sistema de alertas
Alert: Popup true Alerta popup em mudança de tendência
Alert: Sound false Som em mudança de tendência
Alert: Push false Notificação push em mudança de tendência
Alert: Email false Email em mudança de tendência

Características principais

  • Não repinta: alertas disparam apenas em barras fechadas
  • Compatível com todos os símbolos e timeframes
  • Coeficientes pré-calculados na inicialização para processamento eficiente de ticks
  • Mapeamento alpha equivalente: Smoothing Period 21 corresponde ao período T3 = 11

Fonte original

Coral Trend Indicator [LazyBear] — TradingView, publicado em 14 de janeiro de 2015 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/


🇰🇷 Coral Trend Indicator v1.0

Coral Trend Indicator는 LazyBear의 TradingView 스크립트(즐겨찾기 10,900건 이상)를 MetaTrader 4 및 MetaTrader 5용으로 충실히 이식한 것입니다. Tim Tillson의 T3 이동평균 알고리즘(1998)을 가격 차트 위의 컬러 추세 필터로 구현합니다.

작동 방식

이 지표는 가격을 6단계 지수이동평균(EMA)에 순차적으로 통과시킨 후, Constant D 파라미터에서 도출된 이항 다항식 계수를 사용하여 3단계에서 6단계까지를 합성합니다. 동일한 평활도를 가진 단일 이동평균에 비해 지연이 적은 매끄러운 라인을 생성합니다.

추세 방향은 기울기로 판정합니다:

  • 상승 추세: 현재 값이 이전 바의 값보다 높음 (녹색 라인)
  • 하락 추세: 현재 값이 이전 바의 값보다 낮음 (빨간색 라인)
  • 중립: 바 간 변화 없음 (파란색 라인)

시각적 기능

  • 가격 차트 위에 색상이 변하는 추세선
  • 3단계 컬러 표시: 녹색(상승), 빨간색(하락), 파란색(중립)
  • 추세 방향에 따른 캔들 색상 모드 (MQL5 전용)
  • 추세 변화 시 다채널 알림 시스템 (팝업, 사운드, 푸시 알림, 이메일)

파라미터

파라미터 기본값 설명
Smoothing Period 21 필터 길이 — 값이 클수록 출력이 부드러워짐
Constant D 0.4 볼륨 팩터 (0.0–2.0) — 반응성과 평활성 간의 균형
Applied Price Close 계산에 사용할 가격 유형
Show Trend Line true 차트에 Coral 라인 표시
Color Bars false 추세 방향에 따라 캔들 색상 변경 (MQL5 전용)
Line Width 3 추세선 두께 (1–5)
Enable Alerts false 알림 시스템 활성화
Alert: Popup true 추세 변화 시 팝업 알림
Alert: Sound false 추세 변화 시 사운드 재생
Alert: Push false 추세 변화 시 푸시 알림
Alert: Email false 추세 변화 시 이메일 발송

주요 특성

  • 리페인트 없음: 알림은 확정된 바에서만 작동
  • 모든 심볼 및 타임프레임과 호환
  • 초기화 시 계수를 사전 계산하여 틱 처리 효율 향상
  • Smoothing Period 21은 T3 기간 11에 해당

원본 소스

Coral Trend Indicator [LazyBear] — TradingView, 2015년 1월 14일 게시 https://www.tradingview.com/script/qyUwc2Al-Coral-Trend-Indicator-LazyBear/