EA help..design problem with MT4 ...?

 

I think I'm totally stuck here. As I read from the docs, start() is called for each tick that has arrived. And then, and only then it seems I can submit my order. But what if I need to submit an order at the time the last candle finishes?

Let's say it finishes at 17:59:59. The last tick before came in at 17:59:50. Now it takes let's say 5 minutes for the next tick. I MUST be able to react at 17:59:59, or 18:00:00 alternatively, but not 5 minutes later. That's too late since the price has changed then!

Is there any way to achieve this?

Many thanks...

 
If I remember correctly, it can be done with Sleep() or Contentious Loops. I cannot remember if it was within an EA or Script. Try searching the forum along those lines, this topic have come up before. Whatever reason you have for exact time. The Price would likely be the same +/- 1 tick even if it takes >5 minutes for the next tick and thats unlikely.
Reason: