MaCrussAdv

Simple MA Cross EA

Simple MA Cross EA is a fully automated, clean, and robust Expert Advisor based on the classic Moving Average crossover strategy. This EA is designed for trend-following traders and serves as an excellent benchmark for automated trading on the MetaTrader 5 platform.

Built using the official MQL5 Standard Library ( CTrade ), the EA ensures reliable, secure, and fast order execution. It is optimized to run smoothly without lagging your platform or spamming your broker’s server.

How It Works

The EA continuously monitors the interaction between a Fast Moving Average and a Slow Moving Average based on completed bars (New Bar logic) to avoid false signals during high volatility:

  • Buy Signal: Occurs when the Fast MA crosses above the Slow MA. If a Sell position is open, it is automatically closed before opening the Buy position.

  • Sell Signal: Occurs when the Fast MA crosses below the Slow MA. If a Buy position is open, it is automatically closed before opening the Sell position.

Key Features

  • Strict Trend-Following Logic: No risky strategies like Martingale, Grid, or Arbitrage.

  • One Position at a Time: It strictly manages a single active position per symbol, preventing over-exposure.

  • New Bar Execution: Computes logic only at the opening of a new candle, highly optimizing CPU usage.

  • Integrated Risk Management: Features fully adjustable Stop Loss (SL) and Take Profit (TP) parameters.

  • Magic Number Protection: Uses a unique Magic Number, allowing it to run safely alongside other EAs or manual trades without interference.

  • Universal Compatibility: Works on any currency pair, commodity, or timeframe.

Input Parameters

  • FastPeriod: Period for the faster Moving Average (Default: 10).

  • SlowPeriod: Period for the slower Moving Average (Default: 20).

  • MAMethod: Type of Moving Average (SMA, EMA, SMMA, LWMA).

  • MAPrice: Applied price for calculation (Close, Open, High, Low, etc.).

  • LotSize: Fixed volume for each trade (Default: 0.01).

  • StopLoss: Stop Loss value in points (0 to disable).

  • TakeProfit: Take Profit value in points (0 to disable).

  • MagicNumber: Unique identifier for the EA's orders.

Recommendations

  • Timeframe: H1 or H4 (Recommended for cleaner trend detection).

  • Account Type: Hedging or Netting accounts.

  • VPS: Recommended but not mandatory since it executes on bar close.


筛选:
无评论
回复评论