Project Title: MQL5 Trade Manager for TradingView Webhook Signals

MQL5 脚本 其它

指定


Overview: I need a robust MQL5 Expert Advisor (Trade Manager) designed to manage trades initiated by external signals (TradingView via Webhook). The EA will not look for entries itself but will "take over" any trade opened with a specific Magic Number.

Core Functionality:

  1. Magic Number Management: Monitor and manage all trades with Magic Number: xxxx.

  2. Grid/Martingale Logic:

    • Initial Lot: xxxx (User-definable).

    • Multiplier: xxxxx (User-definable).

    • Pip Step: Fixed distance (e.g., 18 or 30 pips) between grid levels.

    • Max Orders: Cap the grid at a specific number of trades (e.g., 6).

  3. "Ignore" action should be logged in the Expert Journal in MT5 so you can see it happened. You want to see a message like: "Signal Received: SELL. Action: IGNORED (Buy Basket Active)."

    Directional Locking (Hedge Prevention):

    • The EA must include a logic check to prevent opening opposite positions.

    • If the EA is currently managing a "Buy" basket, it must ignore any "Sell" signals received via Webhook.

    • If the EA is currently managing a "Sell" basket, it must ignore any "Buy" signals received via Webhook.

    • Optional Toggle: Add a "Allow Hedging" true/false input so I can turn this filter on or off manually.

    • "Ignore" action should be logged in the Expert Journal in MT5 so I can see it happened. I want to see a message like: "Signal Received: SELL. Action: IGNORED (Buy Basket Active)."

  4. Global Basket Management:

    • Weighted TP: Automatically calculate the break-even point for the entire basket and set a unified Take Profit in pips/dollars.

    • Trailing Stop: Implement a basket-wide trailing stop that activates once a specific profit threshold is met.

Safety & Execution Filters:

  • Max Spread Filter: Do not open additional grid levels if the current spread exceeds [X] pips.

  • Slippage Control: Use a strict slippage limit (points) for all market orders to ensure precise grid entry.

  • Equity Protection: A "Hard Stop" feature that closes all trades if the total account drawdown exceeds [X]%.

Technical Requirements:

  • Must be compatible with MetaTrader 5 (MQL5).

  • Clean, commented code for future adjustments.

  • The EA must handle "Requotes" and "Broker Busy" errors gracefully during high volatility.







反馈

1
开发者 1
等级
(107)
项目
175
25%
仲裁
23
13% / 78%
逾期
16
9%
工作中
2
开发者 2
等级
(2)
项目
2
0%
仲裁
0
逾期
0
空闲
3
开发者 3
等级
(40)
项目
45
60%
仲裁
2
100% / 0%
逾期
1
2%
空闲
发布者: 5 代码
4
开发者 4
等级
(1)
项目
1
0%
仲裁
3
0% / 100%
逾期
1
100%
空闲
5
开发者 5
等级
(46)
项目
60
53%
仲裁
7
86% / 0%
逾期
2
3%
空闲
6
开发者 6
等级
(30)
项目
32
41%
仲裁
0
逾期
3
9%
工作中
7
开发者 7
等级
(2)
项目
1
0%
仲裁
1
0% / 100%
逾期
0
空闲
8
开发者 8
等级
(3)
项目
1
100%
仲裁
3
0% / 100%
逾期
0
空闲
9
开发者 9
等级
(16)
项目
35
23%
仲裁
4
0% / 50%
逾期
2
6%
工作中
10
开发者 10
等级
(20)
项目
27
30%
仲裁
4
50% / 25%
逾期
4
15%
已载入
11
开发者 11
等级
(2)
项目
7
0%
仲裁
3
0% / 33%
逾期
1
14%
工作中
12
开发者 12
等级
(2)
项目
3
33%
仲裁
1
0% / 100%
逾期
0
空闲
13
开发者 13
等级
(166)
项目
176
45%
仲裁
3
33% / 33%
逾期
1
1%
工作中
14
开发者 14
等级
(48)
项目
57
35%
仲裁
15
27% / 60%
逾期
1
2%
空闲
15
开发者 15
等级
(6)
项目
5
0%
仲裁
4
25% / 75%
逾期
2
40%
空闲
16
开发者 16
等级
项目
0
0%
仲裁
1
0% / 100%
逾期
0
空闲
17
开发者 17
等级
(33)
项目
36
33%
仲裁
5
0% / 80%
逾期
0
工作中
发布者: 2 代码
18
开发者 18
等级
项目
0
0%
仲裁
0
逾期
0
工作中
发布者: 9 文章, 2 代码
19
开发者 19
等级
(4)
项目
10
50%
仲裁
1
0% / 100%
逾期
2
20%
空闲
20
开发者 20
等级
(1)
项目
1
0%
仲裁
1
0% / 100%
逾期
0
空闲
21
开发者 21
等级
(9)
项目
13
0%
仲裁
23
0% / 78%
逾期
4
31%
空闲
22
开发者 22
等级
(3)
项目
3
0%
仲裁
0
逾期
0
空闲
23
开发者 23
等级
(169)
项目
202
48%
仲裁
5
20% / 60%
逾期
2
1%
空闲
24
开发者 24
等级
(512)
项目
551
53%
仲裁
13
69% / 15%
逾期
3
1%
空闲
25
开发者 25
等级
(7)
项目
5
0%
仲裁
5
0% / 80%
逾期
1
20%
工作中
26
开发者 26
等级
(298)
项目
477
40%
仲裁
105
40% / 24%
逾期
81
17%
已载入
发布者: 2 代码
27
开发者 27
等级
项目
0
0%
仲裁
0
逾期
0
空闲
28
开发者 28
等级
项目
0
0%
仲裁
0
逾期
0
空闲
29
开发者 29
等级
项目
0
0%
仲裁
0
逾期
0
空闲
30
开发者 30
等级
(131)
项目
171
39%
仲裁
10
40% / 10%
逾期
31
18%
工作中

项目信息

预算
30 - 600 USD