EA based in indicator

 
Good night,

Years ago I ordered an EA based on an indicator's signal. I have the EA and the source code, I would need to make an adjustment but I can't find the programmer anymore. I have basic knowledge in other languages ​​and would like a basic help for me to try to make the change.

What happens is that regardless of whether you are in profit or loss with an open position, if the indicator's signal changes, it simply closes the order. I would need to change it so that it was possible to choose in the parameters, for it to observe whether it ends with a profit or a loss according to the parameter.

Another possibility I would like was that if he opens another position in the opposite direction in this situation (currently he only closes).

 Any hint or function... it could be brief or mql5 page where I would find the way to start this modification in my EA. Or quote me code examples. I would be very happy.

Attached is the source code for assistance. Thank you!
Files:
MarinEA_1v01.mq5  177 kb
 
Paulo Ricardo: Years ago I ordered an EA based on an indicator's signal. I have the EA and the source code, I would need to make an adjustment but I can't find the programmer anymore. I have basic knowledge in other languages ​​and would like a basic help for me to try to make the change. What happens is that regardless of whether you are in profit or loss with an open position, if the indicator's signal changes, it simply closes the order. I would need to change it so that it was possible to choose in the parameters, for it to observe whether it ends with a profit or a loss according to the parameter. Another possibility I would like was that if he opens another position in the opposite direction in this situation (currently he only closes). Any hint or function... it could be brief or mql5 page where I would find the way to start this modification in my EA. Or quote me code examples. I would be very happy.
It will not be easy. Even for experienced coders it takes time and knowledge to analyse someone else's code and figure out its logic in order to modify it, especially when it's not well documented and variable names are too short or cryptic.
 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
 
Paulo Ricardo :

Digging into someone else's code is a thankless task. Much easier to write code again. Unfortunately.

Reason: