Custom Hedge Grid MT5
- Experts
- Version: 9.0
- Updated: 3 May 2026
- Activations: 5
Multi-Step Directional Grid EA for MT5
Default is for Gold XAUUSD
A configurable multi-step trading Expert Advisor for MetaTrader 5 designed to execute a predefined sequence of orders with customizable direction, lot size, price distance, and hidden take-profit levels.
The EA follows a structured order logic where each trade step is fully controlled through input parameters, allowing traders to build complex grid or recovery strategies with precision.
Trading LogicThe EA opens orders sequentially based on predefined parameters:
• Trade direction sequence (Buy / Sell)
• Price distance between orders
• Individual lot sizes for each step
• Hidden take-profit levels
The strategy can start with either a Buy-first or Sell-first configuration and automatically follow the programmed sequence.
Up to 22 trading steps can be defined.
Main Features
Configurable Direction Sequence
Each order can have its own direction defined by the user.
Example:
s s s b s b s b s b s b s b s b s b s b s b
This allows complex trading patterns instead of simple grid systems.
Custom Price Distance Between Orders
The EA allows precise control over the distance between orders using points.
Example:
0 4000 8000 8000 -16000 16000 -24000 32000 -40000 48000 -56000 64000 -72000 80000 -88000 96000 -104000 112000 -120000 128000 -136000 144000
Positive and negative values can be used depending on market movement.
Flexible Lot Progression
Each order step can use a different lot size.
Example:
0.01 0.02 0.03 0.12 0.18 0.27 0.41 0.61 0.91 1.37 2.05 3.08 4.61 6.92 10.38 15.57 23.35 35.03 52.55 78.82 118.23 177.35
This enables advanced position scaling strategies.
Hidden Take Profit
Take-profit values are handled internally by the EA instead of placing visible TP levels on the broker server.
Example:
2000 500 100 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
Hedge / Non-Hedge Mode
The EA can operate in two modes:
• Hedge mode (allowing opposite positions)
• Non-hedge mode (single direction exposure)
Trading Control Options
Available controls include:
• Maximum spread filter
• Maximum slippage setting
• Magic number identification
• Option to restart trading cycle after profit
• Option to stop trading after a specified step level
Optional on-chart information display showing:
• Current spread
• Active orders
• Historical orders
• EA status information
Display settings can be customized:
• Font size
• Color configuration
• Visibility toggle
Main parameters include:
• First order type (Buy / Sell)
• Direction sequence for orders
• Price step sequence
• Lot size progression
• Take-profit steps
• Spread and slippage filters
• Trading interval settings
Platform: MetaTrader 5
Account type: Works on brokers supporting algorithmic trading.
Before using on a live account:
• Test the EA in Strategy Tester
• Optimize parameters for your broker and symbol
• Ensure sufficient account margin
