FxMath Momentum EA

Professional algorithmic trading bot powered by MACD and RSI momentum strategies. Built for MetaTrader 5 with advanced risk management and pyramiding capabilities.

🚀 Get Started 📦 Download v1.02

✨ Key Features

📊

MACD + RSI Strategy

Proven momentum-based strategy combining MACD crossovers with RSI confirmation for high-probability entries.

Pyramiding Support

Stack multiple positions during strong trends (up to 10 concurrent positions) for maximum profit potential.

🛡️

Advanced Risk Management

ATR-based stop loss, customizable risk:reward ratios, and daily profit/loss limits to protect your capital.

🎯

MQ5 Bug Mode

Replicate the profitable behavior of the original MQ5 EA with aggressive trading settings.

📱

Modern GUI

Beautiful CustomTkinter interface with real-time monitoring, performance metrics, and easy configuration.

⚙️

Fully Customizable

Fine-tune every parameter from indicator settings to risk management rules to match your trading style.

🚀 Quick Start Guide

Get up and running in 5 minutes:

Prerequisites: Windows 10/11, MetaTrader 5 installed, Python 3.8+ (for source), or use the standalone .exe

Option 1: Standalone Executable (Recommended)

📦 Download FxMath_Momentum_EA.exe

# 1. Download the executable from the link above
# 2. Double-click to run
# 3. Configure your MT5 connection
# 4. Click "Start Bot" ✅

Option 2: From Source

# 1. Install dependencies
pip install -r requirements.txt

# 2. Run the application
python main.py

# 3. Configure and start trading!
✅ That's it! The EA will now monitor the market and execute trades based on your configured strategy.

📖 Introduction

FxMath Momentum EA is a sophisticated algorithmic trading system designed for MetaTrader 5. It combines the power of MACD (Moving Average Convergence Divergence) and RSI (Relative Strength Index) indicators to identify high-probability momentum trades.

What Makes It Special?

⚠️ Risk Warning: Trading forex involves substantial risk. Never trade with money you cannot afford to lose. Past performance does not guarantee future results.

💾 Installation

System Requirements

Component Requirement
Operating System Windows 10/11 (64-bit)
MetaTrader 5 Latest version
Python (source only) 3.8 or higher
RAM 4GB minimum, 8GB recommended
Disk Space 100MB

Step-by-Step Installation

1. Install MetaTrader 5

Download and install MT5 from your broker's website. Make sure to:

2. Install Python Dependencies (if running from source)

pip install MetaTrader5 customtkinter

3. Configure MT5 Connection

The EA will automatically detect your MT5 installation. If you have multiple terminals:

4. First Run

Launch the EA and configure your initial settings:

📊 Trading Strategy

Core Methodology

The FxMath Momentum EA uses a dual-indicator approach to identify momentum-based trading opportunities:

Entry Signals

BUY Signal:

SELL Signal:

Exit Strategy

Positions can be closed by:

Pyramiding (Multiple Positions)

When MQ5 Bug Mode is enabled, the EA can open multiple positions in the same direction:

💡 Tip: Pyramiding works best on trending pairs like XAUUSD, EURUSD during strong momentum periods.

⚡ MQ5 Bug Mode

This special mode replicates the behavior of the original MQ5 EA, which had a "bug" that turned out to be highly profitable.

What is MQ5 Bug Mode?

The original MQ5 EA had unintended behavior that allowed:

⚠️ HIGH RISK MODE: This mode is extremely aggressive and can lead to significant losses. Only use with proper risk management and capital you can afford to lose.

How to Enable

MQ5 Bug Mode is enabled by default in v1.02. To customize:

  1. Go to the 💰 Risk tab
  2. Check/uncheck the aggressive mode options:
    • ✅ Allow positions WITHOUT SL/TP
    • ✅ Allow multiple entries per bar
  3. Go to 🔧 Filters tab
  4. Set "Max Concurrent Positions" to 10 (default)

Or simply click the 🚀 MQ5 BUG MODE quick preset button in the Controls tab!

Performance Characteristics

Metric Conservative Mode MQ5 Bug Mode
Max Positions 1 10
Stop Loss Always set Optional
Profit Potential Moderate Very High
Risk Level Low-Medium Very High
Recommended For Beginners Experienced traders

🛡️ Risk Management

Position Sizing

The EA offers two lot sizing modes:

1. Risk-Based (Recommended)

Automatically calculates lot size based on:

Lot Size = (Account Balance × Risk%) / (Stop Loss Pips × Pip Value)

2. Fixed Lot

Use a fixed lot size for all trades (e.g., 0.01, 0.1, 1.0)

Stop Loss & Take Profit

Dynamic stops based on ATR (Average True Range):

Daily Limits

Protect your account with daily profit/loss limits:

✅ Best Practice: Start with 1% risk per trade and enable daily limits. Increase risk only after consistent profitable performance.

⚙️ Settings Reference

Indicator Settings

Parameter Default Range Description
MACD Fast 16 5-50 Fast EMA period
MACD Slow 26 10-100 Slow EMA period
MACD Signal 11 5-50 Signal line period
RSI Period 14 2-100 RSI calculation period
RSI Threshold 50 0-100 Entry confirmation level
ATR Period 14 2-100 Volatility measurement

Risk Settings

Parameter Default Description
Stop Loss (ATR) 2.0 SL distance in ATR multiples
Risk:Reward 2.5:1 TP/SL ratio
Risk % 1.0% Account risk per trade
Max Positions 10 Concurrent position limit
Cut Profit $100 Daily profit target
Cut Loss $100 Daily loss limit

📈 Indicators Explained

MACD (Moving Average Convergence Divergence)

MACD measures momentum by comparing two exponential moving averages:

RSI (Relative Strength Index)

RSI measures the speed and magnitude of price changes:

ATR (Average True Range)

ATR measures market volatility:

❓ Frequently Asked Questions

What is the minimum deposit required?

We recommend a minimum of $500 for conservative trading (1% risk per trade). For MQ5 Bug Mode with pyramiding, $1000+ is recommended to handle multiple concurrent positions safely.

Which currency pairs work best?

The EA works best on trending pairs with good liquidity:

  • Excellent: XAUUSD (Gold), EURUSD, GBPUSD
  • Good: USDJPY, AUDUSD, USDCAD
  • Avoid: Exotic pairs with high spreads

What timeframe should I use?

M5 (5-minute) is the recommended default. However, the EA works on any timeframe:

  • M1-M5: More signals, higher frequency (scalping)
  • M15-H1: Balanced approach (swing trading)
  • H4-D1: Fewer but higher quality signals (position trading)

Can I run the EA on multiple pairs simultaneously?

Currently, each instance of the EA monitors one symbol. To trade multiple pairs, you can run multiple instances of the EA with different configurations. Make sure to adjust your risk accordingly!

Is MQ5 Bug Mode safe?

No, it is high risk. MQ5 Bug Mode can be very profitable but also very dangerous. It allows positions without stop losses and multiple concurrent positions. Only use it if:

  • You have experience with aggressive trading strategies
  • You can afford to lose your entire trading capital
  • You actively monitor the EA and can intervene if needed
  • You use strict daily loss limits

Does the EA work on demo accounts?

Yes! We strongly recommend testing on a demo account first. Run the EA for at least 1-2 weeks on demo to understand its behavior before risking real money.

🔧 Troubleshooting

EA Won't Connect to MT5

Solution:

No Trades Being Opened

Possible causes:

Positions Not Pyramiding

Check these settings:

High Slippage or Order Rejections

Solutions:

💡 Still having issues? Check the log panel in the EA for detailed error messages. Most issues are clearly indicated there.

📝 Changelog

Version 1.02 (2026-02-06)

🎉 New Features:
  • Multiple Position Support: Now properly pyramids up to 10 concurrent positions
  • Improved Position Management: Each position tracked individually with ticket numbers
  • Enhanced Exit Logic: Closes all positions on momentum reversal (if enabled)
  • Better Logging: More detailed position tracking and pyramiding notifications
🔧 Fixes:
  • Fixed default max_open_trades (now 10 instead of 1)
  • Fixed position counting logic to properly support pyramiding
  • Fixed main loop to always check for entry signals when not at max positions

Version 1.01 (2026-02-04)

Features:
  • Rebranded from "FX Momentum Bot" to "FxMath Momentum EA"
  • MQ5 Bug Mode enabled by default
  • Improved GUI with tabbed interface
  • Added quick preset buttons

Version 1.0 (2026-02-01)

Initial Release:
  • MACD + RSI momentum strategy
  • ATR-based risk management
  • CustomTkinter GUI
  • Real-time monitoring dashboard
  • Cut profit/loss functionality