Add functions to expert and Convert it from mql to mq5

MQL4 Experts Scripts

Specification

Add 4 functions to expert.


the ea is copier, I want add  a function is reverse copier.


How to control?


My computer open two MT4.


Two MT4 is master and slave.


Slave copy master trading order.


part1:

the EA copy times is 2 second above, I want copy time is 1 second.


part2:

Add a usage deadline in the code, for example, the expiration date is 2022/12/31.


part3:

Because the prefix and suffix cannot be copied, for example, EURUSD.a cannot copy to EURUSDm.


part4:

MODE1 Just convert COPY SELL to BUY, without COPY SL and TP.

MODE2 Just swap SL and TP.

MODE3 Calculate the gap between SL and TP.

MODE4 Convert COPY buy stop/buy limit to sell. Convert COPY sell stop/buy limit to buy.



See EXAMPLE in detail below


for example 1:

Original transaction

buy

in 1.19456

sl 1.19450

tp 1.19965

Reverse trade mode1

sell buy reverses sell

in 1.19456 same as in of Original transaction

sl N/A Not need copy

tp N/A Not need copy

Reverse trade mode2

sell buy reverses sell

in 1.19456 same as in of Original transaction

sl 1.19965 copy from tp of Original transaction

tp 1.19450 copy from sl of Original transaction

Reverse trade mode3

sell buy reverses sell

in 1.19456 same as in of Original transaction

sl 1.19472 1.19456+x=1.19472 x=in of Original transaction - sl of Original 


transaction = 1.19456-1.19450=+0.00006

tp 1.18947 1.19456+y=1.18947 y=in of Original transaction - tp of Original 


transaction = 1.19456-1.19965=-0.00509

for example 2:

Original transaction

buystop

in 1.19456

sl 1.19450

tp 1.19965

Reverse trade mode1

selllimit buystop reverses selllimit

in 1.19456 same as in of Original transaction

sl N/A Not need copy

tp N/A Not need copy

Reverse trade mode2

selllimit buystop reverses selllimit

in 1.19456 same as in of Original transaction

sl 1.19965 copy from tp of Original transaction

tp 1.19450 copy from sl of Original transaction

Reverse trade mode3

selllimit buystop reverses selllimit

in 1.19456 same as in of Original transaction

sl 1.19472 1.19456+x=1.19472 x=in of Original transaction - sl of Original 


transaction = 1.19456-1.19450=+0.00006

tp 1.18947 1.19456+y=1.18947 y=in of Original transaction - tp of Original 


transaction = 1.19456-1.19965=-0.00509

for example 3:

Original transaction

sell

in 1.19456

sl 1.19466

tp 1.19065

Reverse trade mode1

buy sell reverses buy

in 1.19456 same as in of Original transaction

sl N/A Not need copy

tp N/A Not need copy

Reverse trade mode2

buy sell reverses buy

in 1.19456 same as in of Original transaction

sl 1.19065 copy from tp of Original transaction

tp 1.19466 copy from sl of Original transaction

Reverse trade mode3

buy sell reverses buy

in 1.19456 same as in of Original transaction

sl 1.19446 1.19456+x=1.19446 x=in of Original transaction - sl of Original 


transaction = 1.19456-1.19466=-0.00010

tp 1.19847 1.19456+y=1.19847 y=in of Original transaction - tp of Original 


transaction = 1.19456-1.19065=-0.00391

for example 4:

Original transaction

sellstop

in 1.19456

sl 1.19466

tp 1.19065

Reverse trade mode1

buylimit sellstop reverses buylimit

in 1.19456 same as in of Original transaction

sl N/A Not need copy

tp N/A Not need copy

Reverse trade mode2

buylimit sellstop reverses buylimit

in 1.19456 same as in of Original transaction

sl 1.19065 copy from tp of Original transaction

tp 1.19466 copy from sl of Original transaction

Reverse trade mode3

buylimit sellstop reverses buylimit

in 1.19456 same as in of Original transaction

sl 1.19446 1.19456+x=1.19446 x=in of Original transaction - sl of Original 


transaction = 1.19456-1.19466=-0.00010

tp 1.19847 1.19456+y=1.19847 y=in of Original transaction - tp of Original 


transaction = 1.19456-1.19065=-0.00391


Responded

1
Developer 1
Rating
(11)
Projects
13
15%
Arbitration
6
17% / 33%
Overdue
1
8%
Free
2
Developer 2
Rating
(75)
Projects
124
44%
Arbitration
14
29% / 50%
Overdue
17
14%
Free
3
Developer 3
Rating
(7)
Projects
15
33%
Arbitration
4
0% / 25%
Overdue
3
20%
Free
4
Developer 4
Rating
(390)
Projects
416
30%
Arbitration
74
19% / 70%
Overdue
52
13%
Working
5
Developer 5
Rating
(132)
Projects
178
39%
Arbitration
4
25% / 50%
Overdue
14
8%
Free
6
Developer 6
Rating
(26)
Projects
23
39%
Arbitration
26
8% / 38%
Overdue
0
Free
7
Developer 7
Rating
(21)
Projects
35
54%
Arbitration
8
63% / 38%
Overdue
1
3%
Free
8
Developer 8
Rating
(176)
Projects
227
19%
Arbitration
20
40% / 20%
Overdue
0
Working

Project information

Budget
30+ USD