Mql4 Help for new programmer trying to learn :-(

Hi guys,

Hope someone could kindly help me.

I’m very new to programing and would really appreciate any assistance. I wrote a EA program, but is has some flaws. How do I get my mql4 EA program to only open when the conditions for opening are met and not immediately reopen when the current trade is closed by either StopLoss or TakeProfit or cause it was simply manually changed?

I would really appreciate any help.