OnTimer()

 
Hello! If I place a Market order on OnTimer(), Market  is open But there is no  tick coming in that moment , order will still be sent? 
Let’s say I want an order to be send if TimeLocal() >=some_datetime. Last tick was received 15 seconds before some_datetime. This order will be sent? 

I want to use it in very simple EA which is placing pending orders before news. I set the time, and before news start, 10 seconds before, pendings will be sent. Last time I had a bad experience where I set pendings for 20 sec before news, and they were sent 3 seconds after news start . Maybe I can avoid this by use OnTimer() instead of OnTick(). 
Thanks! 
 
Of course, it will be sent. OrderSend sends the request, network delivers, placed in the server queue. Once it reaches the top of the queue, you get filled or not, and the result delivered back to the terminal. Normally it is the 20-200 milliseconds the network takes to deliver is the limiting factor, but it can take minutes to do a trade because of the servers during news.
 
William Roeder #:
Of course, it will be sent. OrderSend sends the request, network delivers, placed in the server queue. Once it reaches the top of the queue, you get filled or not, and the result delivered back to the terminal. Normally it is the 20-200 milliseconds the network takes to deliver is the limiting factor, but it can take minutes to do a trade because of the servers during news.
Thanks! 
 
>>> which is placing pending orders before news

You might want to use order expiration time to avoid late fulfillment.
 
Ok! Thanks! So if I call OnTick() in OnTimer() with a 1 second timer, OnTick() will run at every second and at every tick
 
Daniel Cioca #: So if I call OnTick() in OnTimer() , OnTick() will run at every second and at every tick
Only if your function is quick. OrderSend during news is not.
 
William Roeder #:
  1. Only if your function is takes less than a second.
  2. Why do you want to? Nothing has changed unless the terminal calls OnTick.
Thanks! 
As I mentioned I am trying to place pending orders 10 sec before news start. So last time they were placed 3 seconds after the news has been released. So in the moment of placing the pendings I get average between Ask and Bid price for calculating the distance for placing pendings. So as mentioned, last time there was a delay in placing the pendings so I was thinking maybe there was no incoming tick during this time, and I can resolve this by using OnTimer(), but all code is in OnTick(). So instead of moving the code, I can just call OnTick() in OnTimer().
 Is that making sense? 
Thanks!
Reason: