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
2
Developer 2
Rating
(19)
Projects
24
17%
Arbitration
7
0% / 71%
Overdue
3
13%
Free
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
6
Developer 6
Rating
(94)
Projects
148
59%
Arbitration
16
38% / 13%
Overdue
25
17%
Free
7
Developer 7
Rating
(42)
Projects
88
14%
Arbitration
30
30% / 57%
Overdue
36
41%
Working
8
Developer 8
Rating
(48)
Projects
80
28%
Arbitration
8
75% / 13%
Overdue
41
51%
Free
9
Developer 9
Rating
(481)
Projects
510
53%
Arbitration
10
60% / 20%
Overdue
3
1%
Free
10
Developer 10
Rating
(349)
Projects
463
51%
Arbitration
41
24% / 49%
Overdue
149
32%
Free
11
Developer 11
Rating
(1858)
Projects
3461
88%
Arbitration
73
40% / 15%
Overdue
265
8%
Free
12
Developer 12
Rating
(28)
Projects
47
23%
Arbitration
13
31% / 15%
Overdue
12
26%
Free
13
Developer 13
Rating
(96)
Projects
143
76%
Arbitration
0
Overdue
2
1%
Free
14
Developer 14
Rating
(564)
Projects
933
47%
Arbitration
302
59% / 25%
Overdue
125
13%
Loaded
15
Developer 15
Rating
(3)
Projects
2
0%
Arbitration
7
0% / 86%
Overdue
0
Free
16
Developer 16
Rating
(550)
Projects
827
73%
Arbitration
15
53% / 13%
Overdue
193
23%
Working
17
Developer 17
Rating
(260)
Projects
422
38%
Arbitration
86
44% / 19%
Overdue
70
17%
Busy
18
Developer 18
Rating
(135)
Projects
163
40%
Arbitration
11
27% / 73%
Overdue
25
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
(66)
Projects
143
34%
Arbitration
10
10% / 60%
Overdue
26
18%
Free
23
Developer 23
Rating
(1)
Projects
1
0%
Arbitration
2
0% / 100%
Overdue
0
Free

Project information

Budget
50 - 200 USD
For the developer
45 - 180 USD
Deadline
to 14 day(s)