LastTradeTime

 
In mql II, to wait 5min. before opening new trades:

if CurTime - LastTradeTime < 300 Then Exit;

Any idea how to do it in MT4?

TIA.
 
this is what I do :

if (MathAbs(CurTime()-LastUpdate)> UpdateInterval*60) // we update the first time it is called and every UpdateInterval minutes
{
LastUpdate = CurTime();

... etc

LastUpdate is initialised to zero so the script is exectued a first time, then it waits UpdateInterval minutes.

Hope it helps,
Reason: