Measuring order execution time

Among many MQL functions, there is one, which name does not suggest what it does. I’m talking about GetTickCount().
It doesn’t count coming ticks, as the name would suggest, but it counts miliseconds from the start of the system – that’s why it can be used for measuring the execution time of any code parts, including order execution times.

Such measure is quite simple:

int begin=GetTickCount();
OrderSend(...);
int end=GetTickCount();

Print("Order execution time was: "+(end-begin)+" ms");

This code begs for writing some kind of statistics module :]

Share with your friends:

Send us your comments

Name (required)

Email (required)

Message

  • Facebook