
🔥 "The Eyes of Christ" – See the Trend Before It Sees You!"
📌 Overview
The Eyes of Christ is a custom trend-following indicator written in MQL4 that aims to detect momentum shifts and trend reversals using statistical calculations and price action behaviors. It provides visual trend strength indications and trade alerts based on a custom regression-based analysis and simple pattern conditions.
⚙️ How the Indicator Works
This indicator uses linear regression to analyze price movements over a defined window of past candles. Here's the breakdown:
Regression Calculation:
For each candle, the indicator calculates a linear regression slope (ld_76) and the corresponding regression value (ld_84).
These values are used to detect momentum direction.
Trend Strength Representation:
If the regression value is increasing: a positive value is stored in g_ibuf_92 (green buffer).
If decreasing: a negative value is stored in g_ibuf_88 (red buffer).
Over time, this creates upward and downward curves in the indicator window that reflect trend strength and direction.
Trade Signal Detection:
The indicator checks for a very narrow candle (where Open = High = Low = Close) and a momentum reversal:
Buy Signal: If the slope increases after decreasing.
Sell Signal: If the slope decreases after increasing.
Alerts and emails are optionally triggered when these conditions are met.
The stop loss is suggested using ATR (Average True Range) to set dynamic risk levels.
🔧 Settings and Parameters
ParameterTypeDescription
soundAlertsboolEnables/disables sound alert when a signal occurs. Default: TRUE
emailAlertsboolEnables/disables email alert when a signal occurs. Default: FALSE
No other input parameters are exposed for user adjustment, but the regression length (ld_0 = 35) and ATR period (50) are hardcoded. You can modify them directly in the code if needed.
🖥️ Display and Visual Features
Buffer 0 (Red line): Downtrend visual slope (if trend is weakening).
Buffer 1 (Green line): Uptrend visual slope (if trend is strengthening).
Buffer 2 (Yellow internal buffer): Stores regression calculation but not shown on chart.
A label "REZA.KH 2025 | www.robomql.com" is drawn on the chart at every update.
📣 Alerts and Notifications
Alerts are triggered when:
A strong micro candle (same OHLC) forms,
Combined with a change in regression slope (momentum reversal),
Then:
Sound alert is triggered (if enabled),
Email alert is sent (if enabled),
Stop loss suggestion is calculated using ATR/2.
💡 Use Case in Trading
This indicator can be used for:
Scalping: on M5–M30 charts due to its sensitivity to micro candles.
Trend Confirmation: alongside other moving averages or momentum indicators.
Signal Generation: with alerts for quick entries based on volatility compression + momentum burst.
🎯 Slogan
"The Eyes of Christ – See the Trend Before It Sees You!"