EMA Crossover Strategy

MQL5 Experts Scripts

Specification

Hi.

I have currently written the basis of a simple EMA cross strategy using TradingView Pine script, however it needs work, and I'd like it to be done on MLQ5 for use on metatrader.


The criteria is as follows:


Based on 1H timeframe

Uses 55 and 110 ema's


Entry Criteria

Short: 55 ema cross over 110 ema

Long: 110 ema cross over 55 ema


Exit Criteria

Short TP: -0.4% price difference from entry

Short SL: +0.4% price difference from entry

Short Alt Exit: If Long is signalled


Long TP: +0.4% price difference from entry

Long SL: -0.4% price difference from entry

Long Alt Exit: If Short is signalled


Risk Parameters

2% risk on every trade

No Pyramiding, ie. only 1 open trade for any one currency pair at a time.

Optional trailing stop?


Instruments & Directions

I want to be ably to apply the code on specified pairs in specified directions based on previous backtesting. For example, below are the profitable combinations for 2019, so I'd like to be able to do a similar thing but on a larger backtesting period to maximise profitability.


AUDCAD - Short Only

AUDCHF - Short Only

AUDJPY - Long & Short

AUDNZD - Short Only

CADJPY - Long & Short

CHFJPY - Short Only

EURAUD - Short Only

EURCHF - Short Only

EURGBP - Long & Short

EURJPY - Short Only

EURNZD - Long Only

EURUSD - Long & Short

GBPAUD - Short Only

GBPCAD - Short Only

GBPCHF - Long & Short

GBPJPY - Long & Short

GBPNZD - Short Only

GBPUSD - Short Only

NZDCAD - Long & Short

NZDCHF - Short Only

NZDJPY - Long & Short

NZDUSD - Long & Short

USDCHF - Long & Short

USDJPY - Long Only

XAUUSD - Long Only

USOIL - Long Only

US30 - Short Only

Responded

1
Developer 1
Rating
(590)
Projects
789
71%
Arbitration
9
33% / 33%
Overdue
22
3%
Free
Published: 8 codes
2
Developer 2
Rating
(19)
Projects
24
17%
Arbitration
7
0% / 71%
Overdue
3
13%
Free
Published: 2 articles, 4 codes
3
Developer 3
Rating
(647)
Projects
1295
67%
Arbitration
84
26% / 49%
Overdue
338
26%
Free
4
Developer 4
Rating
(119)
Projects
127
41%
Arbitration
3
33% / 67%
Overdue
0
Free
5
Developer 5
Rating
(28)
Projects
30
63%
Arbitration
0
Overdue
4
13%
Free
Published: 1 code
6
Developer 6
Rating
(94)
Projects
148
59%
Arbitration
16
38% / 13%
Overdue
25
17%
Free
Published: 1 code
7
Developer 7
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
8
Developer 8
Rating
(52)
Projects
89
25%
Arbitration
8
75% / 13%
Overdue
44
49%
Loaded
9
Developer 9
Rating
(511)
Projects
549
53%
Arbitration
13
69% / 15%
Overdue
3
1%
Free
10
Developer 10
Rating
(349)
Projects
463
51%
Arbitration
41
24% / 49%
Overdue
149
32%
Free
11
Developer 11
Rating
(1929)
Projects
3550
88%
Arbitration
73
40% / 15%
Overdue
268
8%
Free
12
Developer 12
Rating
(29)
Projects
49
22%
Arbitration
14
29% / 21%
Overdue
13
27%
Free
13
Developer 13
Rating
(96)
Projects
143
76%
Arbitration
0
Overdue
2
1%
Free
14
Developer 14
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
15
Developer 15
Rating
(3)
Projects
2
0%
Arbitration
7
0% / 86%
Overdue
0
Free
16
Developer 16
Rating
(564)
Projects
844
73%
Arbitration
15
53% / 13%
Overdue
193
23%
Free
17
Developer 17
Rating
(295)
Projects
474
39%
Arbitration
103
41% / 23%
Overdue
79
17%
Busy
Published: 2 codes
18
Developer 18
Rating
(135)
Projects
163
40%
Arbitration
11
27% / 73%
Overdue
24
15%
Free
19
Developer 19
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
20
Developer 20
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
21
Developer 21
Rating
(8)
Projects
13
85%
Arbitration
1
0% / 100%
Overdue
0
Free
22
Developer 22
Rating
(69)
Projects
146
34%
Arbitration
13
8% / 62%
Overdue
26
18%
Free
Published: 6 codes
23
Developer 23
Rating
(1)
Projects
1
0%
Arbitration
2
0% / 100%
Overdue
0
Free

Project information

Budget
50 - 200 USD
Deadline
to 14 day(s)