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.
- 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 - Enable the timer, have OnTimer call your function.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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