Pause timer temporarely

 

Is it possible to pause the timer.


It looks like EventTimeKiller(); only works with DeInit.


I would like to pause the timer while I execute some orders and then restart the timer once I have finished executing my orders.

 
Nico1854:

Is it possible to pause the timer.


It looks like EventTimeKiller(); only works with DeInit.


I would like to pause the timer while I execute some orders and then restart the timer once I have finished executing my orders.

What makes you think that it only works from OnDeInit?

 
Because a check is performed Ontimer and reported with a print. After using the kill timer, the check is still perrformed
 
Nico1854:
Because a check is performed Ontimer and reported with a print. After using the kill timer, the check is still perrformed
Check your code. Probably you excecute EventSetTimer() after EventTimeKiller() being excecuted
 

I think that I have spotted the problem.

Afetr EventTimKiller(), I close all pending orders, but without having a sleep between each orderd to close. The loop then ends and the EventSetTimer() is triggered, but straight away, as all orders are not closed, it stops again, closes what's left...


I will add a sleep between each order to close and see if that solves the problem.

Reason: