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.
Hello.
Please help me find an error. The code should return the type of the last closed order (in this case a losing order).
Thank you in advance.
if(OrderMagicNumber()==MAGIC || OrderMagicNumber()== 777)) {
if(OrderMagicNumber()==MAGIC || OrderMagicNumber()== 777)) {
This line works - I use it in several other subroutines of mine. In any case, I haven't encountered any problems so far.
Thank you.
(A puzzling question).
How do I determine programmatically whether a number is even or odd?
For example:
int a, b, c;
a=2;
b=3;
c=a+b
c is even or odd?
One more theoretical question...
Is it worth forced zeroing of the array, if data is written to it dynamically, when new bars appear?
Thanks in advance.
1. By the value of the remainder of division by 2.
2. Worth.
1. By the value of the remainder of division by 2.
2. Worth.
The remainder is clear, but what mql function detects the remainder?
(A puzzling question).
How do I determine programmatically whether a number is even or odd?
For example:
int a, b, c;
a=2;
b=3;
c=a+b
c is even or odd?
If the numbers are integers, check the remainder of division by 2
If the numbers are integers, check the remainder of division by 2
The balance is clear, but what mql function determines whether there is a balance?
https://docs.mql4.com/ru/math/MathMod
https://docs.mql4.com/ru/math/MathMod
Thank you.)