Errors, bugs, questions - page 2251
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
what function?)) Do you know another function for converting to a given accuracy other than
Rounding a floating pointnumber to a given accuracy.
doubleNormalizeDouble(
doublevalue,// number to be normalized
intdigits//number of decimal places
);
?
Read about double precision
I have already written you the name of the function to print. Please read carefully what was written before.
I don't care about printing) output(Print/Comment) only to checkNormalizeDouble() works, and the check shows that it doesn't always work i.e. - doesn't work.
2018.08.02 16:29:08.928 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.028 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.126 BCS_180801_1752 (EURUSD.gl,M15) -0.68500000000001
2018.08.02 16:29:09.229 BCS_180801_1752 (EURUSD.gl,M15) -0.68
2018.08.02 16:29:09.324 BCS_180801_1752 (EURUSD.gl,M15) -0.675
I don't care about printing) output(Print/Comment) only to checkNormalizeDouble() works, and the check shows that it doesn't always work i.e. - doesn't work.
2018.08.02 16:29:08.928 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.028 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.126 BCS_180801_1752 (EURUSD.gl,M15) -0.68500000000001
2018.08.02 16:29:09.229 BCS_180801_1752 (EURUSD.gl,M15) -0.68
2018.08.02 16:29:09.324 BCS_180801_1752 (EURUSD.gl,M15) -0.675
You are mistaken. You misunderstand how a computer is set up and how it stores real numbers.
To study:real types (double, float),DoubleToString,NormalizeDouble.
Read about the accuracy of double
That's a good point, thank you, so it's accurate for calculations)
I don't care about printing) output(Print/Comment) only to checkNormalizeDouble() works, and the check shows that it doesn't always work i.e. - doesn't work.
2018.08.02 16:29:08.928 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.028 BCS_180801_1752 (EURUSD.gl,M15) -0.6875
2018.08.02 16:29:09.126 BCS_180801_1752 (EURUSD.gl,M15) -0.68500000000001
2018.08.02 16:29:09.229 BCS_180801_1752 (EURUSD.gl,M15) -0.68
2018.08.02 16:29:09.324 BCS_180801_1752 (EURUSD.gl,M15) -0.675
Why?
It seems to me that this is somehow wrong.
And if we use a real account, but with the investor password?
If we are connected to a real account, the tester should return the account data. Including the fact that it's real.
What's the point of returning that it's a demo?
If we are connected to a real account, the tester should return the account data. Including the fact that it is real.
What is the point of returning that it is a demo?
The point is that there shouldn't be any difference. The less the tester knows, the less opportunity to tweak the results
For example, the tester always returns that trading is allowed, but sending ftp and mail is not, regardless of the settings in the terminal.
Greetings,
I save two binary files in the ...Tester\Agent-127.0.0.1-3000\MQL5\Files folder, when I try to read these files in the tester from int OnInit() function, the files are deleted.
What may be the reason?
They are not deleted from COMMON folder, but they are not read either(.
Greetings,
I save two binary files in the ...Tester\Agent-127.0.0.1-3000\MQL5\Files folder, when I try to read these files in the tester from int OnInit() function, the files are deleted.
What may be the reason?
The reason is in incorrect location where the files have been saved. The Agents folders are cleaned automatically after the test is completed. Save the file in the Common folder.