Download MetaTrader 5

Invalid Function parameter on StrTotime function..

To add comments, please log in or register
Articles can help you to solidify your knowledge. Come and read them!
murger
82
murger 2014.02.17 05:57 

During the built of the code I use this :

at the begginning of a function :

if(Fbug==1) {ResetLastError();}

then, at its end :

 if(Fbug==1){F04_Bug("F11A.HrBrokSession");}

this function give me the last error message if exist, with the name of the function, so I'm able to track error. I disable all of them when Ea is finish. (Fbug=0)

I get still a new error one with new ver 6.00 with that :

for(int v=0;v<aqi_Ville;v++)
     {
      for(int h=0;h<2;h++)
        {
         ati_Sessions[v][h]=StrToTime(ats_HreMarket[v][h])-( (ati_GmtPays[v]*60*60)-(avi_GmtBrokDif*60*60)-(ati_DifSaison[v]*60*60)+(24*60*60)) ;

Message error is :

" 4051 invalid function parameter value ..... " F11A.HreBroSession F04-Bug-> 4051"

I didn't got that with 509..


I try to find all the day but.. nothing.. if somebody as idea..


D

qjol
3243
qjol 2014.02.17 06:17  

u have to use "yyyy.mm.dd hh:mm" format

https://www.mql5.com/en/forum/149582

murger
82
murger 2014.02.17 06:25  

I use it, i used this :


string   ats_HreMarket [8][2]={"08:00:01","10:00:01","08:00:01","16:59:45","08:00:01","16:59:45", "08:00:01","16:59:45", "08:00:01","16:59:45",
                               "08:00:01","16:59:45", "08:00:01","16:59:45", "00:00:01","16:59:45"}; 
qjol
3243
qjol 2014.02.17 06:43  

can't u read ? full format !!!! "yyyy.mm.dd hh:mm" Example "2014.02.17 12:00"

i dont c in ur string a sign of a year.month.day

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2014.02.17 08:30  
DanielTahiti:

During the built of the code I use this :

at the begginning of a function :

then, at its end :

this function give me the last error message if exist, with the name of the function, so I'm able to track error. I disable all of them when Ea is finish. (Fbug=0)

I get still a new error one with new ver 6.00 with that :

Message error is :

" 4051 invalid function parameter value ..... " F11A.HreBroSession F04-Bug-> 4051"

I didn't got that with 509..


I try to find all the day but.. nothing.. if somebody as idea..

Where did you look ? it's a bug that has been reported to the Service Desk https://www.mql5.com/en/forum/149582/page2#908503
murger
82
murger 2014.02.17 09:26  
RaptorUK:
Where did you look ? it's a bug that has been reported to the Service Desk https://www.mql5.com/en/forum/149582/page2#908503



Thank's Raptor, undestood, means sense. I'll wait.


@qjol . I'dont want Year and Month. Thanks.

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2014.02.17 09:35  
DanielTahiti:



Thank's Raptor, undestood, means sense. I'll wait.


@qjol . I'dont want Year and Month. Thanks.

I did post a workaround if that helps while you wait . . .
murger
82
murger 2014.02.17 21:55  
RaptorUK:
I did post a workaround if that helps while you wait . . .

Of course thanks, it would be great because that doesn't run anymore.

Already in ver 509 i had to use this in fact ".08:00:01", with the dot before.. I didn't no why, but that did the job haha...

qjol
3243
qjol 2014.02.17 22:14  

here

if u want less typo

To add comments, please log in or register