MQL5 - write to file unixtimestamp with copyrates

 

Hello!


I am using copyrates to get data. 

MqlRates t_rates[];
ArraySetAsSeries(t_rates,true);
CopyRates( Symbol() , 0 , 0 , bars_total , t_rates );

so i ecxpect t_rates[i].time to be a unixtimestamp. But if i write it to file for example it becomes "Human readable".

How to write it as a int to file?


Thanks!

derdigge

 
derdigge:

Hello!


I am using copyrates to get data. 

so i ecxpect t_rates[i].time to be a unixtimestamp. But if i write it to file for example it becomes "Human readable".

How to write it as a int to file?


Thanks!

derdigge

(int)t_rates[i].time
 
honest_knave:


Great that worked. fiddled arround with this. great way for typeconversion works wellg with string dataetime.... also


Thank you Sir!