Questions from Beginners MQL5 MT5 MetaTrader 5 - page 956

 
vladzeit:

Vladimir, thank you for your guidance. I will redo it following your logic. I have already seen in your example EA(Hoop master 2) how and when you use order and position accounting and refer to their properties.

I will try the analogy.

This code is just with the new engine with more checks and protections to minimise errors like "wrong price", "volume exceeded" and the like.

 
It must be a bug that the debugger is not displaying the accuracy of the numbers correctly.Bug
 
xxz:
It's probably a bug that the debugger doesn't display the accuracy of numbers correctly.

No. It is because of the excessive use of the word "Bug" and an unwillingness to know the basics of storing data in computer memory.


The question goes into the beginner's branch.


Added:

for reference:real types (double, float)

 
xxz:
It must be a bug that the debugger is not displaying the accuracy of the numbers correctly.

Learn the math. Even on our forum this topic is beaten to a pulp. In short, it's a processor bug.

 
Vladimir Karputov:

No. It is because of the excessive use of the word "Bug" and an unwillingness to know the basics of storing data in computer memory.


The question goes into the beginner's branch.


Added:

for reference:Real types (double, float)

but in the second case it is normalised...
and is displayed as just double

 
xxz:

but in the second case it is normalised
and is displayed as just double

Execute this code

Print(0.07);

and see what happens in the log.

 
Alexey Viktorov:

Run this code

and see what happens in the logbook.

It'll be a correctly normalised number, and calculated as intended...
but visually in the debugger I see this ***, not what Print prints...

If you can output it accurately, why can't you output it here?

 
xxz:

it will be a correctly normalized number and will be counted as intended...
But visually in the debugger I see such ***, not what Print prints out...

Essential reading:

Real types (double, float)

StringToDouble

 
Vladimir Karputov:

Essential reading:

Real types (double, float)

StringToDouble

here's a great way to get it right...

2018.12.07 14:32:39.103 2017.12.20 07:05:00 Ask = 1.2874 Bid = 1.28737

and in the debugger you can't show it like that?


 
Vladimir Karputov: ..determine in which values SL and TP (points or pips) are set.

I must be completely out of my depth. Can you tell me where to read about the difference between them?