Develop the Grid (with Pending orders) + Hedge EA for Currency Pairs and XAUUSD

Job finished

Execution time 11 days
Feedback from customer
Ужасный исполнитель который никак не проявляет инициативу и даже не пытается чем-то помочь

Specification

The discription attached below in English and Russian languages. Kindly note that I want to get the source code(.mq5 + .ex5) too, for self education. Thank you at advance

Grid Hedge 2026 EA Trading Expert Advisor

 

  • Development language: MQL5
  • Account type: Hedge
  • Trading on Forex pairs and XAUUSD
  • No indicators used
  • No time restrictions — the EA trades 24/7, with the option to limit or stop trading before important news
  • Currency: USD
  • Swap is not taken into account
  • Places only pending orders: BuyLimit - SellStop / BuyStop - SellLimit
  • Backtested in MT5

The EA should be fundamentally similar to the Magic Grid EA.
Reference:
https://www.mql5.com/ru/market/product/76546?source=Unknown


Main Parameters

 

This Expert Advisor places pending orders in a grid similar to Magic Grid. It uses TakeProfit/StopLoss. When launched, grids are created at equal distances relative to the current price. The EA always places only pending orders.

1.     Base Grid Lot = 0.01 (adjustable)

2.     Grids (Up & Down) = 10 (adjustable)

o    Total: 10 grids upward and 10 grids downward

o    Due to limitations on placing pending orders within one trading account, orders must be placed/removed gradually as the price moves

o    Number of grid levels = 10 (adjustable), with expansion capability when approaching grid boundaries (+10 levels in the direction of price)

3.     Grid Distance = 2000 (adjustable)

4.     Grid Take Profit = 2000 (adjustable)

o    Take Profit applies only to base grid orders

5.     Grid Stop Loss = 2000 (adjustable)

o    Stop Loss applies only to base grid orders

6.     Grid Deviation = 150 (adjustable, slippage)

7.     Magic Number = 9812345 (adjustable)

o    Used to allow running the EA on multiple instruments within one terminal


Risk Management

 

Risk management works on every tick if enabled.

8.     Risk Management = true (adjustable)

9.     Target Profit = 1000.0 (adjustable, % of equity)

o    When reached: closes all orders and trades, fully stops trading, and sends a notification

10. Max Drawdown = 80.0 (adjustable, % of equity)

  • When reached: closes all orders and trades, fully stops trading, and sends a notification

11. Extra Notification for Equity Drawdown = true (adjustable)

12. Extra Notification for Equity Drawdown Percentage = 70.0 (adjustable)


First Stage Compensator Logic

 

The mechanism called the first-stage compensator places additional pending BuyStop or SellStop orders to support the current price direction.

  • Initially places orders on grids according to input parameters at EA start
  • When active orders show an imbalance in buy/sell lots, restrictions on compensator order placement are activated
  • Unlike the main grid:
    • Buy pending orders are placed only above the current price
    • Sell pending orders are placed only below the current price
  • Due to account limitations, pending orders are placed gradually (only inactive ones are removed) as price moves

First Stage Compensator Parameters

 

(No TakeProfit/StopLoss — only a two-stage Trailing Stop)

13. First Stage Compensator = On/Off (adjustable)

14. First Stage Compensator Mode = limited / unlimited (adjustable)

  • Sell restriction formula:
    (sum of buy lots below current price − sum of sell lots below current price) / grid lot ≤ -6
    • If ≤ -6 → sell pending compensators above current price are NOT placed (to prevent increasing drawdown)
  • Buy restriction formula:
    (sum of buy lots above current price − sum of sell lots above current price) / grid lot ≥ 6
    • If ≥ 6 → buy pending compensators below current price are NOT placed (to prevent increasing drawdown)

15. First Stage Compensator Lot = 0.01 (adjustable)

  • Can be fixed or dynamic:
    • Fixed: standard (adjustable)
    • Dynamic: calculated as follows:
      (sum of active buy lots − sum of active sell lots) / lot difference divisor × Base Grid Lot
      • If result > 0 → sell compensator lot = result
      • If result < 0 → buy compensator lot = absolute value
      • If result = 0 → lot = Base Grid Lot

16. Lot Difference Divisor = 3 (adjustable)

17. First Stage Compensator Mode = each_grid
(adjustable, struct Mode = each_grid, second_grid, third_grid)

18. Trailing Stop Start At = 2000 (adjustable)

  • When a compensator trade moves 2000 points into profit, the first trailing stop is activated

19. Trailing Stop Placed At = 1000 (adjustable)

  • The trailing stop remains fixed

20. Trailing Stop Additional Moved To = 4000 (adjustable)

  • Additional shift at profit = 2 × Grid Distance

 


Files:

ZIP
TZ_2026.zip
440.5 Kb

Responded

1
Developer 1
Rating
(394)
Projects
554
41%
Arbitration
30
57% / 3%
Overdue
57
10%
Working
Published: 11 codes
2
Developer 2
Rating
(5)
Projects
13
54%
Arbitration
1
100% / 0%
Overdue
4
31%
Free
Published: 6 codes
3
Developer 3
Rating
(268)
Projects
602
34%
Arbitration
64
20% / 58%
Overdue
147
24%
Working
Published: 1 article, 22 codes
4
Developer 4
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
5
Developer 5
Rating
Projects
1
0%
Arbitration
0
Overdue
1
100%
Free
6
Developer 6
Rating
(4)
Projects
4
0%
Arbitration
4
25% / 75%
Overdue
1
25%
Free
7
Developer 7
Rating
(363)
Projects
437
54%
Arbitration
22
50% / 14%
Overdue
30
7%
Busy
8
Developer 8
Rating
(599)
Projects
693
33%
Arbitration
43
47% / 44%
Overdue
12
2%
Working
9
Developer 9
Rating
(39)
Projects
52
19%
Arbitration
15
27% / 67%
Overdue
8
15%
Free
Published: 1 code
10
Developer 10
Rating
(1)
Projects
2
0%
Arbitration
0
Overdue
0
Free
11
Developer 11
Rating
(201)
Projects
260
21%
Arbitration
22
50% / 18%
Overdue
0
Loaded
12
Developer 12
Rating
(42)
Projects
43
7%
Arbitration
0
Overdue
0
Free
Published: 2 articles, 23 codes
13
Developer 13
Rating
(19)
Projects
21
19%
Arbitration
1
0% / 100%
Overdue
2
10%
Working
14
Developer 14
Rating
(298)
Projects
477
40%
Arbitration
105
40% / 24%
Overdue
81
17%
Loaded
Published: 2 codes
15
Developer 15
Rating
(10)
Projects
14
43%
Arbitration
0
Overdue
3
21%
Free
16
Developer 16
Rating
(1)
Projects
2
0%
Arbitration
0
Overdue
0
Free
Similar orders
Опыт работы с панелями 1. исправить трал - ЛИНИЯ ДОЛЖНА БЫТЬ ВИДНА ПРИ ВКЛЮЧЕНИИ(СТАРТ), КОГДА ЦЕНА ДОХОДИТ ДО ЛИНИИ СТАРТ ОНА ПЕРЕМЕЩАЕТСЯ НА ШАГ И ДВИЖЕТСЯ ЗА ЦЕНОЙ КАК СТАНДАРТНЫЙ ТРАЛ и сейчас он не закрывает 2. закрытие крайних ордеров снжение просадки с выводом на панель № ордера( в сетке самый убыточный, например 7 из настроек, когда цена выводит его в плюс на 1% самого убыточного-закрываются оба с прибыдлью
I need a simple semi-auto assistant for XAUUSD on MT5. Main functions: * BOS detection * CHOCH detection * Liquidity sweep detection * Buy/Sell arrows * London & New York session filter * Alert notifications * Simple dashboard No martingale. No grid. I need clean and optimized code with editable settings. Do you have experience with SMC/ICT concepts and XAUUSD? Can you build something like this
Язык платформы: MQL4 или MQL5 (уточним с выбранным исполнителем). Тип проекта: Информационный советник-сканер. БЕЗ автоматической торговли (без открытия ордеров). Краткое описание задачи Необходимо разработать высокооптимизированный многопоточный сканер рынков, который будет одновременно мониторить от 250 до 400 торговых инструментов (Forex, Crypto, Индексы, Акции). Система работает на базе 5 независимых виртуальных
Добрый день. Нужно написать советника: - Хеджирование ( открытия двух сделок одновременно buy, sell) - Buy например в плюсе, то СЛ в безубыток с тралом и пирамидингом (набор объема в buy) - Sell в минусе, то двигается стоп в безубыток buy с набором объема в sell -Трал ордера когда их как минимум 4 в одну сторону (Настраиваемое) -П ирамидинг ордеров через каждые 10 п, усреднение на том же уровне где и открытие ордера
Добрый день! 30 - 100 USD
Требуется адаптировать простенький индикатор для МТ5 под новые существующие сейчас билды. Раньше в 2015гг. индикатор работал. как обновились билды на мт5 , индикатор перестал прикрепляться к графику. Мой емейл: Eduardfoer@mail.ru Ребята с адаптацией индикатора ничего не выходит!!! Нет Mq файла. Тогда может кто нибудь сможет не за бесплатно восстановить сам терминал МТ5 под билды.13-13-15 года. Чтобы индикатор встал
Эту советник надо автоматизировать и добавить функции время 5мин 10мин 15мин и лот 0.1 0.2 0.3 0.4 должно бить управляемим самое главное его надо декомплировать или на его основе создават советник

Project information

Budget
100 - 200 USD
Deadline
from 5 to 10 day(s)