Can someone help me modify this EA to take 1 trade per candle?

 

Thats a simple price action EA i made on online builder, but as i dont know about programming i find it very hard doing this, i am trying alternating the code last days unsuccesfully...

It should take 1 trade per candle but it keeps opening trades 1 after the other..

 
Please go here.
 
Marco vd Heijden:
Please go here.
thank you