Programmers, help me out: I need to determine the bar offset for a given time on an hourly TF. The standard procedure (from the tutorial) gives 0. Point me in the wrong direction...
datetime some_time=D'2004.03.21 12:00';
int shift=iBarShift("EUROUSD",PERIOD_M1,some_time);
Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);
Programmers, help me out: I need to determine the bar offset for a given time on an hourly TF. The standard procedure (from the tutorial) gives 0. Point me in the wrong direction...
Afternoon. After the last mt4 update and EA compilation there are warnings in three lines 101-106-109, see fig:
Please advise, - how to fix, here is the code of this function :
(and should it be corrected?)
Your init() is of int type, which means it needs to return a value. Before the last closing parenthesis write
return(INIT_SUCCEEDED);
There is a place in one function where the function may return nothing. You have not shown the functions - search for yourself in those functions where leaving on the last closing parenthesis is possible.
You didn't show the functions - search for yourself in those functions where leaving on the last closing parenthesis is possible.
Thank you. Corrected return(INIT_SUCCEEDED);.
Here is the code of this unshown function for the other two remaining warnings:
//+----------------------------------------------------------------------------+//| Вывод сообщения в коммент и в журнал |//+----------------------------------------------------------------------------+void Message(string m) {
Comment(m);
if (StringLen(m)>0) Print(m);}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thank you Zhunko and TheXpert !
Your variants eliminate this type of error!
Hi!
Can you tell me what the warning may mean when compiling an indicator in an updated mt4:
not all control paths return a value S_E_v.mq4 181
0 error(s), 1 warning(s) 1 2
Can you tell me what the warning might mean when compiling the indicator in the updated mt4:
Programmers, help me out: I need to determine the bar offset for a given time on an hourly TF. The standard procedure (from the tutorial) gives 0. Point me in the wrong direction...
Programmers, help me out: I need to determine the bar offset for a given time on an hourly TF. The standard procedure (from the tutorial) gives 0. Point me in the wrong direction...
"EUROUSD"Is there such a symbol?
Afternoon.
After the last mt4 update and EA compilation there are warnings in three lines 101-106-109, see fig:
Please advise, - how to fix, here is the code of this function :
(and should it be corrected?)
Afternoon. After the last mt4 update and EA compilation there are warnings in three lines 101-106-109, see fig:
Please advise, - how to fix, here is the code of this function :
(and should it be corrected?)
Your init() is of int type, which means it needs to return a value. Before the last closing parenthesis write
There is a place in one function where the function may return nothing. You have not shown the functions - search for yourself in those functions where leaving on the last closing parenthesis is possible.
.Before the last closing parenthesis, write .....
You didn't show the functions - search for yourself in those functions where leaving on the last closing parenthesis is possible.
Thank you. Corrected return(INIT_SUCCEEDED);.
Here is the code of this unshown function for the other two remaining warnings:
.
Here is the code
Thank you. Corrected.
Here is the code for this function on the other two warnings:
1. Most likely, you have deinit() also int and return(0) is not written in it
2. This function is void and the closing parenthesis serves as return` in it. Everything is ok in it.
deinit() - I don't have it at all.
Fixed return to return(0) on the two remaining warnings and the code compiled without any issues.
Thank you.