Dual Trend Navigator
- Эксперты
-
Alex Amuyunzu Raymond
I’m an experienced MQL5 developer and software engineer specializing in building robust, high-performance algorithmic trading systems for MetaTrader 5. My work goes beyond standard EA development — I design intelligent, scalable solutions that combine market logic, automation, and external - Версия: 1.10
- Активации: 5
Dual Trend Navigator: Trade the Turn, Manage the Trend
Dual Trend Navigator is a rules-based Expert Advisor for MetaTrader 5. It detects trend reversals through the crossover of two exponential moving averages, then handles entry, risk, protection and exit within one disciplined framework. It does not use martingale, grid averaging or hidden recovery methods. Every trade has a defined stop loss and take profit, and every decision follows parameters you can see and control.
Strategy Logic
The advisor tracks a fast EMA (default 20) and a slow EMA (default 50). A golden cross occurs when the fast average crosses above the slow one and produces a buy signal. A death cross occurs when it crosses below and produces a sell signal. Signals are evaluated only on completed bars, at the opening of a new bar, so a signal never appears and then disappears within a candle. When a signal in the opposite direction appears, the existing position is closed first and a new one opened only if all filters agree. The EMA periods and the applied price are fully adjustable.
Trade Direction Control
Choose Buy Only, Sell Only or Buy and Sell. In a single-direction mode, positions are closed by their stop loss, take profit, break-even or trailing stop, rather than by an opposite signal.
Trend Filter (Optional)
A third EMA (default 200) can act as a directional filter. Buy signals are accepted only when the last completed bar closed above it, and sell signals only when it closed below. This reduces counter-trend entries in ranging or reversing markets. An opposite position is still closed on a valid cross, even when the filter rejects the new entry.
Position Sizing
Use a fixed lot size or automatic risk-based sizing. In automatic mode, the lot size is calculated from the percentage of account balance you are willing to risk and the distance to the stop loss. The volume is aligned with the symbol's minimum, maximum and step values. Before sending an order, the advisor checks the required margin against free margin and reduces the volume when necessary.
Stop Loss and Take Profit
By default, the stop loss and take profit are set in points, with the current spread added so the intended distance is preserved. As an alternative, you can enable ATR-based levels, where the stop and target are multiples of the Average True Range of the last completed bar (default period 14, multipliers 2.0 and 4.0). Distances that fall below the broker's minimum stops level are automatically adjusted, which helps prevent invalid-stops rejections.
Break-Even and Trailing Stop
Once a position reaches the profit trigger you define, the stop is moved to the entry price plus a small offset to protect capital. An optional trailing stop then follows price at a fixed distance and moves in steps you set. All modifications respect the broker's stops and freeze levels.
Session Control
Restrict trading to a defined window in server time (default 07:00 to 21:00). Overnight windows that cross midnight are supported. An optional Friday close shuts open positions and blocks new entries after a chosen time, reducing weekend exposure.
Market Protection
- Maximum spread filter: entries are skipped when the spread exceeds your limit. The default of 0 disables it.
- Gap protection: at a day boundary, entries against the direction of a large opening gap are skipped.
- Daily loss limit: when equity falls below the set percentage of the day's starting equity, new entries are paused until the next trading day. Open positions are not force-closed by this limit.
On-Chart Dashboard
A compact panel shows the trade mode, operating status, current position, last executed signal, live spread, free margin, session state and daily profit or loss. The status changes from Active to Paused when the daily limit is reached.
Compatibility and Operation
- Works on any symbol and timeframe.
- Supports both hedging and netting accounts.
- Uses a magic number to manage only its own trades.
- Opens a maximum of one position per direction.
- Requires no DLLs and no external files.
Recommended Use
Test on a demo account and in the Strategy Tester with the symbol, timeframe and broker conditions you plan to use. Start with conservative lot sizes or a low risk percentage.
Risk Disclosure
Trading leveraged instruments carries a high level of risk and may not be suitable for all investors. Backtest results are hypothetical and do not guarantee future performance. Trade only with capital you can afford to lose.
