Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 4 Expert Advisor | MD Scalper – Trend / Reversal pending-stop scalper with trailing stop | MetaT…

Fresh MQL5 code release – perfect for enhancing your MT4/MT5 strategies.

  • Respects the broker's stop level and freeze level automatically ( AutoStopLevel ).
  • Modifications are throttled ( MinModifyMs ) with minimum step sizes, to avoid flooding the server with requests.
  • Retries on requote, busy and off-quotes errors, then pauses briefly after a failed send.
  • Measures average order latency, displays it, and can block entries when it is too high.
  • ExtraLatencyPoints adds a cushion to the order offset and trail distance.
  • Stale pending orders are deleted by age, outside the trading session, or when the spread is too wide.

Other features

  • Spread filter: average spread, current spread and commission (auto-detected or manual).
  • Lot modes: fixed lots, % of balance risked at the stop loss, or the original leverage-based formula. A free-margin check is included.
  • Optional protections: max trades per day, daily loss limit, cooldown after a close, Friday cutoff, and a time filter that works across midnight.
  • On-chart panel showing signal, spread, latency, today's result and why entries are blocked.

Main inputs

Input Meaning
TradeMode Trend / Reversal / Both
MAPeriod, MAMethod MA settings (default 3, Smoothed)
Filter Minimum current-bar range in points
Limit Pending order offset from price in points
StopLoss, TakeProfit Initial SL / TP in points (0 = none)
Distance Trailing distance in points (negative = off)
MaxSpreadPlusCommission Maximum allowed spread plus commission in points
LotMode, FixedLots, RiskPercent Position sizing
MagicNumber Order identifier

Image for MD Scalper – Trend / Reversal pending-stop scalper with trailing stop

Recommendations

Unique stair-step trend trading with the Stairsteps Expert Advisor. Innovative approach for consistent results. Learn more.

  • The defaults (Limit 2, StopLoss 10, Distance 2) are very tight. They suit low-spread accounts with a small stop level.
  • On other accounts, AutoStopLevel widens the distances automatically.
  • Always test on a demo account first. Latency and broker execution effects cannot be fully reproduced in the Strategy Tester.
  • Scalping results depend heavily on spread, execution speed and the broker.

Risk warning: trading leveraged products involves substantial risk. Past or simulated results do not guarantee future performance.


Level up your trading with professional RobotFX expert advisors and indicators. Visit robotfx.org for proven MT4/MT5 tools.

77921

Best MetaTrader Indicators + Profitable Expert Advisors