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

Tâche terminée

Temps d'exécution 11 jours
Commentaires de l'employé
Terrible customer. Don't work with him.
Commentaires du client
Ужасный исполнитель который никак не проявляет инициативу и даже не пытается чем-то помочь

Spécifications

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

 


Dossiers :

ZIP
TZ_2026.zip
440.5 Kb

Répondu

1
Développeur 1
Évaluation
(395)
Projets
556
41%
Arbitrage
30
57% / 3%
En retard
57
10%
Gratuit
Publié : 11 codes
2
Développeur 2
Évaluation
(5)
Projets
13
54%
Arbitrage
2
50% / 0%
En retard
4
31%
Travail
Publié : 6 codes
3
Développeur 3
Évaluation
(268)
Projets
603
34%
Arbitrage
65
22% / 57%
En retard
146
24%
Travail
Publié : 1 article, 22 codes
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
Projets
1
0%
Arbitrage
0
En retard
1
100%
Gratuit
6
Développeur 6
Évaluation
(4)
Projets
4
0%
Arbitrage
4
25% / 75%
En retard
1
25%
Gratuit
7
Développeur 7
Évaluation
(370)
Projets
460
55%
Arbitrage
24
58% / 17%
En retard
31
7%
Travail
8
Développeur 8
Évaluation
(638)
Projets
746
34%
Arbitrage
49
53% / 39%
En retard
14
2%
Travail
9
Développeur 9
Évaluation
(39)
Projets
52
19%
Arbitrage
15
27% / 67%
En retard
8
15%
Gratuit
Publié : 1 code
10
Développeur 10
Évaluation
(3)
Projets
4
0%
Arbitrage
0
En retard
0
Gratuit
11
Développeur 11
Évaluation
(216)
Projets
283
20%
Arbitrage
28
57% / 14%
En retard
0
Travail
12
Développeur 12
Évaluation
(42)
Projets
43
7%
Arbitrage
0
En retard
0
Gratuit
Publié : 2 articles, 23 codes
13
Développeur 13
Évaluation
(19)
Projets
21
19%
Arbitrage
1
0% / 100%
En retard
2
10%
Gratuit
14
Développeur 14
Évaluation
(298)
Projets
478
40%
Arbitrage
105
40% / 24%
En retard
82
17%
Chargé
Publié : 2 codes
15
Développeur 15
Évaluation
(10)
Projets
14
43%
Arbitrage
0
En retard
3
21%
Gratuit
16
Développeur 16
Évaluation
(1)
Projets
2
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
Вознаграждение $1000 за решение проблемы катастрофической просадки торгового робота MT5 (XAUUSD) 1. Суть задания Ищу опытных MQL5-разработчиков, математиков, специалистов по алгоритмической торговле и управлению рисками. У меня имеется готовый торговый советник для MetaTrader 5, который использует строго случайный выбор направления BUY или SELL , одинаковые Stop Loss и Take Profit и механизм увеличения лота для
Описание: Требуется разработать торгового робота для автоматизации моей стратегии торговли золотом XAUUSD на таймфрейме M15. Основная логика стратегии: снятие ликвидности за локальным фракталом; формирование ордер-блока и чистого имбаланса; определение точки входа (ТВХ); установка стоп-лосса на расстоянии $10 от ТВХ; тейк-профит на следующей подтверждённой зоне противоположного направления; переключение направления

Informations sur le projet

Budget
100 - 200 USD
Délais
de 5 à 10 jour(s)