errors - miscellaneous questions - page 3

 
honest_knave:
Try long instead of int.

Yeah! long solved "_A" but other variable caused that error. Thanks!


Marco vd Heijden:

Which integer do you need ?

https://docs.mql4.com/dateandtime

Thanks for your comments.
long _A = iTime( Symbol(), PERIOD_W1, 0 ) + PeriodSeconds( PERIOD_W1 );
datetime _A_Time = TimeCurrent() + _A;
 

Time is ordinarily stored as a datetime variable.

However, datetime doesn't work well with negative numbers, so if you are doing arithmetic with time and there is the possibility of a negative number, use long.

 
honest_knave:

Time is ordinarily stored as a datetime variable.

However, datetime doesn't work well with negative numbers, so if you are doing arithmetic with time and there is the possibility of a negative number, use long.


I got it. "long" saved and already solved with it, thanks a lot.

 #Time To Integer - Closed 

 
What do you think "Jan 1, 2017" + "Feb 28, 2017" means?
datetime _A_Time = TimeCurrent() + _A;
 
whroeder1:
What do you think "Jan 1, 2017" + "Feb 28, 2017" means?

Sorry, I have not that type of dates calculation. That was example, I can't post (original) whole that part of code cause part of code was inarticulate. I have use  "+, -, *, /" in my original code, and I was feel problem comes from them.
( And also I was already spent enough time to try few things that I solve by myself, but nothing good results, and I never mind about "long". Also I was wrote that comment as much as quickly because I was really needed quick help and I reduced that part of code before I posted it. )

Thanks for asking.

 

#1 | No Condition but inside of Operator and Function() Still Runs - Open

( Hell nah! This sh*tty irrelevant runs kills me at all please help me )

I get below error (#1) description. I was worked on it over 3 hours but I can't find solution so, what can I do for it, please?
I just want no runs Operator and Function() while no Condition.

Thanks in advance.

Trading Strategy EURUSD,M1: error #1 no error trade conditions not changed
Reason: