Dynamic Trend Follower MT4
- Göstergeler
- Sürüm: 1.0
Dynamic Trend Follower Main Chart Indicator Deep Analysis: Dual MA Color Change + Cross Markers + Buy/Sell Signals + Trend Reversal + Strong Cross
Indicator Overview
Dynamic Trend Follower is a premium main chart moving average crossover composite signal indicator designed exclusively for the MT4 platform. It breaks through the limitations of traditional single moving averages or simple crossovers by integrating a Dual MA Trend Color Change System, Cross "+" Markers with Spread Percentage, Buy/Sell Signal Arrows, Trend Reversal Prompts, and Strong Cross Recognition, combined with MA state determination and multi-layer signal annotation mechanisms, to visually present market trend direction, crossover burst points, and key reversal warnings directly on the main chart. Its core value lies in leveraging multi-dimensional MA algorithm fusion and signal filtering mechanisms to help traders precisely identify high-probability trend-following and reversal opportunities in complex market conditions.
1. Core Signal System
1.1 Dual MA Trend Color Change System
● Short MA — Width 2: Up = Lime Green / Down = Red / Flat = Blue
● Long MA — Width 3: Up = Lime Green / Down = Red / Flat = Blue
● Trading Significance: Visually determine MA direction through color — green represents bullish trend, red represents bearish trend, blue represents consolidation. Both lines same color = clear trend; different colors = transitional or ranging state.
1.2 Cross Marker System
● Golden Cross "+" — Green: Displays green "+" when short MA crosses above long MA, with MA spread percentage annotated below (white small text).
● Death Cross "+" — Red: Displays red "+" when short MA crosses below long MA, with MA spread percentage annotated above (white small text).
● Spread Percentage: Calculated as (Short MA - Long MA) / Long MA × 100%, used to quantify cross strength.
1.3 Buy/Sell Signals
● Buy — Green Arrow + Text: Activated when golden cross triggers AND current close > previous close. Represents a confirmed golden cross valid buy signal, filtering false crosses.
● Sell — Red Arrow + Text: Activated when death cross triggers AND current close < previous close. Represents a confirmed death cross valid sell signal, filtering false crosses.
1.4 Trend Reversal Signals (Trend Up / Trend Down)
● Trend Up — Green Text: Activated when short MA is above long MA currently AND was below long MA in previous period. This is the landmark signal for trend shifting from bearish to bullish.
● Trend Down — Red Text: Activated when short MA is below long MA currently AND was above long MA in previous period. This is the landmark signal for trend shifting from bullish to bearish.
1.5 Strong Cross (Strong GC / Strong DC)
● Strong GC — Yellow Text: Activated when golden cross triggers AND close is above both short MA and long MA. Represents an extremely strong golden cross with price above both lines, indicating abundant bullish momentum.
● Strong DC — Yellow Text: Activated when death cross triggers AND close is below both short MA and long MA. Represents an extremely strong death cross with price below both lines, indicating abundant bearish momentum.
2. Practical Trading Strategies
2.1 Trend Confirmation Filter
● Only adopt buy signals (Buy / Trend Up / Strong GC) when both short and long MAs are green simultaneously.
● Only adopt sell signals (Sell / Trend Down / Strong DC) when both short and long MAs are red simultaneously.
● When MAs show blue (flat), market is ranging — signal reliability decreases, recommend observation or light positions.
2.2 Multi-Signal Resonance
● When 2 or more buy signals appear on the same candle (e.g., Buy + Trend Up + Strong GC triggered simultaneously), signal reliability increases significantly.
● The indicator supports multi-layer text overlay per candle (Cross marker + Spread % + Buy + Trend Up + Strong GC), facilitating identification of signal-dense areas.
● Key Focus: Strong GC + Buy resonance represents an extremely high-probability trend initiation point.
2.3 Layered Operation Recommendations
● Probe Position (10-20%): Suitable for early signals like Trend Up / Trend Down, light position probing.
● Standard Position (30-50%): Suitable for confirmation signals like Buy / Sell, normal position sizing.
● Add Position (50-80%): Suitable for strong signals like Strong GC / Strong DC, adding positions with the trend.
● Reduce/Take Profit: Begin partial profit-taking when opposing signals appear, retain base position.
● Clear/Reverse: Decisively clear positions or reverse when strong opposing signals appear.
3. Parameter Configuration Guide
3.1 Core Parameters
● Short MA Period: Default 50. Calculation period for the short moving average.
● Long MA Period: Default 100. Calculation period for the long moving average.
● MA Type: Default EMA. Options: SMA (Simple MA), EMA (Exponential MA), WMA (Weighted MA), LRF (Linear Regression Forecast).
● Text Gap ATR: Default 0.35. Distance between signal text and candles (calculated in ATR multiples), automatically adapting to different volatility levels.
● Max Lookback Bars: Default 2000. Maximum number of candles for historical signal annotation; higher values display more historical signals.
3.2 Alert Settings
● Popup Alert: Enabled by default.
● Push Notification: Disabled by default. Note: MT4 push notifications have a frequency limit of approximately 10 per minute.
● Email Alert: Disabled by default.
● Sound Alert: Enabled by default; sound files are located in the MT4 Sounds directory.
● Alert On Bar Close: Enabled by default. Alerts are triggered only after candle close confirmation to avoid intrabar false signals.
3.3 Individual Signal Alert Switches
● Each signal can independently control whether alerts are triggered, including Buy, Sell, Trend Up, Trend Down, Strong GC, Strong DC.
● Traders can enable alerts only for signals of interest based on their trading style to avoid information overload.
4. Signal Color & Arrow Quick Reference
4.1 Buy Signals (Displayed Below Candles)
● Buy — Green Arrow + Text — Confirmed golden cross buy
● Trend Up — Green Text — Trend shifts from bearish to bullish
● Strong GC — Yellow Text — Strong golden cross (price above both lines)
● Golden Cross "+" — Green "+" — MA golden cross marker + spread percentage
4.2 Sell Signals (Displayed Above Candles)
● Sell — Red Arrow + Text — Confirmed death cross sell
● Trend Down — Red Text — Trend shifts from bullish to bearish
● Strong DC — Yellow Text — Strong death cross (price below both lines)
● Death Cross "+" — Red "+" — MA death cross marker + spread percentage
4.3 MA Color Description
● Green Line: MA trending up (bullish direction)
● Red Line: MA trending down (bearish direction)
● Blue Line: MA flat (consolidation state)
5. Source Code Architecture
5.1 Drawing Buffers (8)
● Buffers 0-2: Short MA Up/Down/Flat segments
● Buffers 3-5: Long MA Up/Down/Flat segments
● Buffers 6-7: Buy/Sell arrow signals
5.2 MA Algorithm Implementation
● SMA: Custom MaAt() function for Simple Moving Average
● EMA: Custom EmaStep() function for per-bar Exponential Moving Average recursion
● WMA: Custom WmaAt() function for Weighted Moving Average (decreasing weights)
● LRF: Custom LrfAt() function for Linear Regression Forecast (least squares fitting)
5.3 Text Annotation System
● Drawn using OBJ_TEXT objects, supporting Arial font and multiple font sizes
● Buy signals displayed in three layers below candle low (Buy / Trend Up / Strong GC)
● Sell signals displayed in three layers above candle high (Sell / Trend Down / Strong DC)
● Cross "+" markers include MA spread percentage, spacing auto-adapts via ATR multiples
5.4 Alert System
● Maximum one alert per candle per direction, preventing duplicates
● Bar close confirmation mode checks bar[1] (just-closed candle)
● Supports popup, push notification, email, and sound alerts
● lastBuyAlert / lastSellAlert static variables prevent duplicate alerts on same candle
6. Summary
● Dynamic Trend Follower is a comprehensive MT4 main chart indicator integrating "Dual MA Color Change + Cross Markers + Buy/Sell Confirmation + Trend Reversal + Strong Cross".
● Core Formula: MA color sets direction, cross markers capture timing, multi-signal resonance improves win rate, bar close confirmation filters noise.
● Both lines green → Long bias, focus on Buy, Trend Up, and Strong GC signals.
● Both lines red → Short bias, focus on Sell, Trend Down, and Strong DC signals.
● Multiple signals triggered simultaneously → High-probability trading opportunity, consider increasing position size.
● Larger spread percentage → Stronger cross, more abundant trend momentum.
