GumRai:
Thanks GumRai, I changed to StrToTime() but it says "no one of the
overloads can be applied to the function call", pls what do you think
that can mean and what do I do OR how do I write the function StrToDate() to produce the right result? Thanks
You haven't written the function StrToDate()
Maybe you could use StrToTime(), but that uses "yyyy.mm.dd hh:mi " format
Opengates:
Thanks GumRai, I changed to StrToTime() but it says "no one of theoverloads can be applied to the function call", pls what do you thinkthat can mean and what do I do OR how do I write the function StrToDate() to produce the right result? Thanks
Thanks GumRai, I changed to StrToTime() but it says "no one of theoverloads can be applied to the function call", pls what do you thinkthat can mean and what do I do OR how do I write the function StrToDate() to produce the right result? Thanks
StrToTime() only uses 1 parameter, if you are using more than 1, you are overloading the function
extern string NewsDate = "2015.06.09"; // Date for the News to be released extern string NewsTime = "12:30"; // Time for the News to be released //In your main code string DateTime=StringConcatenate(NewsDate," ",NewsTime); datetime Startdate=StrToTime(DateTime); if(TimeCurrent()==Startdate) //Be careful of using == in case of missed ticks { //perform certain tasks }
Change the format for entering the date as above.
Avoid using DateTime to name a string variable, it can be confusing
GumRai:
Thanks so much, just as you corrected me, it works fine. You are blessed
StrToTime() only uses 1 parameter, if you are using more than 1, you are overloading the function
Change the format for entering the date as above.
Avoid using DateTime to name a string variable, it can be confusing

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello Gurus in the house,
I am trying to convert date and time string to function as date and time real time in my ea but keeps giving error 'StrToDate' - wrong parameter count", below are the codes:
pls check and let me know where I got it wrong.
Thanks in advance