Specification

The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction.

2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the previous one, the trend is considered to be falling (ema_current< ema_previous).

3. Trading Signals:

  • Buy signal: the main MACD line crosses the signal line upwards (macd_current>signal_current && macd_previous<signal_previous).
  • Sell signal: the main MACD line crosses the signal line downwards (macd_current<signal_current && macd_previous>signal_previous). The below figure shows Buy and Sell cases.


4. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.

5. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar.

6. Additional filters for opening a position:

The absolute value of MACD's main line will be used to filter out weak signals: the signal is only confirmed if this value is greater than open_level (in points). Signal confirmation conditions are as follows:

  • Confirmation of a buy signal: Abs(macd_current)>open_level
  • Confirmation of a sell signal: macd_current>open_level

7. Additional filters for closing a position:

The absolute value of MACD's main line will also be used to confirm position closure: the signal is confirmed if this value is greater than close_level (in points). Close signal confirmation conditions are as follows:

  • Confirmation to close Buy positions — macd_current>close_level
  • Confirmation to close Sell positions — Abs(macd_current)>close_level

8. Close by Take Profit — during position opening, a Take Profit level is set at a fixed distance from the open price, specified in points. The value is set in the InpTakeProfit input parameter.

9. Position management

TrailngStop is used to protect profit. Stop Loss is set if profit in points exceeds the value specified in the InpTrailingStop parameter. If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If none of protective orders (Take Profit or Stop Loss) triggers, the position should be closed by an opposite signal. No other position exit methods are available.



Responded

1
Developer 1
Rating
(621)
Projects
972
47%
Arbitration
32
38% / 34%
Overdue
96
10%
Loaded
Published: 6 codes
2
Developer 2
Rating
(433)
Projects
686
34%
Arbitration
32
72% / 9%
Overdue
22
3%
Free
3
Developer 3
Rating
(120)
Projects
159
49%
Arbitration
15
53% / 27%
Overdue
4
3%
Free
4
Developer 4
Rating
(268)
Projects
396
27%
Arbitration
38
39% / 50%
Overdue
1
0%
Free
5
Developer 5
Rating
(250)
Projects
460
26%
Arbitration
140
20% / 59%
Overdue
100
22%
Working
6
Developer 6
Rating
(79)
Projects
111
37%
Arbitration
0
Overdue
4
4%
Free
7
Developer 7
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
8
Developer 8
Rating
(1156)
Projects
1462
63%
Arbitration
21
57% / 10%
Overdue
43
3%
Free
9
Developer 9
Rating
(617)
Projects
1427
59%
Arbitration
31
81% / 0%
Overdue
10
1%
Free
10
Developer 10
Rating
(20)
Projects
51
75%
Arbitration
0
Overdue
8
16%
Free
11
Developer 11
Rating
(151)
Projects
188
57%
Arbitration
10
80% / 0%
Overdue
0
Free
Published: 1 code
12
Developer 12
Rating
(251)
Projects
400
54%
Arbitration
9
67% / 22%
Overdue
36
9%
Free
Published: 2 codes
13
Developer 13
Rating
(625)
Projects
842
48%
Arbitration
27
37% / 15%
Overdue
63
7%
Free
14
Developer 14
Rating
(5)
Projects
4
50%
Arbitration
4
0% / 75%
Overdue
0
Free
15
Developer 15
Rating
(304)
Projects
544
35%
Arbitration
77
31% / 42%
Overdue
196
36%
Loaded
16
Developer 16
Rating
(539)
Projects
618
33%
Arbitration
35
37% / 49%
Overdue
10
2%
Busy
17
Developer 17
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
18
Developer 18
Rating
(45)
Projects
46
24%
Arbitration
34
9% / 85%
Overdue
10
22%
Free
19
Developer 19
Rating
(72)
Projects
80
10%
Arbitration
38
8% / 58%
Overdue
6
8%
Free
20
Developer 20
Rating
(77)
Projects
240
73%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
21
Developer 21
Rating
(300)
Projects
306
69%
Arbitration
2
100% / 0%
Overdue
0
Free
Published: 1 code
22
Developer 22
Rating
(2279)
Projects
2873
63%
Arbitration
121
45% / 26%
Overdue
429
15%
Free
23
Developer 23
Rating
(68)
Projects
111
69%
Arbitration
1
100% / 0%
Overdue
2
2%
Free
24
Developer 24
Rating
(74)
Projects
79
6%
Arbitration
46
11% / 54%
Overdue
7
9%
Working
25
Developer 25
Rating
(48)
Projects
49
8%
Arbitration
0
Overdue
0
Free
26
Developer 26
Rating
(2622)
Projects
3327
67%
Arbitration
77
48% / 14%
Overdue
342
10%
Free
Published: 1 code
27
Developer 27
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
28
Developer 28
Rating
Projects
0
0%
Arbitration
1
0% / 0%
Overdue
0
Working
Published: 27 articles
29
Developer 29
Rating
(6)
Projects
8
25%
Arbitration
2
50% / 0%
Overdue
2
25%
Free
Similar orders
Pazuzu 30+ USD
generate or create me a python coded file that has mql5 language requirements for a trading bot under the following instructions. the bot must execute trades if necessary the bot must trade 24/7 the bot must trade gold and currency the bot must make unlimited profit hourly the bot must enter market with caution after market analysis of 98 percent of clear trade

Project information

Budget
100+ USD