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

工作已完成

执行时间11 天
客户反馈
Ужасный исполнитель который никак не проявляет инициативу и даже не пытается чем-то помочь
员工反馈
Terrible customer. Don't work with him.

指定

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

 


附加的文件:

ZIP
TZ_2026.zip
440.5 Kb

反馈

1
开发者 1
等级
(395)
项目
556
41%
仲裁
30
57% / 3%
逾期
57
10%
空闲
发布者: 11 代码
2
开发者 2
等级
(5)
项目
13
54%
仲裁
1
100% / 0%
逾期
4
31%
空闲
发布者: 6 代码
3
开发者 3
等级
(268)
项目
603
34%
仲裁
65
22% / 57%
逾期
147
24%
工作中
发布者: 1 文章, 22 代码
4
开发者 4
等级
项目
0
0%
仲裁
0
逾期
0
空闲
5
开发者 5
等级
项目
1
0%
仲裁
0
逾期
1
100%
空闲
6
开发者 6
等级
(4)
项目
4
0%
仲裁
4
25% / 75%
逾期
1
25%
空闲
7
开发者 7
等级
(366)
项目
446
54%
仲裁
22
59% / 14%
逾期
30
7%
工作中
8
开发者 8
等级
(611)
项目
713
33%
仲裁
45
49% / 42%
逾期
14
2%
繁忙
9
开发者 9
等级
(39)
项目
52
19%
仲裁
15
27% / 67%
逾期
8
15%
空闲
发布者: 1 代码
10
开发者 10
等级
(3)
项目
4
0%
仲裁
0
逾期
0
空闲
11
开发者 11
等级
(203)
项目
264
22%
仲裁
24
50% / 17%
逾期
0
工作中
12
开发者 12
等级
(42)
项目
43
7%
仲裁
0
逾期
0
空闲
发布者: 2 文章, 23 代码
13
开发者 13
等级
(19)
项目
21
19%
仲裁
1
0% / 100%
逾期
2
10%
工作中
14
开发者 14
等级
(298)
项目
478
40%
仲裁
105
40% / 24%
逾期
82
17%
已载入
发布者: 2 代码
15
开发者 15
等级
(10)
项目
14
43%
仲裁
0
逾期
3
21%
空闲
16
开发者 16
等级
(1)
项目
2
0%
仲裁
0
逾期
0
空闲
相似订单
Требуется опытный разработчик,для доработки и глубокого аудита торгового робота!Ключевые задачи: Аудит безопасности, полная проверка исходного кода на баги, уязвимости,и скрытые угрозы,а также передачи данных.Максимизация прибыли,и снижение рисков: Доработка логики для извлечения максимум профита и минимизации потерь и присадок.Штормоустойчивость:Критически важно,чтобы алгоритм и код, корректно и без сбоев
Цель доработки Исправить механизм пробойной защиты сетки. Пробойный механизм должен: защищать открытые хвосты при выходе цены из диапазона; рассчитывать объём только по текущему плавающему убытку хвостов; закрывать корзину около нуля или с небольшим плюсом; корректно переживать ложные пробои; повторять попытки защиты до закрытия корзины; не останавливать работу основной сетки; не создавать серию бессистемных

项目信息

预算
100 - 200 USD
截止日期
 5  10 天