Need to Place only one active trade based on price action trading

 

Hi Team,

I am new to this MQL5, so based on my knowledge i have created a price action EA. problem is my program is executing only one trade. as per my strategy i need the trades to be opened as soon the previous trade closes and the desired price reaches.

Files:
 
The EA needs to handle transaction from events OnTrade or OnTradeTransaction, see those in Docs.