How to use seconds() in mql5


In mql4 for counting seconds from the start of the minutes
we have Seconds()
What is the equivalent of this function in mql5?

In other words, how can I have in a mql5 seconds in a minute?

int Seconds( const datetime time )
  return((int)time % 60);

Excuse me how should I use this code?

int Seconds( void )
  return((int)TimeCurrent() % 60);

void OnStart()

This is the equivalent function:

int SecondsMQL4()
   MqlDateTime tm;

See here the complete guide “Migrating from MQL4 to MQL5”:

1 Like

Thank you very much.