Errors, bugs, questions - page 2031
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
Read about type conversion and losses in doing so. https://www.mql5.com/ru/docs/basis/types/casting
Thank you! The idea is this: we have an indicator which gives few accurate signals.
Open any number of charts and, according to the MM and the indicator signal, open positions. We create text marks or buttons on the chart indicating the symbol and the current profit of the open positions. When you click the button, the desired chart is in the foreground.
A foursome?
Yes
Not just any DLL, not even Temp.ex4!
Yes
The problem is that in the new MQL4 the strings are unicode. In all other places: objects, indicators, graphs, symbol names, logs, settings, etc. - the strings remain unicode. Therefore, when communicating with the "outside world" in MQL4 programs, every time the WideCharToMultiByte conversion is done. Normally, characters of strings are single byte (but different in different encodings), in Southeast Asia it is multibyte (in Chinese layout 1 character takes from 1 to 4 bytes.
So not only Chinese, but also Europeans will not understand 1251 code page
The problem is that in the new MQL4 the strings are unicode. In all other places: objects, indicators, graphs, symbol names, logs, settings, etc. - the strings remain unicode. Therefore, when communicating with the "outside world" in MQL4 programs, every time the WideCharToMultiByte conversion is done. In usual case, characters of strings are single byte (but different in different encodings), in Southeast Asia it is multibyte (in Chinese layout 1 character takes from 1 to 4 bytes.
So not only Chinese, but also Europeans would not understand 1251 code page
Here's the trick: We create an object with a Cyrillic name, then on click it handles it in OnChartEvent, but its name is not visible there.
We'll check today in the five to see if this place will have a problem.
Here's the thing: We create an object with a Cyrillic name, then on click it handles it in OnChartEvent, but you can't see its name there.
Today we'll check in FIVE to see if this place will have a problem.
It will work in Fiver.
And there is a solution for your case in Quaternary.
Call MQLSetInteger(MQL_CODEPAGE,CP_ACP) in OnInit;
Then the string conversions "back and forth" will be adequate
this code runs on EURUSD 30m
terminal generates an error:
When I print it out, it generates -1;
Please tell me what I am doing wrong:
this code runs on EURUSD 30m
terminal gives an error:
And so:
?
Please tell me what I'm doing wrong:
this code runs on EURUSD 30m
the terminal gives an error: