Download MetaTrader 5

Pb SymbolInfoSessionTrade

To add comments, please log in or register
zartan
650
zartan  

hi !

my code

datetime datetimeDeb,datetimeFin;
SymbolInfoSessionTrade("EURUSD",WEDNESDAY,0,datetimeDeb,datetimeFin);
Print("/"+datetimeDeb+"/"+datetimeFin+"/");

 my result

/1970.01.01 00:00:00/1970.01.02 00:00:00/

 where is the  ? please

Alain Verleyen
Moderator
35139
Alain Verleyen  
zartan:

hi !

my code

 my result

 where is the  ? please

See documentation of  SymbolInfoSessionTrade :

from

[out]  Session beginning time in seconds from 00 hours 00 minutes, in the returned value date should be ignored.

to

[out]  Session end time in seconds from 00 hours 00 minutes, in the returned value date should be ignored.

Return value

If data for the specified session, symbol and day of the week are received, returns true, otherwise returns false.

   datetime datetimeDeb,datetimeFin;
   if(SymbolInfoSessionTrade("EURUSD",WEDNESDAY,0,datetimeDeb,datetimeFin))
      Print("/"+TimeToString(datetimeDeb,TIME_MINUTES)+"/"+TimeToString(datetimeFin,TIME_MINUTES)+"/");
zartan
650
zartan  

OK weared no ?

thank's again 

Alain Verleyen
Moderator
35139
Alain Verleyen  
zartan:

OK weared no ?

thank's again 

Do you mean weird ? It's not, forex market is opened 24h/24h on Wednesday. What's your goal ?
To add comments, please log in or register