Run POC.mq4 (code below) by attaching it to an M1 chart. The run time on my machine is about 10 seconds. Check Experts tab. Now, remark the last Print line (i.e. Print(_Time)) and re-run. It now takes only one second. Clearly something is very wrong. Note the print is not in the loop, nor in the actual duration reporting. I tried forwarding this to MetaQuotes, hopefully they will fix this.
Inserted Code
#property strict void OnInit(){ go(); ExpertRemove(); } void OnTick(){} void go(){ datetime _Time; int start=int(GetTickCount()); for(uint i=0;i<999999999;i++){ _Time=datetime(Time[0]); } Print(string((GetTickCount()-start)/1000)+"s"); Print(_Time); }
Not financial advice. For testing purposes only. Do not use on live account