Hello,
I try to read out and compare price at fixed time every day. I use few time/date/string management functions,
however I got stuck at StringToTime conversion, instead returning number of seconds passed until requested hh:mm:ss it always
returns seconds at 00:00. For example with the following code with fixed string:
Print("FIXED test string to time 2019.07.31 [02:27:39]: ", StringToTime("2019.07.31 [02:27]"));
StrategyTester gives the following output:
2019.11.26 14:19:17.506 Core 1 2019.11.24 22:13:20 FIXED test string to time
2019.07.31 [02:27:39]: 2019.07.31 00:00:00
Is it a bug or just me?
thanks for your help in advance
Just you :-)
The [] in the documentation means the [hour:minute:seconds] is optional. It doesn't mean you can use these characters in the string.
Just you :-)
The [] in the documentation means the [hour:minute:seconds] is optional. It doesn't mean you can use these characters in the string.
to use [ and ] is not an option, I see.
it works now.
thanks
- 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,
I try to read out and compare price at fixed time every day. I use few time/date/string management functions, however I got stuck at StringToTime conversion, instead returning number of seconds passed until requested hh:mm:ss it always returns seconds at 00:00. For example with the following code with fixed string:
Print("FIXED test string to time 2019.07.31 [02:27:39]: ", StringToTime("2019.07.31 [02:27]"));
StrategyTester gives the following output:
2019.11.26 14:19:17.506 Core 1 2019.11.24 22:13:20 FIXED test string to time 2019.07.31 [02:27:39]: 2019.07.31 00:00:00
Is it a bug or just me?
thanks for your help in advance