Open new order to cover previous order (similar to martigale) EA (MQL5)

 
Hello guys, first excuse me for my English.
I am creating an EA and I would like that when he has a position of 30 negative pips, he automatically opens a new order with the TP proportional to the first order.
In other words, it would be something like a martigale, several EA use it, I don't know the correct name.

thanks in advance.


This situation involves lots and pips.

I think you could see that I'm a beginner, if you have a didactic example it would be very good.

Files:
tp1.png  6 kb
tp2.png  8 kb
 
my code
Files: