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.
static int nHist, nOpen, nPend;
int nHistPrev = nHist,
nOpenPrev = nOpen,
nPendPrev = nPend;
GetCounts(nHist, nOpen, nPend);
if(nHist != nHistPrev
|| nOpen != nOpenPrev
|| nPend != nPendPrev) OnTrade();
To add comments, please log in or register