Errors, bugs, questions - page 1166 1...115911601161116211631164116511661167116811691170117111721173...3193 New comment Aleksey Lebedev 2014.07.04 22:30 #11651 artmedia70:And print the id immediately, while it is in long and not converted?The global variation is a double type, possibly a rounded value in the window Artyom Trishkin 2014.07.04 22:37 #11652 Swan: And print the id immediately while it is in long and unconverted?global variation - type double, possibly rounded value in the windowOf course I did that too: Print("Значение в ней = "+DoubleToString(GlobalVariableGet(gv_name),0));same thing... Aleksey Lebedev 2014.07.04 22:42 #11653 artmedia70: Of course I did:same thing... No, no conversion.Print(ChartID()); check out Artyom Trishkin 2014.07.04 22:48 #11654 Swan: No, no transformation. see So it will return the ID of the chart where the indicator is installed, not the ID I'm trying to pass to the indicator via GV Aleksey Lebedev 2014.07.04 22:57 #11655 artmedia70: This way, it will return the ID of the chart where the indicator is installed, not the ID I'm trying to pass to the indicator via GVThen print it out from the programme you are sending it from. Artyom Trishkin 2014.07.04 23:06 #11656 Swan: Well, print it out from the program you're sending it from.Yes, I already did. The value in GV is 4 more than in the program:2014.07.05 05:01:55.508 Multick EURUSD,H4: ID EURUSD : 130462919691841406GV = 130462919691841410I'll keep looking into it. TheXpert 2014.07.04 23:13 #11657 Double cropping is possible. You have to shove the long into the double union custom, not directly. And unpack the same way. Aleksey Lebedev 2014.07.04 23:20 #11658 TheXpert: Double cropping is possible. You have to shove the long into the double union custom, not directly. And unpack the same way. Maybe, but it does seem to transfer correctly. In the"Global Variables" window the value is rounded, it shows 17 digits. Artyom Trishkin 2014.07.04 23:25 #11659 TheXpert: Double trimming is possible. You should shove the long into the double union cast, not directly. And unpack the same way.Double shreds://---------------------------- string gv_chart_id_name=Prefix+"_chart_id"; long chart_id=get.GetChartID(symbol); graph.Message("ID "+symbol+" : "+IntegerToString(chart_id)+", ChartSymbol(chart_id) возвращает "+ChartSymbol(chart_id)); if(chart_id>=0) GlobalVariableSet(gv_chart_id_name,chart_id); // chart_id==0 в тестере else graph.Message("Чё-та нету chart_id : Symbol()="+symbol+", chart_id="+IntegerToString(chart_id)); graph.Message("GV без приведения типа = "+GlobalVariableGet(gv_chart_id_name)); graph.Message("GV с приведением типа = "+DoubleToString(GlobalVariableGet(gv_chart_id_name),0)); //----------------------------We get it: TheXpert 2014.07.04 23:28 #11660 Union caste to the rescue. It is legal in mql5 even through structures. 1...115911601161116211631164116511661167116811691170117111721173...3193 New comment
artmedia70:
And print the id immediately, while it is in long and not converted?
The global variation is a double type, possibly a rounded value in the window
And print the id immediately while it is in long and unconverted?
global variation - type double, possibly rounded value in the window
Of course I did that too:
same thing...
Of course I did:
same thing...
check out
No, no transformation.
see
This way, it will return the ID of the chart where the indicator is installed, not the ID I'm trying to pass to the indicator via GV
Then print it out from the programme you are sending it from.
Well, print it out from the program you're sending it from.
Yes, I already did. The value in GV is 4 more than in the program:
GV = 130462919691841410
I'll keep looking into it.
Double cropping is possible. You have to shove the long into the double union custom, not directly. And unpack the same way.
Double trimming is possible. You should shove the long into the double union cast, not directly. And unpack the same way.
Double shreds:
We get it: