Hedge EA with Martingale

MQL5 Experts

Specification

Let's develop an EA for MT5.


Indicators:

Bollinger Bands with customizable period and deviation.

Moving Average with customizable period.


Financial Manager:

Customizable initial lot size

Customizable Martingale multiplier (with decimals)

Customizable Take Profit (TP)

Customizable Stop Loss (SL)


Trading Logic:

if no open orders and the last trade hit TP:

Use the initial lot size.

If the moving average is above the middle band of the Bollinger Bands: open a buy order.

If the moving average is below the middle band of the Bollinger Bands: open a sell order.


if no open orders and the last trade hit SL:

Apply the Martingale multiplier to the last lot size.

Open a trade in the opposite direction of the last trade.


Please provide the complete MQL5 code for this EA.

Responded

1
Developer 1
Rating
(16)
Projects
23
26%
Arbitration
1
0% / 0%
Overdue
2
9%
Free
2
Developer 2
Rating
(2350)
Projects
2956
63%
Arbitration
125
44% / 26%
Overdue
429
15%
Working
3
Developer 3
Rating
(634)
Projects
741
34%
Arbitration
49
53% / 39%
Overdue
14
2%
Working
4
Developer 4
Rating
(298)
Projects
478
40%
Arbitration
105
40% / 24%
Overdue
82
17%
Loaded
Published: 2 codes
5
Developer 5
Rating
(328)
Projects
333
71%
Arbitration
2
100% / 0%
Overdue
0
Free
Published: 1 code
6
Developer 6
Rating
(2677)
Projects
3420
68%
Arbitration
77
48% / 14%
Overdue
343
10%
Working
Published: 1 code
7
Developer 7
Rating
(50)
Projects
51
8%
Arbitration
0
Overdue
0
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(11)
Projects
17
59%
Arbitration
2
0% / 100%
Overdue
2
12%
Free
10
Developer 10
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
11
Developer 11
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free

Project information

Budget
30 - 50 USD
Deadline
to 1 day(s)