Errors, bugs, questions - page 1168

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
Ta maaa...
You have to put in a double from the long before the transfer. For global variable. It's not zero, it's just a random double, it can be 1.34*e-307 or 4.29*e+120, because it's got log bits.
After transferring unzip from dub to long.
That's it.
OK, you got it ;)
OK, you got it ;)
Well I just don't understand what's unclear.
Double truncates the data, so you can't transfer long to double directly. But both are 8 bytes each, so you can transfer losslessly just using double as a container, which is what I did in the example.
Well I just don't understand what is unclear.
Double truncates the data, so you can't transfer long to double directly. But both are 8 bytes each, so you can transfer losslessly just using double as a container, which is what I did in the example.
Andrey, I did not understand the format of storage and display in the GV of the terminal. It seemed to show the graph ID, but it shows 0.
GV will show something resembling rubbish in appearance, this "rubbish" will turn into chart ID after reverse conversion.
The duble has its own data format, when tucking the long, we put on the duble format and use it just as 8 bytes of memory.
GV will show something resembling rubbish in appearance, this "rubbish" will turn into graph ID after reverse conversion.
The duble has its own data format, when tucking the duble we put on the duble format and use it simply as 8 bytes of memory.
More of a question:
Looking for an existing GV of the terminal by name. Through it the ID of the chart on which the EA is running is passed to the indicator. The indicator hangs on another symbol. I.e., I want to pass to the indicator the ID of the chart the Expert Advisor is running on. I am looking for it like this:
This is what the terminal says:
I tried to read the variable. I put it directly to the string and put it to the journal, as well as in variables of different types - all the same. There's two differences.
What's wrong with that?
Read here https://www.mql5.com/ru/docs/basis/types/casting paragraph "Data conversion of simple structures".
Exactly your case. Doublets have much lower precision in _number_ of characters than longs. That's why you get this result with simple assignment.
But you can fully use 64 bits of a global variable to store _any_ information 64 bits long (like short strings 8 bytes long. Not to mention longs)
The Expert Advisor is on M2, the indicator data is taken from M3.
1) There is a terminal restart at 14:40:
MD 0 14:40:06.009 Terminal MetaTrader 5 Alfa-Forex x64 build 930 started
II 0 14:40:06.586 Terminal OpenCL not found, install the latest OpenCL driver for better performance
JO 0 14:40:07.257 Experts expert FX_Money_Flow_v1_06 (EURUSD,M2) loaded successfully
RO 0 19:55:28.399 Terminal MetaTrader 5 Alfa-Forex x64 build 930 started
OP 0 19:55:28.992 Terminal OpenCL not found, install the latest OpenCL driver for better performance
RD 0 19:55:29.507 experts expert FX_Money_Flow_v1_07 (EURUSD,M2) loaded successfully
But it does not work properly all the time:
KF 0 23:59:51.987 FX_Money_Flow_v1_07 (EURUSD,M2) Factor value TF1 indicator: -1.#QNAN -1.#QNAN
The M3 chart is open at this time and there is an indicator on it which shows everything correctly:
(time difference between terminal and logs is 5 hours, the screenshot refers to the second restart)
Read here https://www.mql5.com/ru/docs/basis/types/casting paragraph "Data conversion of simple structure types".
This is exactly your case. Doublets have much lower precision in _number_ of characters than longs. That's why you get this result with simple assignment.
But you can fully use 64 bits of the global variable to store _any_ information 64 bits long (like short strings 8 bytes long. Not to mention longs)