Download MetaTrader 5
To add comments, please log in or register
Share your knowledge. Become a well-known developer!
lukinho158
23
lukinho158 2014.07.24 16:01 

Hello,

I would like to ask you whether exists some substitutions for OnTrade() event handler which perfectly works in MQL5 but not in MQL4? 

 

Thank you very much for possible responses and any advices are welcome.

 

Regards

 

Lukas 

whroeder1
13640
whroeder1 2014.07.24 18:13  
lukinho: whether exists some substitutions for OnTrade() event handler which perfectly works in MQL5 but not in MQL4?
Something like
start(){
   static int nHist, nOpen, nPend;
   int nHistPrev = nHist, 
       nOpenPrev = nOpen, 
       nPendPrev = nPend;
   GetCounts(nHist, nOpen, nPend);
   if(nHist != nHistPrev
   || nOpen != nOpenPrev
   || nPend != nPendPrev) OnTrade();
See also order accounting - MQL4 forum
and Could EA Really Live By Order_History Alone? - MQL4 forum



/
To add comments, please log in or register