Economic Calendar EA - With a bug!!

 

I coded the Ecal EA, but I'm not that cluedup to to the right things. Can someone please help me with the code that will force the expert only to put in the number of trades I requested.

The EA will only trade when the market conditions match. Like the day is equal to 3 the time is 13h and the minutes is between 15 and 18. So I give the EA 3 minutes to make the trade based on 2 Moving average lines.

The EA is placeing upto 15 trades in that 3 minutes which is wrong I only want for example 2 orders and will change that later in the year to a higer number.

Thank you all for help,

Roets

Files:
Reason: