Positions limiter code needed for grid EA (.mq4 file attached)

 

Can anyone assist me by adding a little code which would enable the user to define a finite number of open positions the attached EA can commit to?

I've tried to do this myself... but I keep getting error messages on debug. I'm just not at a level of understanding code where I can get this limiting issue resolved inside the EA.

Can anyone out there assist me by appending some code please?

Many thanks in advance if you can help.

David

Files: