Spécifications
EA requirements and necessary correction to be done.
The EA monitors the PROFIT of open positions and turns ON or OFF the ALGO TRADING accordingly.
By PROFIT I mean the SUM of profit + commission + swap.
The EA will have two strategies, the INITIAL and the SECONDARY. Each one of them will be selectable by the user in the EA inputs.
Let me explain here how the EA will operate:
1. INITIAL strategy:
· There will be a lower DD limit (in currency units e.g. -70€), selectable by the user in the EA inputs.
· If the profit moves downwards and crosses the limit of -70€, the EA will place a hedge opposite position (in order to freeze the loss) and then will turn OFF the ALGO TRADING.
· The user can enable or disable the placement of the hedge opposite position in the EA inputs.
· Then if the profit will move upwards and crosses the lower DD limit of -70€, the EA will do nothing, the ALGO TRADING will remain OFF.
· Then if the PROFIT will move further upwards to 0€ and all the open positions have been closed, there will be a DELAY of some seconds (1 to 120 sec. selectable by the user in the EA inputs), and then the EA will turn ON the ALGO TRADING.
· During all this process the user can turn OFF or ON the ALGO TRADING manually.
2. SECONDARY strategy:
· There will be an upper DD limit (e.g. -80€) and a lower DD limit (e.g. -150€), both of them selectable by the user in the EA inputs.
· If the profit moves downwards and crosses the upper DD limit of -80€, there will be a DELAY of some seconds (1 to 120 sec. selectable by the user in the EA inputs), and then the EA will turn ON the ALGO TRADING.
· Then if the profit moves further downwards and crosses the lower DD limit of -150€, the EA will place a hedge opposite position (in order to freeze the loss) and then will turn OFF the ALGO TRADING.
· The user can enable or disable the placement of the hedge opposite position in the EA inputs.
· Then if the profit moves upwards and crosses the lower DD limit of -150€ or even the upper DD limit of -80€, the EA will do nothing, the ALGO TRADING will remain OFF.
· During all this procedure the user can turn OFF or ON the ALGO TRADING manually.
The concept of the EA is:
To run the initial and the secondary strategies on the same account but on two (or more) different and completely separated terminals.
So when the ALGO TRADING is disabled on the one terminal, will be enabled on the other terminal.
The EA will disable ALGO TRADING once, when the profit moves downwards (not upwards) and the lower DD limit first reached. After that the ALGO TRADING will remain disabled.
The ALGO TRADING in the INITIAL strategy will be enabled again only when all open positions have been closed and the profit is 0€.
The ALGO TRADING in the SECONDARY strategy will be enabled again only if and when the profit moves downwards (not upwards) and crosses the upper DD limit.
The problem of the present EA’s logic, which needs correction:
The EA enables the ALGO TRADING when the profit moves upwards and the lower DD limit is crossed (from lower to higher profit).
The ALGO TRADING in the SECONDARY strategy must be enabled only if and when the profit moves downwards (not upwards) and crosses the upper DD limit.
The ALGO TRADING in the INITIAL strategy must be enabled only when all open positions have been closed and the profit is 0€.