Errors, bugs, questions - page 1167
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
maybe, but it seems to be transmitted correctly. TheGlobal Variables window rounds up, displays 17 digits.
Union caste to the rescue. It's legal in mql5 even through structures.
MQL4. What can you picture?
Isn't the new MQL4 pulled up to MQL5?
MQL4. What can you do?
Let's see...
Here's a script with the principle, should work for both 4 and 5
Not exactly. Although judging by the Helps, it's pretty much the same thing. But we're not going to judge. We're interested in the result.
Let's see...
Here's a script with the principle, it should work on 4 and 5
This is really weird...
long, converted to double, displays zero. Although, after that double zero is normally converted back to long. I don't get it...
What the... ????????????
And look it up in the debugger? There is a very small non-zero value there. It still works, what else do you need?
See. I send window id (it is long) to the globe terminal (they are double). I need a set of indicators installed on different, any chart (the Expert Advisor will set them) to read the ID value of the chart of the controlling Expert Advisor and send its data to this very chart. The Expert Advisor will in its turn process all this data and then work with them. I see zero in the global terminal, and I am not so sure that the indicator will receive the necessary id of the desired chart and send its data there. I see zero. And it doesn't coincide with the chart id, on which the Expert Advisor works. I need to be sure.
If I cannot convert the data properly, I will have to use csv file. However, I want to solve the problem of data conversion without losses. And there is no loss, but addition of 2 to the true value.
I tried to convert to string - the same thing - it increases by 2 the sent value long 130462919691841406:
result:
I don't understand...
Ta maaa...
You have to put in a double from the long before the transfer. For global variable. There is not zero value, it's just a random dable, it can be say 1.34*e-307 can be 4.29*e+120, because there are bits of long.
After transmission, unzip from dub to long.
That's it.