Basic Robot with few functions and good expandable coding

2017.12.07 Experts

Specification

New EA in MQL5 with trendline (for MT4 programmer with less time and experiance in MT5 who wants to have debugger).
For later jobs: Few MT4 functions/program parts will be migrated to MT5 in further jobs dependend on this.

GENERAL
-The system is intended to run at FXPRO, German30 index, but should also run for other symbols
-Important: best practice coding for future expandable, good maintainability
-possible to set tradingtimes (in coding is ok, no ext param needed)
-possible to set when all EA-logic runs:
  * at new bar
  * at x seconed before bar will end.

- all Ea-logic-functions depends on parameter tf=timeframe

- methods for
  - open long
  - open short
  - close all short
  - close all long

- the EA consists of more strategies. Each strategy trades independent of the others
  - separation logical units (like main parts of a strategy) into separate files

- controll of positions: sum open positions, sum of win/loss at the moment, list of positions with details of open etc

- (add at 04-11-2017) Stop-Loss and Trailing Take profit functionality

EA LOGIC DETAILS:
Strategy 1:
If trendline rises/falls not too strong (slope between 1 and -1)
and last close is between average low-difference and max-low difference
additional condition: check slope of higher tf is bigger: slope(tf+1) > slope(tf)
than open long
inverse conditions for open short

Strategy 2:
provide little example with useage of Function2

Functions:
Function1:
calculation of a trendline(tf, xBars)
needed results from calculation:
1)draw line function
2)slope: slope=0 means trendline is horrizontal; slope=1 means trendline rises with X points per bar, -1=trendline go down X points per bar. X can be a global variable and set to a suitable value of the used symbol.

3)average difference between trendline and low
4)average difference between trendline and high
5)max difference between trendline and low
6)max difference between trendline and high

Function2:
Provide a little example for using MACD


EA dont need be profitable, but need to be ready to work.

Responded

1
Developer 1
2017.12.07
Rating
4.9
(582)
Projects
903
63%
Arbitration
93
31% / 38%
Overdue
268
30%
Loaded
2
Developer 2
2017.12.07
Rating
3.67
(3)
Projects
8
13%
Arbitration
10
10% / 70%
Overdue
3
38%
Free
3
Developer 3
2017.12.15
Rating
0
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
4
Developer 4
2017.12.31
Rating
5
(14)
Projects
22
59%
Arbitration
2
0% / 50%
Overdue
3
14%
Free

Project information

Budget
50 - 150 USD
Deadlines
from 1 to 5 day(s)