Processing tick data - in test mode

 
I have written some code that calculates the data each time start is called. I have included TestAgVol.mq4 as a test case. I use the volume data in my calculations. I have noticed that you always get 2 ticks minimum, Open and Close. These come in at Second() = 0 and Second() = 59. During high volume periods you can get more ticks.

As you can see in the code, I use Second()=0 to start each 60 second period. I have noticed that at times I am missing ticks. This causes the aggregate volumes to be incorrect. I use Print() statements for debugging and believe this may be one problem but I have also notice that even without the Print() statments the OrderSend() function does the same thing to me.

Are my assumptions correct?? Is there anyway to slow down the test mode?

Any and all responses are appreciated!

Thanks in advance,

TC
Files:
testagvol.mq4  2 kb
Reason: