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
Some numbers can only be represented as an infinite fraction, such as 1/3 in the decimal system. But 1/3 is not an infinite fraction in the tertiary system, there it == 0.1. That is, different number systems have their own infinite fractions. Hence, a non-infinite fraction in decimal can be one in binary. For example: 0.1, 0.2, 0.3, 0.4, ... have no exact binary representation. If you call NormalizeDouble ten times, it will be either 0.19999999999...1 or 0.200000...1. I don't know, maybe this is news.
You're telling the truth! To be clear, ND is needed ONLY for comparison, not representation. And it's long since obsolete.
Some numbers can only be represented as infinite fractions, e.g. 1/3 in the decimal system. But 1/3 is not an infinite fraction in the tertiary system, there it == 0.1. That is, different number systems have their own infinite fractions. Hence, a non-infinite fraction in decimal can be one in binary. For example: 0.1, 0.2, 0.3, 0.4, ... have no exact binary representation. If you call NormalizeDouble ten times, it will be either 0.19999999999...1 or 0.200000...1. I don't know, maybe this is news.
I remember that, but in this case it's 0+0 and it's not 0.
I remember that, but in this case it is 0+0 and it is not 0.
You're telling the truth! To be clear, ND is needed ONLY for comparison, not representation. And has long been obsolete.
NormalizeDouble is only needed to normalize price when placing pending orders and stops. It does not need it for anything else.
This is clearly stated in the documentation
The calculated StopLoss and TakeProfit values, as well as open prices of pending orders, must be normalized with the accuracy, the value of which can be obtained by Digits().
In what particular case? Give me an example of when this happens.
this happens when there was 0 in the variable and 0 is added to it
(I suspect it's not actually 0)
NormalizeDouble is only needed to normalise price when placing pending orders and stops. It does not need it for anything else.
This is clearly stated in the documentation
this happens when there was 0 in the variable and 0 is added to it
(I suspect it's not actually 0)
Exactly. The "real" zeros in addition and subtraction remain zeros. That's why I offered you an example.
What about comparing real numbers...
A related side effect.
It turned out to be convenient. But it was not originally intended to be used in this way.
There are special functions for printing the real number with the right accuracy.
Tell me, why do you need to round real numbers in calculations? Because in this case, the accuracy of calculations is lost!
Exactly. The "real" zeros in addition and subtraction are still zeros. That's why I offered you an example.
NormalizeDouble is only needed to normalise price when placing pending orders and stops. It does not need it for anything else.
This is clearly stated in the documentation
Forum on trading, automated trading systems and strategy testing
Alternative implementations of standard functions/approaches
Renat Fatkhullin, 2016.09.02 00:55
This is not the way to overload. Same function signatures.
But the idea is clear - the function of normalisation taking into account tick granulation.