Timer - MetaTrader 5 Library | MT5 EA Download - MetaTrader 5 Resources
Timer callback interface
npm mymql5 timerexample:
#Includes "../index.mqh" ; Oolong interval ID; // Cancellation ID blank initialization ( blank ){ Timer::setTimeout(callback 1, 3000 , "321" ); // After 3000 milliseconds Timer::setTimeout(callback 2, 2000 ); // After 2000 milliseconds Interval Id = Timer::setInterval(myCallback3, 800 , "myCallback4 800" ); // Every 800 milliseconds // Arguments of any type type timer <integer> ::setTimeout(callback4, 1000 , 123 ); // after 1000 milliseconds type timer <string> ::setInterval(myCallback5, 1800 , "myCallback4 1800" ); // every 800 milliseconds } blank callback1( string value) { print ( "Call with value:" , value); } Blank callback2() { print ( "Call with value:" , "Blank" ); } void my callback 3 ( string parameter) { print (parameter); Timer::clearInterval(intervalId); } blank callback 4( integer value) { print ( "Call with value:" , value); } Blank my callback 5( string parameter, oolong idForCancel) { print (parameter); Timer::clearInterval(idForCancel); }author: Kuzmei Seffelev(seffele@gmail.com)
github: https://github.com/Senails/mql5-timer
Attachment download
📎 index.mq5 (0.9 KB)
📎 index.mqh (5.38 KB)
Source: MQL5 #53101
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •