Create MT4 EA

Cancelled Posted Feb 20, 2014 Paid on delivery
Cancelled Paid on delivery

I want to create an EA that depends on multipliers so if it starts buying @ 1.3500 every 20 pips down for instance it would buy 1@1.3500 , 2@1.3480 , 4@1.3460 , 8@1.3440 ……….etc .

And before it opens the next position it should close the one above it (in case of buying for sure)

Also if position 1&2 lost and we opened position 3 which is 4@1.3460 and it went on our favor for 20 pips it’ll move the SL to BE and after the price went to let’s say 50 pips and before it reaches our TP @ 60 pips it went down and got us out @ BE so we start buying again 4@ 1.3440 and it would still be position number 3 and we do that until one of the positions reaches our TP or the number of multipliers ends keeping in mind that if one of them got us out @BE after moving on our favor without touching the TP we move this position one level down and we still consider it the same initial multiplier number if it was number 3 then it is still 3 but one level down and the next one will be multiplier 4 (8 but one level down @1.3420)

If we won at first lot then we’re done for the day if we won at any multiplier by reaching the TP we’re done for the day if we lost in all multipliers we assigned we’re done also for the day.

And I want the EA to have the following variables:

1- Buy/sell “because I want to be able to define buy only or sell only for each currency”.

2- Pip step “I want to be able to define how many pips before opening a new position 20, 30…etc.”

3- Starting and ending hours for this EA to be active like from 08:00 GMT till 16:00

4- GMT shift I want to be able to change time and to define it for different broker like +2, -3 whatever.

5- Stop loss & Take profit to be adjustable for different currencies.

6- Close previous position to be able to leave the previous position open or close it and open another one if it’s true then it’ll close it false it’ll leave it open.

7- Number of multipliers how many time I want it to do this process if its 4 and it starts with 1 lot then it will resume with 2,4 and 8 after that it would stop

8- Multiplying number if its 2 and it starts with 1 then the next position would be 2 then 4 and if its 1.5 and we start with 1 then it would be 1.5 then 2.25.

9- Starting level I want to be able to define the first open position level like if I want it to start buying Euro/USD from 1.3530 and down every 25 points for 3 steps starting with 1 lot and closing the one before so it would start buying 1 lot @ 1.3530 then 2@1.3505 then 4@1.3480

10- 4 & 5 digits for different brokers

11- Starting lot I want to be able to start with 1 or 0.01 or 0.5 so I want it adjustable.

12- Trailing Stop loss actually I want to trail one time so if I wrote 20 that means after moving 20 pips in my favor I want the SL to move to break even and stays there until I get out by take profit that I define or get me out on break even so I don’t want to trail the price after BE.

Now let’s study this example, assume that the A/U is in an uptrend and I think its retracing and will resume the uptrend so I put the EA with the following criteria:

Buy/ sell------------------------ buy

Pip step------------------------- 20

Starting hour------------------ 00:00

Ending hour------------------- 16:00

GMT shift---------------------- +2

SL-------------------------------- 20

TP-------------------------------- 60

Close previous position---- true

#of multipliers---------------- 6

Multiplying number--------- 2

Starting level------------------ 0.9060

4 & 5 digits--------------------- 4

Starting lot--------------------- 0.1

Trailing SL---------------------- 20

C Programming

Project ID: #5465133

About the project

3 proposals Remote project Active Mar 29, 2014