EA: Candle Average Trade

MQL5 Experts

Job finished

Execution time 7 minutes
Feedback from customer
Sehr guter und geduldiger Programmierer. Gerne wieder!
Feedback from employee
Toller Kunde! Vielen Dank für die Bestellung!

Specification

Hi,

I need an expert Advisor for MT5 which calculates the average of the last candle = ( High+Low)/2  (in every time frame the chart is) and then takes the following action:

If average (last candle) is above average from the candle before then if there is not already long position buy X points above high of last candle. X is to be defined. 

If average (last candle) is below average from the candle before then if there is not already short position sell X points below low of last candle.

The start and finish of the EA should also be set (time).

Trailing Stop and take profit can be predifined for current position or unset (which will results in a position that changes from long to short and the other way around).


example A: X=3  TrailingStop=10  Take Profit=8

candle 1 High: 1020 Low: 1010

candle 2 High: 1030 Low: 1005 (average higher)=> if there is no long position then BuyStop to 1033 (X=3)

candle 3 High: 1035 Low: 1015 (average higher)=> order has triggered: Buy @ 1033; Trailing Stop @ 1025; Take Profit @ 1041

candle 4 High: 1040 Low: 1031 (average higher)=> Trailing Stop @ 1030; Take Profit @ 1041

candle 5 High: 1045 Low: 1032 (average higher)=> Take Profit triggered @ 1041

candle 6 High: 1044 Low: 1031 (average lower)=> if there is no short position then SellStop to 1028 (X=3)

and so on...


example B: X=3  no Trailing Stop and no Take Profit

candle 1 High: 1020 Low: 1010

candle 2 High: 1030 Low: 1005 (average higher) => if there is no long position then BuyStop to 1033 (X=3)

candle 3 High: 1035 Low: 1015 (average higher) => order has triggered: Buy @ 1033

candle 4 High: 1040 Low: 1031 (average higher)

candle 5 High: 1045 Low: 1032 (average higher)

candle 6 High: 1044 Low: 1031 (average lower)=> if there is no short position then Stop of long position to 1028 + SellStop for new position to 1028 (X=3)

and so on...


Responded

1
Developer 1
Rating
(27)
Projects
27
26%
Arbitration
2
0% / 50%
Overdue
1
4%
Free
2
Developer 2
Rating
(511)
Projects
549
53%
Arbitration
13
69% / 15%
Overdue
3
1%
Free
3
Developer 3
Rating
(547)
Projects
630
33%
Arbitration
38
39% / 50%
Overdue
11
2%
Loaded
4
Developer 4
Rating
(103)
Projects
165
24%
Arbitration
23
9% / 78%
Overdue
16
10%
Working
5
Developer 5
Rating
(627)
Projects
846
48%
Arbitration
29
34% / 14%
Overdue
63
7%
Working
6
Developer 6
Rating
(295)
Projects
472
40%
Arbitration
103
40% / 23%
Overdue
78
17%
Busy
Published: 2 codes
7
Developer 7
Rating
(2302)
Projects
2898
63%
Arbitration
122
44% / 25%
Overdue
429
15%
Free
8
Developer 8
Rating
(31)
Projects
56
21%
Arbitration
12
67% / 8%
Overdue
2
4%
Free

Project information

Budget
50 - 120 USD
Deadline
from 1 to 3 day(s)