Correct, i.e. as I said. First, 0.5 is added to the fractional number, and then the fractional part is subtracted from the result and the result is rounded to a whole number.
Алексей Тарабанов: Correct, i.e. as I said. First, 0.5 is added to the fractional number, and then the fractional part is subtracted from the result and the result is rounded to integer.
Алексей Тарабанов: Correct, i.e. as I said. First, 0.5 is added to fractional number, and then the fractional part is subtracted from the result and the result is rounded to integer.
Well, then you need to write to servicedesk, that they have invented such an extra functionMathCeil():)
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.
And yours is wrong, I'm sorry...
Why?
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.1 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.2 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.3 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.4 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.5 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.6 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.7 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.8 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.9 = 1.00
Your example:
0.1+0.5=0.6 = 1
0.2+0.5=0.7 = 1
0.3+0.5=0.8 = 1
0.4+0.5=0.9 = 1
0.5+0.5=1.0 = 1
0.6+0.5=1.1 = 1
0.7+0.5=1.2 = 1
0.8+0.5=1.3 = 1
0.9+0.5=1.4 = 1
Why?
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.1 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.2 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.3 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.4 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.5 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.6 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.7 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.8 = 1.00
0 22:49:08.463 ! tests GBPUSDbc,H1: v1 = 0.9 = 1.00
Your example:
0.1+0.5=0.6 = 1
0.2+0.5=0.7 = 1
0.3+0.5=0.8 = 1
0.4+0.5=0.9 = 1
0.5+0.5=1.0 = 1
0.6+0.5=1.1 = 1
0.7+0.5=1.2 = 1
0.8+0.5=1.3 = 1
0.9+0.5=1.4 = 1
Because the statement"int A = double B + 0.5" is solved: int A = (int)MathCeil(double B); incorrect.
So how does it get resolved?
How about this?
Correct, i.e. as I said. First, 0.5 is added to the fractional number, and then the fractional part is subtracted from the result and the result is rounded to integer.
So how does it get resolved?
The code?
Correct, i.e. as I said. First, 0.5 is added to fractional number, and then the fractional part is subtracted from the result and the result is rounded to integer.
He can't explain. Don't disturb him.