Spécifications
I need a new MT5 Expert Advisor based on a fully customizable two-sided pending-order grid.
The purpose is to build a flexible EA engine. I will choose the trading parameters and strategy settings myself later. Please do not hard-code any specific lot sizes, grid distances, or trading progression.
1. Grid Logic
When the EA starts a new basket, it should use the current market price as the starting/reference price.
The EA should place:
- Buy Stop pending orders above the current price
- Sell Stop pending orders below the current price
The number of Buy Stop and Sell Stop orders must be adjustable from the Inputs.
2. Adjustable Grid Distance
The distance between grid levels must be completely adjustable from the Inputs.
I must be able to enter the distance I want myself.
The EA must correctly handle XAUUSD price digits/point size on different brokers.
3. Fully Adjustable Lot Sizes
Lot sizes must be fully configurable by the user from the Inputs.
The Buy side and Sell side must be configurable independently.
I want to enter the lot sizes that I want myself.
The EA must NOT force any Martingale, Fibonacci, multiplier, automatic progression, or fixed lot-sizing strategy.
The EA should execute the lot settings entered by the user.
4. One-Time Level Activation
Each grid level should be activated only once during the same basket.
If a pending order is triggered and price later returns to the same level, the EA must NOT recreate or trigger the same level again during that basket.
5. Basket Management
All positions opened by the EA — both Buy and Sell — must be treated as one single basket.
The EA must continuously calculate the combined P/L of the entire basket.
There should be an adjustable Basket Take Profit in USD.
6. Basket TP / Close All
As soon as the combined basket P/L reaches the Basket Take Profit:
The EA must immediately:
- Close ALL open Buy positions.
- Close ALL open Sell positions.
- Delete ALL remaining Buy Stop pending orders.
- Delete ALL remaining Sell Stop pending orders.
- Clear/reset the previous basket and all triggered-level information.
No position or pending order from the previous basket should remain.
7. Immediate New Basket
After the previous basket has been completely closed and all pending orders deleted, the EA should immediately start a new basket from the current market price.
It should create a completely fresh Buy Stop/Sell Stop grid using the same current Input settings.
No mandatory rest period is required.
8. Grid Continuation / Maximum Orders
I need an adjustable setting for:
- Maximum Buy orders/levels
- Maximum Sell orders/levels
The EA should be able to continue creating new grid levels as price moves into new territory, up to the user-defined maximum.
Already-triggered levels must never be duplicated within the same basket.
9. Required Inputs
All important settings must be accessible from the EA Inputs, including:
- Grid Distance
- Number / Maximum Buy Levels
- Number / Maximum Sell Levels
- Buy Lot Settings
- Sell Lot Settings
- Basket Take Profit in USD
- Maximum Slippage
- Magic Number
- Enable/Disable Buy Side
- Enable/Disable Sell Side
The Buy and Sell configurations must remain independent.
10. Execution Safety
The EA should prevent:
- Duplicate orders
- The same level being triggered twice
- Multiple baskets starting accidentally
- Old pending orders remaining after Basket TP
- New basket creation before the previous basket is completely closed
If MT5/VPS is restarted while a basket is active, the EA should recognize and continue managing its existing positions and pending orders using the Magic Number, rather than creating a duplicate basket.
11. MT5 Strategy Tester
The EA must work correctly in the MT5 Strategy Tester, especially:
Every tick based on real ticks
I need to be able to backtest different:
- Grid distances
- Lot configurations
- Basket TP values
- Maximum grid levels
without changing the source code.
12. Delivery
I require:
- EX5 compiled EA
- Full editable MQ5 source code
The final EA should have clean and clearly named Inputs.
The main requirement is flexibility. The developer is building the grid/basket management system only. I will decide the trading strategy, lot sizes, distances, and TP settings myself through the Inputs.
Please apply only if you have experience developing MT5 Grid / Hedging EAs.