Tarea técnica
I need a semi auto EA.
The parameter is as follows:
Hedge Allowed: Yes/No
Initial Trade TP: 100
Initial Trade SL: 17
--------------- First Top up-------------
1st Top Up At: 30%
1st Top Up Lot: 0.21
1st Top Up SL: 20
----------------2nd Top Up--------------
2nd Top Up At: 50%
2nd Top Up Lot: 0.50
2nd Top Up SL: 18
---------------3rd Top Up--------------
3rd Top Up At: 75%
3rd Top Up Lot: 1.58
3rd Top Up SL: 16
-----------------------------------------------------------------------------------------------------------------------------------
Here I'll explain how the EA should work.
Open positions will be done manually or by another EA.
First open position (manually or by another EA) is called initial trade.
When initial position is opened, The EA should automaticly place SL and TP as set on parameter (Initial Trade TP and Initial Trade SL).
After placing the initial trade, if price goes 35% in profit (35% is default but ability for user to change to his requirement) of 100 pips (100 pips is the Initial trade TP) then EA to open 1st Top Up trade. According to the parameter above the the Lot Size should be 0.21. Upon opening the 1st Top Up, the EA Should set SL for the 1st Top Up (1st Top Up SL is set as 20 pips shown above at the parameter) and also move the Initial Trade SL to the same place where 1st Top Up SL is. The TP for 1st, 2nd and 3rd will be same as Initial trade TP.
When Price moves to 50% of Initial trade's TP then "2nd Top Up" should open. EA should then place SL as set on the parameter and also move Initial Trade SL and 1st Top Up SL to the same place as 2nd Top Up.
When Price moves to 75% of Initial trade's TP then "3rd Top UP" should take place and again move all SL to 3rd Top Up's SL.
"Hedge Allowed: Yes/No"
If "No" is selected then, While their are Buy positions open and a new Initial trade Sell positions opens then close all Buy positions. Same as reverse, If their are Sell positions open and then a new Buy trade takes place then close all sell positions.
If "Yes" is selected then, treat Buy and Sell positions as the EA is made for.
If "Top Up Lot" is set to "0.00" then that Top Up does not take place.