Forex bot timer processing

0
2114
projectreaper ontimer.

OnTimer Forex Robot processing

 

Timer processing reduce asynchronized tick event lag from broker servers with multi currency trading(basket trading in my case)

 MQL4++ 
//Example of using Timer processing logic

//Global vars
extern int OnTimerProcessing=0;

int OnInit(){ //Bot Initialization
if(OnTimerProcessing>0)EventSetMillisecondTimer(OnTimerProcessing);//activation timer func for basket trading

}
void OnDeinit(const int reason){ //Deinitialization all parameters and functions
EventKillTimer(); //deinit timer

}
void OnTimer(){ //Timer function calls OnTick main calculations 
OnTick();
}

Stay in tune.✋

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This blog is kept spam free by WP-SpamFree.