
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
Thanks, Fernando. I actually really want to use floor to make my code more efficient.
I think that I'm struggling to technically communicate a bit here. When I said, "hard coded value substitution of _Point," what I meant is that I need custom _Point-like data that can be auto-detected from any double, and not only from symbol related doubles. Similarly, my code retrieves custom digits in lieu of _Digits. This is the part where I don't see a way to avoid using MQL5 string functions. In other words, my code is ready to be put into a custom function that could be a truncating version of NormalizeDouble(double,digits) such as TruncateDouble(double,digits).
Floating point numbers don't necessarily have a fixed number of digits (its binary, not decimal). So using strings is not only inefficient but their representation can also be "technically" incorrect.
For example, the number 0.69 has two decimal places (using decimal representation), but when stored in a binary "float" data-type it becomes 0.689999997615814208984375. So how many digits does it really have?
You can never really "normalize" it
Whoa.😳 Now that is a technical communication.
I see that "[I] can never really 'normalize' it..." I'm done trying to do the impossible. Thanks again.