Why would you want to convert datetime to double? Anyway, AFAIK, there's not problem in doing that directly:
datetime dt; double d; d = (double)dt;
Why would you want to convert datetime to double? Anyway, AFAIK, there's not problem in doing that directly:
Thanks, But maybe you mean: d = double(dt) ?
and I will explain my desire. I have at MQL4:
datetime TimeArray[];
ArrayCopySeriesMQL4(TimeArray ,SYMBOL_TIME ,NULL,TimeFrame);
But since the first variance of ArrarCopySeriesMQL4 has to be a double, I did:
double tfff[];
datetime TimeArray[];
tfff = double(TimeArray);
ArrayCopySeriesMQL4(tfff ,SYMBOL_TIME ,NULL,TimeFrame);
But the compiler says:
'tfff' - array access error
Can you help?
Thanks.
Why do you need these lines?
datetime TimeArray[]; tfff = double(TimeArray);Just use your double tfff[] to receive your timeseries.
Why do you need these lines?
Just use your double tfff[] to receive your timeseries.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello freinds,
How do I convert datetime to double?
I tried to do:
StringToDouble(IntegerToString(... but I got
'StringToDouble' - '{' beginning bracket is expected
Can somebody help.
Thanks