A little surprised :) Thought I'd share and ask a NOT rhetorical question. - page 16

 
I told you - beginners... Understanding will come with experience.
 
Renat:
I'm telling you - beginners... Understanding will come with experience.

Good point. It's a good one. :)

You're overreacting with the novice. What are we arguing about now? :)

Discover maths. :)

==

I'll add-- maybe someone will do it... you can start by looking at this.


http://en.wikipedia.org/wiki/%E2%84%9A

and here http://demonstrations.wolfram.com/RationalNumberExplorer/

and here http://www.solarix.ru/for_developers/cpp/boost/rational/ru/rational.shtml

 
Academic:



The smiley faces in your next posts will be cut out. Keep this in mind.
 
DDFedor:
The smiley faces in your next posts will be cut out. Keep that in mind.
Who's there? :)
 
Renat:
Price conversion to integer values has no significant advantages. Yes, it reduces volumes effectively, but it dramatically loses speed due to inevitable conversion to double. Precisely unavoidable, because you can't make the whole system integer, the computable maths still has to be done in double (which doesn't even have enough precision).

I second that. That is why I wrote earlier:

hrenfx:

P.S. Your numbers are clearly inaccurate: the INT story cannot take up 2.1Gb and the DOUBLE story cannot take up 7Gb. The difference should always be exactly 2(USHORT is not enough) times. Switching to integer arithmetic with prices gives a significant advantage when all logic in an EA can be replaced with integer logic. This doesn't happen very often.

I have the dumbest but fastest calculator, everything is integer, because it only has addition, subtraction and comparison operations. Consequently, passing from INT to DOUBLE is not needed.

Generally speaking, algorithmic optimization in particular cases always gives an advantage in speed of execution (not writing) over the general approach. So, for example, if your Expert Advisor uses auto-optimization of its parameters, the issue of speed of auto-optimization is very important. And it is reasonable to create either in DLL or directly in MQL5 your own maximally algorithmically optimized Expert Advisor. And do not use the MT5-optimizer for autooptimization. Unfortunately, MT5-optimizer for auto-optimized Expert Advisors is suitable for very limited cases.

 
hrenfx:

I second that. That's why I wrote earlier:

In my dumbest but fastest calculator, everything is on integers, because there are only addition, subtraction and comparison operations. Changing from INT to DOUBLE, respectively, is unnecessary.

Generally speaking, algorithmic optimization in particular cases always gives an advantage in speed of execution (not writing) over the general approach. So, for example, if your Expert Advisor uses auto-optimization of its parameters, the issue of speed of auto-optimization is very important. Therefore, it is reasonable to create either in DLL or directly in MQL5 your own maximally algorithmically optimized Expert Advisor. And do not use the MT5 optimizer for auto-optimization cases. Unfortunately, built-in optimizer for auto-optimized Expert Advisors is good for limited cases.

Can you give an example when translation into double cannot be avoided?


Another example is when we need to calculate the percentage value of something or its probability.

In the first case, we take a pip as 0.0001 of a percent and 1.2345% will be 12345 points.

It is the same with probability.

It should always be understood that even the bit depth of double is limited and there is always such a thing as hidden points.

 
Academic:

Give me an example when you need to convert to double?


A counter example would be to calculate the percentage of something or the probability.

In the first case, we take a pip as 0.0001 of a percent, in which case 1.2345% is 12345 points.

It is the same with probability.

It should always be understood that even the bit depth of double is limited and there is always such a thing as hidden points.

Well, what an ambush! Mankind is developing the science of numbers in a false direction. Real numbers, and even more so, complex numbers, were invented in vain. - Very simply, some people turn out to be able to get by with a number of integers!
 
joo:
Well, what an ambush! Mankind is developing the science of numbers in the wrong direction. Real numbers, much less complex numbers, have been invented in vain. - Very simply some people turn out to be able to do with a number of integers!
Don't you see an example?
 
Academic:
Can't you see an example?
How do I know if I see it or not?
 
An example of the need to go to double: a trivial calculation of the MA or any other indicator. It is enough to divide integers (virtualized from real numbers) to get a wild loss of accuracy. Profit in money cannot be calculated either. About this I have clearly and distinctly said earlier. You can't understand it without going into practice.
Документация по MQL5: Основы языка / Типы данных / Приведение типов
Документация по MQL5: Основы языка / Типы данных / Приведение типов
  • www.mql5.com
Основы языка / Типы данных / Приведение типов - Документация по MQL5
Reason: