Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1796
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Mixing Boolean and other conditions into one pile... OK. If you don't want to write good code, don't write it. I won't try to persuade you and argue with you.
And if we're talking about universality of the function, well...
Well, it's closer to common sense than your previous function.
True, the readability leaves a lot to be desired... But who ever thinks about it...? :)
The one that by convention is true
no, "line_name" will have the last name assigned to it.
Mixing Boolean and other conditions into one pile... OK. If you don't want to write good code, don't write it. I'm not going to persuade or argue with you.
Okay, okay, I'll use your example.
Mixing Boolean and other conditions into one pile... OK. If you don't want to write good code, don't write it. I won't persuade you and argue with you.
Well, it's closer to common sense than your previous function.
True, the readability leaves a lot to be desired... But who ever thinks of that...? :)
Specifically, what's wrong?
And you still haven't answered what your function returns at "-1"...
no, "line_name" will have the last name assigned to it.
Specifically, what's wrong?
And you still haven't answered what your function will return at "-1".
it will return false - I've already checked
It has to be true.
Specifically, what's wrong?
But I thought you said your function claimed to be universal...? Then you forgot one very important detail:
The most universal and reliable option.
And you never answered what your function will return "-1".
Are you too lazy to write a simple script to check? Okay. I did it for you:
And now look at the result:
-10 is true.
-9 is true.
-8 is true.
-7 - true
-6 - true
-5 - true
-4 - true
-3 - true
-2 - true
-1 - true
0 - false
1 - true
2 - true
3 - true
4 - true
5 - true
6 - true
7 - true
8 - true
9 - true
10 - true
All negative numbers are true. 0 is false. That's how it works... :)
So, your function will return true.
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, or any tips and discussion on algorithms and codes
MakarFX, 2021.12.06 12:14
Mine will return false
As it should with negative values.