Download MetaTrader 5

MT4 Freezing during loop

To add comments, please log in or register
arti86pl
82
arti86pl  
Is there an efficient way to exit loop? I can't relay on ticks, i have to check database every second or 2, tick sometimes have long pause. When i do infinite loop, MT4 is difficult to shut down. Can anyone help?
whroeder1
15900
whroeder1  
No loop at all. Use OnTick to process ticks, use OnTimer to process time based things like your database check. Start using the new Event Handling Functions
arti86pl
82
arti86pl  
whroeder1:
No loop at all. Use OnTick to process ticks, use OnTimer to process time based things like your database check. Start using the new Event Handling Functions

OnTimer() works perfect! Thanks!

To add comments, please log in or register