Job finished
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specification
Please, check the detailed description of the requirement in the attachment
(if you don't ask questions, I will assume you haven't read it)
1 stEnhancement: Adjust TP using Error
Currently, when the open signal is generated, the TP is calculated on that Price as a percentage.
The problem is that sometimes the EA is wrong about the moment that the symbol is supposed to revert to the mean, generating an ERROR. This error will be zero in perfect cases where the EA predicts the exact moment where the currency starts to revert back.
This error causes the TP to be much more difficult to achieve, since the recover needs to be much stronger than the % defined in the original TP
This functionality needs to be controlled by a new parameter “Adjust TP with Error %”
This parameter will range from 0% to 100%. If it is 0%, TP should remain like it is today.
If it is 100%, TP should be reduced by 100% of the error.
2nd enhancement : Extra Profit and Safeguard
Sometimes, although TP is reached, closing the position, it would be better to not close it at that time, since the price kept rising to an even better possible TP.
After the enhancement, the first time the position reaches TP, it should not close, actually, TP and SL should change.
TP should change to a new TP, where an Extra Profit should be added to it (new global variable)
SL should change to a new SL, that will be original TP minus a SAFEGUARD % (new global variable)
The 2 enhancements should be reversed to work also with SELL positions
(please, ask for the full EA file if you think it will be necessary to make you evaluation)