
3526 

GumRai: Show your code. Explain what you are expecting and what is the result GumRai, it is a bit a longer file over 20k, I could attach it, but it will be of no use if I post it, it is kind of optimizer code script, and just once I got that number and with Only 1 pairsymbol, just 1 hour before. And it was as result in chain calculating, so hardly I believe it could be reproduced. I am just asking as an example in comparing :void OnStart() { double sum_1 = 6.807918429796922e+016; double sum_2 = 16.807918429796922e+016; if(sum_1 < sum_2) Print(" yes"); if(sum_1 > sum_2) Print(" no"); if(sum_1 == sum_2) Print(" why?"); }I did this in test script, but I don't know if such thing is correctly written. It prints 'yes', ie. correctly. But first time using to write this king of numbers in MQL4, so I don't know if the method of initializing that values like that is common method in mql4. Just that is my question. 


Hi WHRoeder, thank You. But what I am confused is: as the code example I wrote up, if those 2 double numbers are got while calculating (ie. not initialized like that), and compared further, will it give correct comparing result same as like those initialized? And also, I am not sure which number is bigger.. :(. By no computer logic 2nd, but I am not sure in this case. Thanks. 


I got in the '.log' file with 'Print()' and on screen from 'Comment()', number with double like this: 6.807918429796922e+016. I got the value without the decimals with 'DoubleToStr(,1)' as: 680791842979692216.0.
My problem, and because it's kind of unknown to me how that number is translated into the decimals, I was comparing further that number with other numbers but without the 'DoubleToStr()', and I expected to get some other numbers with bigger value, but nothing happened (note: Possible coincidence).
Question: If compared that kind of numbers with '>' or '<', will be got the correct result during calculations?
P.S. I don't know how to reproduce that similar numbers and to check what I ask.