How can I code my Expert Advisor to take multiple trades?

 
I am a bit new to expert advisor coding. I have made an Expert Advisor (see attached file). It only takes one trade at a time though. There are several instances that the conditions for trade entry are met more than once but only one trade is taken at a time. How can I make it take more than one trade when a condition is met more than once? Please note that I am not trading with this Expert Advisor. It is solely for learning purposes.
Files:
TestEA1.mq4  11 kb
 

Search in the codebase e.g. for Grid EAs.

There you find a huge amount of EAs trading more than one position - study them and use their solutions..

 
Carl Schreiber:

Search in the codebase e.g. for Grid EAs.

There you find a huge amount of EAs trading more than one position - study them and use their solutions..

Thanks for the reply. My issue with this is some of the codes are a bit complex and most are not commented. This makes the learning curve quite steep. Anyway, I would be grateful if you could recommend a Grid EA that is bare bones and relatively easy to follow.
Reason: