tick data when temporary network outage

 

Hi,


This is a general question about MQL4 API and terminal design i havent found answers on the forum or knowledgebase.


When EA is running it is exposed to tick-level events.


But what happens when there's a network outage, lets say for 20 seconds my terminal doesnt receive any ticks.



1) When the network is back, does the EA's start() routine get called 100 times to catch up with missed tick ?


2) How can my EA and how can the MT4 terminal know about tick data integrity? ie: is there a serial number to every tick ?



2a) How can I know the time difference between a call to start() on my PC and the real time that the tick relates to if the highest resolution of tick record is in seconds but there are multiple ticks per second?


3) if my algorithm relies on 1 minute data and i don't want my EA to be called 100 times per minute with every tick, is there a way for start() to be called just on 1-minute aggregates?



Thank you !

 

1. Typical dealer does not send 5 ticks/second as per your example. Feeds are "filtered". (Disclaimer: TradeviewFX is an example of a fast ticker)

2. MarketInfo() has time of latest price update. TimeCurent() has latest server time (proxy for newest tick time, could be on another pair). Internal tick processing is an unkown.

2a. There are rarely multiple ticks per second. As you say, resolution is 1 second.

3. Use occurrence of a new 1m bar as a proxy for a 1m event to trigger your code. start, check for new bar, if none, then return(0) to exit processing for that tick.

Try a test....

Disconnect the feed from the ISP briefly and see what happens...

Reason: