How can I get current milliseconds from MQL4 using an Expert Advisor.
i.e.: in Java we can get current milliseconds using system.currenttimemillis()
How can I get current milliseconds from MQL4 using an Expert Advisor.
i.e.: in Java we can get current milliseconds using system.currenttimemillis()
dt1 = TimeLocal()+2;
do
{
dt2 = TimeLocal();
}
while(TimeSecons(dt2) < TimeSecons(dt1));
after finish you may count time from 0.000
Just cast values to ulong and make sure to multiply TimeGMT() with 1000
for print result cast to string :
ulong time = (ulong) TimeGMT()*1000 - (ulong) GetTickCount() ;
Print("milliseconds: ", (string)time);