MagicTrigger MT5
- Indicators
-
Mostafa Ghanbari
✅ Founder of MGH Products
✅ Software Engineer | Custom Indicator & Expert Advisor Developer
✅ Published Author on MQL5.com - Version: 1.0
- Activations: 10
MagicTrigger is a multi-timeframe divergence engine that looks for a structural divergence on a higher timeframe (HD) and waits for it to be confirmed by matching divergences on lower timeframes (RD) inside the same price zone. Only when the higher-timeframe swing structure and the lower-timeframe confirmations align does the indicator mark a signal, together with a suggested entry trigger, stop loss, and two target levels.
This MetaTrader 5 edition builds its timeframe chain using the full range of periods available in MT5 — including M2, M3, M4, M6, M12, M20, H2, H3, H6, H8 and H12, in addition to the standard periods. Depending on the timeframe the indicator is attached to, the scan chain can include up to 15 timeframes, giving a noticeably finer-grained view of multi-timeframe structure than a chain built only from the standard MT4 period set.
How it works
The indicator scans a chain of timeframes above and below the chart's current period. On the higher timeframes it searches for a divergence pattern between price swings and a smoothed oscillator line (the "HD" divergence). It then checks whether the same directional divergence also appears on the lower timeframes within the time and price zone defined by the HD structure (the "RD" divergences). A signal is only produced when the required minimum number of lower timeframes confirms the higher timeframe structure, reducing the number of isolated, single-timeframe divergence signals.
Because the MT5 timeframe set includes several intermediate periods that MT4 does not offer, the confirmation chain can step through the market structure more gradually — for example, using M2, M3, and M4 as separate confirmation layers rather than jumping directly from M1 to M5. This can make the Min TF Count With RD setting more precise, since each additional layer represents a smaller, more incremental step in timeframe rather than a larger jump.
Main features
- Automatic multi-timeframe scan chain built from the current chart period, using the extended MT5 timeframe set (up to 15 timeframes depending on the chart period).
- Adjustable History Scan Depth to control how many bars are analyzed on chart load.
- HD Divergence Range and RD Divergence Range inputs to control how far apart the swing points used in each divergence may be — narrower ranges tend to give fewer but cleaner signals, wider ranges look further back for structure.
- Min TF Count With RD input (1–9, depending on chart period) to set how many lower timeframes must confirm the higher timeframe divergence before a signal is drawn — raising this filters for stricter, more selective signals. An optional automatic mode can scale this minimum based on the number of timeframes available on the current chart period.
- Optional HD Return Candle filter that requires a confirming reversal candle on the higher timeframe before a signal is accepted, which can reduce premature signals at the cost of later entries.
- On-chart trend lines marking the HD and RD divergence structure, so the reasoning behind each signal is visible directly on the chart.
- Suggested entry trigger, stop loss and two target lines drawn automatically, with stop loss placement configurable to the nearer or farther swing point.
- Position size suggestion based on a user-defined risk percentage of account balance and the distance to the stop loss.
- Buy/Sell arrows, pop-up alerts, sound alerts, push notifications and email alerts for new signals.
- Built on MT5's native indicator handle architecture, with persistent handles created once per timeframe for efficient calculation across the full scan chain.
- Works on any symbol and timeframe supported by the terminal.
Inputs at a glance
History Scan Depth, HD/RD Divergence Range, Min TF Count With RD, Auto Min RD mode, HD Return Candle, trendline colors and styles, arrow codes, money-management drawing options (target, stop loss, entry line, volume label), Risk Percent, stop-loss type (near/far swing), and standard alert options (window, sound, email, push notification).
Notes
Signal frequency and quality depend heavily on the Divergence Range and Min TF Count With RD settings, and results will vary by symbol, timeframe and market conditions. Because the MT5 edition scans a longer timeframe chain than the MT4 edition, initial calculation on chart load may take slightly longer, particularly on lower chart periods where up to 15 timeframes are scanned. As with any technical tool, testing on demo across different instruments and timeframes before live use is recommended so the settings can be adjusted to the trader's own approach.
A MetaTrader 4 version of this indicator is also available, built on a six-timeframe scan chain using the standard MT4 period set.
For support or questions, please use the built-in product chat on the MQL5.com product page.
A detailed user guide covering every input is available on request — after purchase, send a Private Message to receive it.
MT4 Version : https://www.mql5.com/en/market/product/186226/
