Minimalistic MA Crossover EA
- 专家
- 版本: 1.1
- 激活: 10
MA Crossover EA
MA Crossover EA is a simple and fully automated Expert Advisor based on one of the most widely used trading concepts: the Moving Average crossover.
The EA monitors two moving averages and automatically opens trades when a confirmed crossover occurs.
Trading Logic
-
BUY: The Fast Moving Average crosses above the Slow Moving Average.
-
SELL: The Fast Moving Average crosses below the Slow Moving Average.
-
Signals are confirmed using closed candles, helping avoid repeated entries caused by movements on the currently forming candle.
-
When an opposite crossover occurs, the EA closes the existing position and opens a new position in the opposite direction.
User Inputs
The EA keeps the setup simple and allows you to control only the essential parameters:
-
Magic Number
-
Fast MA Period
-
Fast MA Method
-
Fast MA Applied Price
-
Slow MA Period
-
Slow MA Method
-
Slow MA Applied Price
-
Stop Loss in pips
-
Take Profit in pips
-
Fixed Lot Size
Supported MA Methods
You can select the standard MetaTrader 5 Moving Average methods:
-
Simple Moving Average — SMA
-
Exponential Moving Average — EMA
-
Smoothed Moving Average — SMMA
-
Linear Weighted Moving Average — LWMA
You can also select different applied prices for both the Fast and Slow Moving Average.
Trade Management
Each trade can be opened with a predefined Stop Loss and Take Profit.
If an opposite MA crossover appears before the current trade reaches its SL or TP, the EA will:
Close the current position → Open a new position in the opposite direction.
Additional Features
The EA automatically handles several technical requirements internally, including:
-
Broker minimum and maximum lot limits
-
Volume step normalization
-
Minimum Stop Loss / Take Profit distance
-
Different symbol price digits
-
Margin availability before opening a trade
-
Magic Number filtering
-
Netting and hedging account compatibility
Example
With:
Fast MA = 10 EMA
Slow MA = 20 EMA
When the 10 EMA crosses above the 20 EMA, the EA opens a BUY position.
When the 10 EMA later crosses below the 20 EMA, the BUY position is closed and a SELL position is opened.
