-
You multiply five (5) ints together (result is an int,) and then assign it to a long. 2,592,000,000 is more than an int can hold. INT_MAX equals 2,147,483,647.
-
You won't have a problem if you multiply five (5) longs together.
long jump=long(60)*60*24*30*1000; Print(jump); // 2592000000
-
Don't post pictures of code, they are generally too hard to read.
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Forum rules and recommendations - General - MQL5 programming forum (2023)
Messages Editor
-
You multiply five (5) ints together (result is an int,) and then assign it to a long. 2,592,000,000 is more than an int can hold. INT_MAX equals 2,147,483,647.
-
Don't post pictures of code, they are generally too hard to read.
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Forum rules and recommendations - General - MQL5 programming forum (2023)
Messages Editor
I see ,so by default constants are ints if no decimal point and doubles if decimal point .
Thank you
(this is the full source code , at first with my error the jump was moving the time to the future)
https://www.mql5.com/en/forum/449798#comment_47801714

- 2023.06.28
- www.mql5.com
You can also work around this issue, by using literal suffix to declare a long.
long jummp = 60LL*60*24*30*1000;

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
What is this error warning ? thanks