Grid Scalper MA MT5 EA
- Эксперты
- Allan Munene Mutiiria
- Версия: 5.0
- Обновлено: 17 октября 2025
Grid Scalper MA MT5 EA
Step into the fast lane of forex trading with Grid Scalper MA MT5 EA, a powerhouse expert advisor crafted for MetaTrader 5 that turns market volatility into your playground. This isn’t your average EA—it’s a precision scalping machine driven by a dynamic grid trading strategy, blending razor-sharp Moving Average (MA) crossover signals with a robust set of customizable features. Whether you’re a scalper hunting quick pips or a strategist riding market waves, this EA delivers the tools to dominate with style.
Note:
The EA is developed under Aussie (AUDUSD) currency pair and thus the default settings make sense there for a 5 digits (e.g. 0.78912) chart version. We urge you to carry out your own backtesting and optimization on any pair or timeframe to find the best fitting settings of your own.
It has been updated with a vast extended control parameters and new logics and thus highly recommended to take a keen look at the inputs, and understand what each input controls. Be sure to read the inputs description section for some insight on the upgrades s they impact the system significantly.
At its core, Grid Scalper MA MT5 EA uses a grid system that opens baskets of trades triggered by a Moving Average (MA) crossover, set via the MA Period input. Each new signal (a close price crossing the MA) initiates a fresh basket with its own unique magic number offset, starting with an initial lot size. The basket expands as price moves against the initial position, adding new trades in the same direction at defined grid-size point intervals, with lot sizes scaled by a multiplier for progressive exposure. Initial trades in each basket aim for a Take Profit Points target, while multi-trade baskets focus on breakeven recovery.
The EA supports capping mechanisms for controlled risk: limit the maximum trades per basket and decide whether to hold or close all when the cap is hit, or cap the total number of active baskets to prevent overexposure. Risk management is enhanced with optional Stop Loss for each position, trailing stops exclusively for the first trade in a basket (activating after a minimum profit threshold), and breakeven logic for baskets with multiple trades. Choose your Closure Mode—either "Profit Mode" for profit-target closures in your account currency or "Points Mode" for price-based exits beyond breakeven. Baskets persist across restarts using global variables, ensuring continuity.
A sleek real-time dashboard keeps you informed: it displays your account name, the number of active positions managed by the EA, a list of basket IDs (showing up to 3 explicitly, then "..." for more), and floating profit/loss in your account currency—color-coded in lime for gains, red for losses, and white for neutral. The dashboard appears only when positions are open, with a black background for clarity. Backtest rigorously, optimize every setting, and demo-test to witness its performance in action.
Key Features:
- Grid trading with adjustable spacing, lot multipliers, and per-basket trade caps for scalable strategies.
- MA crossover signals (Simple Moving Average on close prices) for precise buy/sell entries on new bars.
- Basket-based management: Independent groups of trades per signal, with unique magic numbers for isolation.
- Trailing stops for initial positions and breakeven closures for grids, plus optional per-trade Stop Loss.
- Dual closure modes: Profit-based (total currency amount) or points-based (beyond breakeven).
- Caps on trades per basket and total baskets, with actions like holding or closing when limits are reached.
- Real-time dashboard with essential trade insights for at-a-glance monitoring.
- Persistence via global variables to restore baskets after restarts or crashes.
- Built-in checks for volume, margin, stop/freeze levels, and symbol limits to ensure reliable execution.
Inputs Description
The inputs are grouped into "EA GENERAL SETTINGS" and "MA Indicator Settings" for easy navigation in the MT5 EA properties window. Each input is designed for flexibility, with defaults that suit moderate strategies. Always optimize based on your symbol, timeframe, and risk tolerance. Below is a detailed breakdown to help you understand and configure them clearly.
- Closure Mode (enum: Profit Mode or Points Mode, default: Points Mode): Determines how baskets with multiple trades are closed. "Points Mode" monitors the weighted breakeven price of the basket and closes all positions when the current price moves in your favor by the Breakeven Points beyond breakeven (e.g., for a buy basket, when bid >= breakeven + Breakeven Points). "Profit Mode" calculates the total floating profit of the basket and closes when it reaches or exceeds the Target profit in account currency. Use "Points Mode" for price-action focus or "Profit Mode" for fixed monetary targets. Note: Single-trade baskets close via Take Profit or Trailing Stop if enabled.
- Lot size (double, default: 0.01): The starting volume for the first (initial) trade in every new basket. Subsequent grid trades in the same basket scale this up by the Multiplier. Ensure this aligns with your account size and broker's minimum lot (e.g., 0.01 for micro accounts). The EA validates and normalizes lots against symbol constraints like min/max/step volumes.
- Magic Number (long, default: 1234567): A base identifier for all trades managed by the EA. Each basket gets a unique offset (e.g., base + basketId * 10000) to isolate them. This prevents interference with other EAs or manual trades. Change it if running multiple instances on the same symbol.
- Take profit points (int, default: 1000): The profit target in points (e.g., 1000 points = 100 pips on 5-digit brokers) for the initial trade in each basket. Converted to price units. If hit, the trade closes individually. For baskets with grids, this is overridden by breakeven-based TP once multiple trades open.
- Grid size points (int, default: 1000): The distance in points between grid levels where new trades are added if price moves against the basket (e.g., lower for buys, higher for sells). Smaller values create denser grids (more frequent adds, higher risk); larger values space them out for trending markets. Converted to price units for execution.
- Multiplier (double, default: 2.0): The factor by which lot sizes increase for each new grid trade in a basket (e.g., 2.0 means second trade = initial * 2, third = previous * 2). Values >1 amplify exposure (Martingale-like); =1 keeps lots constant; <1 reduces them. Use cautiously to avoid over-leveraging.
- Breakeven Points (int, default: 50): In "Points Mode", the additional profit buffer in points beyond the basket's weighted breakeven price that triggers closure of all positions in the basket. The breakeven is calculated as the volume-weighted average entry price of all trades in the basket. Smaller values close earlier (less profit but quicker recovery); larger values aim for more gains but risk reversal.
- Stop Loss Mode (enum: No SL Mode or SL Mode, default: No SL Mode): Controls whether each trade gets a Stop Loss. "No SL Mode" omits SL for unlimited drawdown potential (risky but allows full grid recovery); "SL Mode" applies a fixed SL in points from entry (see next input). SL is adjusted dynamically if mode changes, and checked against broker freeze/stop levels.
- Stop loss points if SL Mode enabled (int, default: 1000): Active only if Stop Loss Mode = SL Mode. The distance in points from the entry price for the SL (e.g., below for buys, above for sells). Protects individual trades from excessive losses but may close grids prematurely. Converted to price and normalized.
- Basket Trades Cap (enum: No Maximum Cap or Maximum Cap, default: No Maximum Cap): Enables a limit on the number of trades per basket. "No Maximum Cap" allows unlimited grid additions (high risk in trends); "Maximum Cap" enforces the Max Trades per Basket if cap enabled limit to cap exposure.
- Max Trades per Basket if cap enabled (int, default: 11): Active if Basket Trades Cap = Maximum Cap. The maximum number of positions (initial + grids) allowed in one basket. Once reached, no more grids open, and the Action when trades cap reached is applied.
- Action when trades cap reached (enum: Hold, don't do anything or Close all trades, default: Hold, don't do anything): Active if Basket Trades Cap = Maximum Cap. "Hold, don't do anything" keeps the basket open without adding more (wait for recovery or manual intervention); "Close all trades" immediately closes all positions in the basket to cut losses.
- Baskets Cap Mode (enum: No Baskets Cap or Baskets Cap, default: No Baskets Cap): Controls the total number of simultaneous baskets (trade groups). "No Baskets Cap" allows unlimited new signals; "Baskets Cap" limits to Maximum Baskets/Trade Positions if cap enabled to manage overall exposure.
- Maximum Baskets/Trade Positions if cap enabled (int, default: 3): Active if Baskets Cap Mode = Baskets Cap. The max number of active baskets. New signals are ignored once reached, preventing overload in volatile conditions.
- Use Trailing Stop for first position (bool, default: true): Enables trailing SL for the initial trade only (not grids). If true, once the trade reaches Minimum Profit points to activate trailing, the SL trails by Trailing Stop points. Helps lock in profits on standalone trades before grids form.
- Trailing Stop points (int, default: 30): The distance in points the SL trails behind the current price (e.g., below bid for buys, above ask for sells). Active only for the first position after min profit, and checked against broker levels.
- Minimum Profit points to activate trailing (int, default: 100): The unrealized profit threshold in points required before trailing activates on the initial trade. Ensures the position is in decent profit first (e.g., 100 points filters out noise).
- Target profit in account currency (double, default: 100): In "Profit Mode", the total floating profit (in your account's base currency, e.g., USD) for a basket that triggers closure. Summed across all positions in the basket. Set based on your risk per basket.
- MA Period (int, default: 21): The lookback period for the Simple Moving Average (SMA) on close prices. Triggers buys on upward crossovers (close > MA after close < MA) and sells on downward. Shorter periods (e.g., 10) catch more signals but increase whipsaws; longer (e.g., 50) filters for trends.
Disclaimer:
Grid Scalper MA MT5 EA utilizes a grid trading approach, which can offer significant profit potential but also carries substantial risks. By opening multiple positions at set intervals, the EA may increase exposure during unfavorable market conditions, such as strong trends or high volatility. While it includes protective features like trailing stops, breakeven closure, optional SL, and caps, these do not eliminate the risk of loss, particularly with aggressive settings (e.g., high multipliers, no caps) or insufficient capital. Users are urged to carefully backtest and optimize all inputs on a demo account before risking real funds. Past performance is not a reliable indicator of future results. Trading involves risk, and losses can exceed your initial investment. Proceed with caution, understanding the grid strategy’s implications, and note that past performance does not guarantee future performance. Best luck.


really good bro god bless you