
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
Dear developers. What do you think about introducing the "long double" data type from C/C++? It would be very useful. To tell the truth, I've encountered that "double" type's accuracy is insufficient for calculations. Or alternatively, make a special class for operations with arbitrarily defined precision. What do you think about it?
Sorry to intrude, but are you launching a rocket into space? Wouldn't it be better to think about optimizing the algorithm or something?
Can you give an example where such precision is needed?
There is one more issue with the lack of accuracy. The situation is as follows. We are building a distribution function for 10 000 values by price. On some intervals the function's value is small and divided by 10000. We obtain values of the order 1*10e-6; then it is necessary to define the square of the difference between these values and we obtain the value of the order 1*10e-13 (then several thousand such values must be summed up); data are catastrophically lost. And 10000 is not so much, to tell the truth - not much. That's why I once again ask the developers to introduce "long double". As far as I understand, statistical work with large samples in the financial field is a frequently demanded task. Otherwise it turns out that we have just got excited about MQL5 and now we have to switch to C++.
Type double in mql5 works with numbers in range +-10e-307 to +-10e307, with mantissa of 16 digits. So there are no problems described by you.
If the declared mantissa is not enough, develop a higher precision class, for example, with mantissa of 32 digits. That is your right.
But for the main mass of developers 16 digits of mantissa is enough, why bother with such a mess?
Type double in mql5 works with numbers in range +-10e-307 to +-10e307, with mantissa of 16 digits. So there are no problems described by you.
If the declared mantissa is not enough, develop a higher precision class, for example, with mantissa of 32 digits. That is your right.
For most developers, 16 characters mantissa is enough, so why bother with it?
double x1=0.0011;
double y1=x1/10000;
double x2=0.0012;
double y2=x2/10000;
double c=y1-y2;
double d=MathPow(c,2);
printf(string(d));
результат: 9.999999999999968e-017
What do I do with this result? How do I compare it to other results? DBL_EPSILON=2.2204460492503131e-016. Besides the last two digits - see? And that's only two operations. And I have more of these operations. And based on this information, you will have to restore data later using some more operations. More losses. I'm just learning to program in a C-like language and such a class is difficult for me to build (or rather, I have no idea how). This is a serious work. By the way, by any chance, do you have such a class? And the developers can improve things for everyone at once. It would be possible to make 100,000x100,000 grids. Already more or less representative samples would be available, although even this is not enough by and large. And if they made a class for arbitrary precision, it would be even better :) It's just a data type. If it exists, it's there for a reason, because it fulfills a need. The point is that I don't know whether it's difficult or not for developers. If it's difficult and expensive - I agree with you - why pass my problem onto them. But if it's not difficult - why not do it. Again - a powerful development environment for trading calculations with high accuracy - some competitive advantage here :). That's why I'm asking what they think about it.
Again - a powerful development environment for trading calculations with high accuracy - some competitive advantage here :).
This is only from your point of view... 99.9999% do not need it
Use specialised software for this purpose....
This is only from your point of view... 99.9999% do not need it
Use specialised software for this purpose....
That's the thing, MT is a specialized product for financial calculations. And financial calculations are closely connected with the use of statistical methods. And there is no need to master new products - I want to develop TS in one trading environment, rather than to deal with this and fight with types. Moreover, it seems that MQL5 is really fast.
You understand that any developer is always missing something....
If 500 programmers write 10 wishes each - then it would take an office like Bill's....
to implement fantasies....
You understand that any developer is always missing something....
If 500 programmers wrote 10 wishes each, it would take an office like Bill's....
to make fantasies come true....