The MQL Manual provides the following descriptions for CurTime() and TimeCurrent() standard functions:
//-----------------------
datetime CurTime()
Returns the last known server time, number of seconds elapsed from 00:00 January 1, 1970.
Sample:
if(CurTime()-OrderOpenTime()<360) return(0);
//---------------------
datetime TimeCurrent( )
Returns the last known server time (time of incoming of the latest quote)
as number of seconds elapsed from 00:00 January 1, 1970.
Note: At the testing, the last known server time is modelled.
Sample:
if(TimeCurrent()-OrderOpenTime()<360) return(0);
The questions are:
1- Why is CurTime() standard function is shown in MQ4 files in black leters unlike other standard functions.
2- What is the difference between the above functions? When to use each on?
Thanks,
//-----------------------
datetime CurTime()
Returns the last known server time, number of seconds elapsed from 00:00 January 1, 1970.
Sample:
if(CurTime()-OrderOpenTime()<360) return(0);
//---------------------
datetime TimeCurrent( )
Returns the last known server time (time of incoming of the latest quote)
as number of seconds elapsed from 00:00 January 1, 1970.
Note: At the testing, the last known server time is modelled.
Sample:
if(TimeCurrent()-OrderOpenTime()<360) return(0);
The questions are:
1- Why is CurTime() standard function is shown in MQ4 files in black leters unlike other standard functions.
2- What is the difference between the above functions? When to use each on?
Thanks,
Free Programmer for Profitable Strategies