Firing OnTick Event?

 

How to Fire OnTick Event through code?


Assume my code runs inside OnTick function and and crunches / consumes the incoming TCP/IP bytes.

Now if there is no OnTick event for say 3-10 secs, I will be late.  So I need to generate through code "OnTick" event.

How can I do it?


Thank You

Note:  I don't want to do it through OnTimer as thats the same as infinte loop with Thread.Sleep(x) option

 
Bangash: Now if there is no OnTick event for say 3-10 secs, I will be late.  So I need to generate through code "OnTick" event.
  1. There is no "late." There are no ticks because A) network delay/timeout/reconnection, or B) no trades.
    There can be minutes between ticks during the Asian session, think M1 chart. Larger charts, think weekend, market holiday (country and broker specific.) requires knowledge of when your broker stops and starts (not necessary the same as the market.)
              "Free-of-Holes" Charts - MQL4 Articles
              No candle if open = close ? - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. Enable the timer, have OnTimer call your function.