MaxFutures EA The Power of Trends
- Experts
-
Khac Thanh Bui
Turning trading logic into algorithmic precision. I develop professional-grade tools for FX and Gold, bridging the gap between practical trading needs and high-end software development.
WHAT I BUILD: - Version: 1.49
- Updated: 16 July 2026
- Activations: 5
MaxFutures EA
A dual-timeframe Heikin Ashi grid EA for XAUUSD on MetaTrader 5, with ATR trend filtering and portfolio-level profit management.
MaxFutures EA is an automated trading system built for XAUUSD scalping on MetaTrader 5. It builds a directional position grid guided by Heikin Ashi signals read across two independent timeframes, filtered by a Zero Lag EMA trend direction computed on a higher timeframe. Rather than opening market orders immediately on a signal, the EA places virtual pending orders that trail the market before firing, helping avoid impulsive entries during choppy conditions. All open positions are managed as a single portfolio and closed together when a configurable profit target is reached.
Overview
MaxFutures EA generates trade signals by evaluating Heikin Ashi candle direction on two configurable timeframes simultaneously. A buy signal requires both timeframes to show a bullish candle; a sell signal requires both to show a bearish candle. An optional trend filter based on a Zero Lag EMA with an ATR trailing stop — computed on a separate higher timeframe — acts as a directional gate, allowing only trades that align with the macro trend. A noise suppression option prevents the filter from updating on insignificant price moves.
When a valid signal appears, the EA places a virtual pending order at a configurable offset from the current price. The virtual order trails the price if the market moves away, and converts into a real market order only when price reaches the trigger level. If a new candle opens before the trigger fires, all virtual orders are cleared and re-evaluated from scratch on the new bar.
Position sizing follows a progressive model: each additional position in the same direction uses a multiplier applied to the base lot size, capped at a configurable maximum. A minimum spacing rule prevents new entries from landing too close to existing grid levels. All positions close together when total portfolio profit hits the target. An optional trailing stop activates above a higher profit threshold and fires a full close when profit pulls back from its peak by a set step.
Key Features
- Virtual pending order system: An offset trigger is placed above or below the current price instead of entering at market. It trails the price if the market moves away and fires only when price reaches the entry level, filtering noise-driven entries in sideways conditions.
- Dual-timeframe Heikin Ashi signals: Both timeframes must show the same candle direction before a virtual order is created. The secondary confirmation can be disabled to trade on the primary signal alone.
- ATR Zero Lag EMA trend filter: A Zero Lag EMA with an ATR trailing stop on a higher timeframe blocks entries against the macro trend. Updates once per new bar to keep computation efficient.
- Portfolio-level profit management: All positions close together when profit hits the target. An optional trailing stop mode arms above an activation level and fires when profit retreats from its peak by a set amount.
- Progressive lot sizing: Each additional same-direction position applies a configurable multiplier to the base lot, with a hard cap on maximum exposure.
- Maximum drawdown protection: When portfolio loss hits the limit, all positions close immediately and new entries pause until the next primary candle opens — then the EA resumes automatically.
- Session filter and daily target: Trading restricted to a daily HH:MM window with optional auto-close at session end. A daily profit ceiling halts new entries once reached.
Input Parameters
Trade Settings:
- Base lot size — Default: 0.01
- Progressive sizing — Enable increasing lot per grid level — Default: true
- Size multiplier — Default: 1.2
- Maximum lot size — Default: 1.0
Trend Filter:
- Enable trend filter — Default: true
- Filter timeframe — Default: H1
- EMA period — Default: 14 | ATR period — Default: 14 | ATR multiplier — Default: 3.5
- Noise suppression — Default: true | Noise threshold — Default: 0.3
Entry Settings:
- Entry offset, in points — Default: 75
- Trail step, in points — Default: 45
- Minimum grid spacing, in points; 0 = off — Default: 180
Profit Management:
- Profit target, in account currency — Default: 10.0
- Enable trailing stop — Default: true | Trailing activation — Default: 16.0 | Trailing step — Default: 8.0
Risk Protection:
- Maximum drawdown, in account currency; 0 = off — Default: 50.0
- Maximum positions; 0 = off — Default: 20
- Enable daily target — Default: false | Daily profit target — Default: 20.0
Session Filter:
- Session open / close in HH:MM — Default: 00:30 / 20:30
- Close on session end — Default: false
Recommended Settings
Designed for XAUUSD on M5 for both signal timeframes, with H1 as the trend filter. An ECN account with low spread is recommended. A VPS is advised for uninterrupted tick processing. Calibrate the maximum drawdown limit and position count to your account size before going live.
Important: MaxFutures EA uses a grid approach with progressive lot sizing. Portfolio drawdown can increase significantly during sustained counter-trend moves. Configure risk limits appropriately for your account size before running on a live account.
