The oposite direction order at a given pips count in loosing trades.

 

Hi

I'm very new to MQL programming. But I tried to  create EA with my knowledge

I'm placing the trades manually. My objective is to build a EA to perform opposite direction trade at specific loss value with a given stop loss and take profit limits( same for all open trades). Actions should not be repeated more than once . An it should be applicable for all trades( not open charts as well) . My EA creates multiple trades many times for same trade over and over again. And it is only applicable only for the charts open. I tried many different ways but same issue prevails. If someone can modify this EA to my criterea or alternative EA would be highly appreciated.

Files:
unnamed_z2z.mq4  320 kb
 
Do you really expect us to debug your six thousand line program?
 
William Roeder:
Do you really expect us to debug your six thousand line program?
@Prasa Bond No looking for alternative