MTForge NarTown EA
- Uzmanlar
- Hyumilkumar Suryakantbhai Patel
- Sürüm: 3.20
MTForge NarTown — Automated EA for MetaTrader 5
MTForge NarTown is a fully automated Expert Advisor for MetaTrader 5 based on a smoothed Heiken-Ashi / Triple Moving Average (TMA) crossover engine. The EA is designed for disciplined trend-following with strict risk control: every entry carries a pre-defined Stop Loss and Take Profit, while a layered ratchet system progressively tightens protection as the trade moves into profit.
The EA ships with EURUSD M30 tuned defaults, but all parameters are exposed and the logic is symbol-agnostic — it works on Forex pairs, Indices, Metals, Cryptocurrencies, and Futures CFDs, with a universal risk-units system (price, pips, or ticks) that adapts automatically to the instrument.
Strategy Overview
Signals are generated from a custom smoothed Heiken-Ashi engine combined with two Triple Moving Average (TMA) lines — referred to internally as Yasin Blue and Yasin Red. Entries occur on confirmed crossovers of these two lines, gated by an optional higher-timeframe EMA trend filter. The engine supports reversal handling: when a new opposite signal appears, the current position is closed and the EA waits a configurable cooldown before re-entering in the new direction.
This is a closed-source compiled EA (.ex5). It does not use martingale, grid, or hedging. Every trade has a fixed, visible Stop Loss and Take Profit at the moment of entry.
Key Features
- Heiken-Ashi + TMA signal engine with a three-level EMA cascade on both price and HLC3 smoothing.
- Multi-stage Ratchet trailing stop — Stage 1 moves the SL to breakeven, Stage 2 locks in profit, Stage 3 continuously runs the stop further as the move extends.
- EMA-based dynamic runner that trails the stop along a fast EMA once the trade is comfortably in profit.
- Time-based “dead money” ratchet — if the trade stalls for N bars and is in profit, the SL is tightened to breakeven to free capital for the next setup.
- ATR volatility filter to block entries during low-volatility chop.
- Session filter (true GMT) with a dedicated broker GMT offset input, so session hours remain correct on any broker without manual re-shifting.
- Spread filter to skip entries during wide-spread moments (news releases, low-liquidity sessions).
- Daily / Weekly drawdown circuit breaker that auto-disables trading when equity drawdown exceeds the configured threshold and re-enables at the next session reset.
- Percent-risk money management — optionally sizes each trade as a % of account equity based on the Stop Loss distance (with broker min/max/step clamping and a hard lot cap).
- On-chart control panel — five native MT5 buttons to toggle Strategy On/Off, Long On/Off, Short On/Off, EMA Filter On/Off, and a Panic-Close button that flattens and cancels pending orders instantly.
- Universal risk units (Price / Pips / Ticks) so a single binary runs on any symbol class.
- Tightest-SL-wins ratchet arbitration: when multiple ratchet systems are active, the EA applies whichever candidate Stop Loss is most favorable without ever moving the stop against you.
Technical Specification
| Platform | MetaTrader 5 (build 3815 or later recommended) |
| Account type | Hedging or Netting, any account currency |
| Default symbol | EURUSD (all parameters adjustable for other symbols) |
| Default timeframe | M30 (works on any timeframe after re-parameterization) |
| Minimum deposit | Depends on lot size and symbol; 500 USD is a reasonable starting point for EURUSD at 0.01 lots |
| Leverage | 1:30 or higher recommended |
| VPS | Strongly recommended for live trading — the EA operates on bar-close plus intra-bar ratchet monitoring |
Installation & Quick Start
- Copy MTForge_NarTown.ex5 to <MT5 Data Folder>\MQL5\Experts\ .
- Restart MetaTrader 5, open a EURUSD M30 chart, and drag the EA onto the chart.
- Enable Algo Trading in the main toolbar.
- In the EA's Inputs tab, set BrokerGmtOffsetHours to match your broker's server-time offset (for example, 2 for GMT+2 brokers).
- (Optional) Load the included .set preset file for ready-made EURUSD M30 parameters.
- Verify the on-chart buttons appear in the top-right corner.
Input Parameters
Strategy Parameters
- EMALength — length of the TMA engine's core EMA cascade.
- EmaFilterLength — length of the optional trend filter EMA.
Risk Management
- RiskMode — unit for PT/SL/BE inputs: Price distance (universal), Pips (forex), or Ticks.
- ProfitTargetValue — Take Profit distance in the selected units.
- StopLossValue — Stop Loss distance (equals 1R for all ratchet multipliers).
Classic Breakeven
- UseClassicBreakeven — enable the simple breakeven trigger.
- BreakevenTriggerValue — profit distance that activates breakeven.
- BreakevenOffsetTicks — ticks above/below entry to cover commissions.
Staged Ratchet (R-multiple)
- UseStagedRatchet — enable three-stage trailing.
- RatchetStage1Mult / RatchetStage2Mult — R-multiples that trigger each stage.
- RatchetStage2LockMult — profit (in R) locked at Stage 2.
- RatchetRunnerStepMult / RatchetRunnerMoveMult — runner step size and SL bump after Stage 2.
EMA-Runner
- UseEmaRunner — trail the Stop Loss along an EMA.
- EmaRunnerUseFast — use EMALength (fast) or EmaFilterLength (slow).
- EmaRunnerBufferTicks — tick buffer below (long) or above (short) the EMA.
- EmaRunnerMinProfit — minimum profit before the runner activates.
Time-Based Ratchet
- UseTimeRatchet — flip SL to breakeven after N bars if in profit.
- TimeRatchetBars — bars since entry threshold.
- TimeRatchetProfitOnly — require positive P/L to trigger.
ATR Volatility Filter
- UseAtrFilter — block entries when ATR is below threshold.
- AtrPeriod / AtrMinValue — ATR period and minimum value (in price units).
Session Filter
- UseSessionFilter — restrict entries to specific GMT hours.
- BrokerGmtOffsetHours — your broker's server time offset from GMT.
- SessionStartHourGMT / SessionEndHourGMT — session window in TRUE GMT.
- FlattenOutsideSession — close open positions when session ends.
Spread Filter
- UseSpreadFilter — reject entries when spread is too wide.
- MaxSpreadPips — maximum allowed spread in pips.
Drawdown Circuit Breaker
- UseDrawdownBreaker — auto-disable on equity drawdown.
- DailyDrawdownPercent / WeeklyDrawdownPercent — thresholds.
- BreakerFlattenPosition — close current position on trip.
- BreakerResetHourGMT — daily reset hour in TRUE GMT.
Money Management
- UseRiskPercent — dynamic lot sizing based on % equity risk.
- RiskPercentPerTrade — percentage of equity to risk per trade.
- RiskUseBalanceNotEquity — use Balance instead of Equity (default Equity).
- MaxLotCap / MinLotFloor — hard upper and lower bounds on lot size.
Trade Settings
- LotSize — fixed lot size when UseRiskPercent is disabled.
- MagicNumber, TradeComment, CooldownBars.
On-Chart Control Panel
The EA creates five native chart buttons for real-time manual control:
- STRATEGY — master on/off toggle.
- LONG — enable or disable long entries.
- SHORT — enable or disable short entries.
- EMA FILTER — toggle the trend filter at runtime.
- CLOSE & DISABLE — panic close: flattens the current position, cancels all pending orders for this symbol, and disables the strategy.
Recommended Usage
- Run a backtest in the MT5 Strategy Tester on your broker's historical data using Every tick modeling.
- Before going live, forward-test on a demo account for at least four to six weeks to validate the setup against your broker's specific spread and execution profile.
- Start with a small lot size or a low RiskPercentPerTrade value until you are satisfied with live behavior.
- Always use a stable Virtual Private Server (VPS) for 24/7 operation.
- Enable the Drawdown Circuit Breaker for live trading to provide an automatic safety net.
Important Risk Disclosure
Trading foreign exchange, CFDs, futures, and cryptocurrencies on margin carries a high level of risk and may not be suitable for all investors. Past performance — including any backtest, optimization result, or historical track record — is not indicative of future results. Leverage can work against you as well as for you. Before trading, carefully consider your investment objectives, level of experience, and risk appetite. You should never invest money that you cannot afford to lose.
This Expert Advisor is a trading tool. It does not guarantee profits, nor does it eliminate the risks inherent in trading financial markets. Results on a live account will differ from backtest or demo-account results due to execution quality, slippage, variable spreads, swap costs, broker-specific behavior, and market conditions. The user is solely responsible for all trading decisions and any resulting profits or losses.
Support & Updates
Questions, feedback, and optimization assistance are welcome through the MQL5 Market comments section or private messages. Buyers receive free updates via the MQL5 Market auto-update channel for the lifetime of the product.
Thank you for considering MTForge NarTown. If this EA meets your expectations, please leave a rating — it helps other traders make informed decisions.
