Substitution for OnTrade() event handler in MQL4

 

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 

 
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



Reason: