Invalid Function parameter on StrTotime function..

 

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

 

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

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

 

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"}; 
 

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

 
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
 
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.

 
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 . . .
 
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...

 

here

if u want less typo

Reason: