Please help to put trailing stop into EA

 
Hello everyone,

I am new to EAs and programming, but would be willing to start learning intensively as soon as I finish my Finance and Investment degree. I have downloaded EA from this website (do not remember the link) and

have played around with inputs; it seems that profits have improved, however I have problem with equity which go in an opposite direction to profit line. So I thought that trailing-stop would help to reduce this

decline. Do you think this will help? or are there other ways? I would be grateful for any comments and suggestions. Also if someone could explain strategy itself, that would have been fantastic!

P.S. Please see attached picture of Balance/Equity and code itself. Also if you need further information, please tell me.

Thank you.

Dmitry
Files:
 

That seems like a martingale system and will always lead you to busting your account. Notice how equity and balance are not in sinc, equity falls as balance rises. It is bad.

You should use OrderModify() to change your stoploss. Cheers.