How to write into my EA this Money Management style ?

 
Hello,

I don't know how to write this into my EA
Pair : EUR/USD
Initial Lot : 1 Lot
Decrement : 0.1 Lot
First price : 1.5500

If I have a signal to BUY :

- Open 1 Lot at 1.5500
- Close 0.1 Lot at 1.5505 (keep 0.9 Lots with OrderOpenPrice at 1.5500) => Close the last 0.9 Lots IF I have a signal to SELL
- Close 0.1 Lot at 1.5510 (keep 0.8 Lots with OrderOpenPrice at 1.5500) => Close the last 0.8 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5515 (keep 0.7 Lots with OrderOpenPrice at 1.5500) => Close the last 0.7 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5520 (keep 0.6 Lots with OrderOpenPrice at 1.5500) => Close the last 0.6 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5525 (keep 0.5 Lots with OrderOpenPrice at 1.5500) => Close the last 0.5 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5530 (keep 0.4 Lots with OrderOpenPrice at 1.5500) => Close the last 0.4 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5535 (keep 0.3 Lots with OrderOpenPrice at 1.5500) => Close the last 0.3 Lots IF I have a signal to SELL OR if the price equal to StopLoss
- Close 0.1 Lot at 1.5540 (keep 0.2 Lots with OrderOpenPrice at 1.5500) => Close the last 0.2 Lots IF I have a signal to SELL OR if the price equal to StopLoss

- Close 0.1 Lot at 1.5545 (keep 0.1 Lots with OrderOpenPrice at 1.5500) => Close the last 0.1 Lots WHEN I have a signal to SELL OR if the price equal to StopLoss

The EA must wait the next bar after a StopLoss to check values.


And so on for the signal to SELL...

When the first 0.1 Lot is closed, I want to modify StopLoss of the entire trade equal to the OrderOpenPrice.

Thank you for your help !!!
 

Please, I really need some help !!!


I don't succeed to increment the OrderTakeProfit() to make the EA above.


You could see my code in another post which had never receive an answer.

https://forum.mql4.com/12738


If you have any idea I could test or THE solution, it could be great...


Thank you very much !

Reason: