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
I found problem with function ChartID();
After running EA for a longer time, this function returns ID of other probably first chart not current;
I use ChartSetSymbolPeriod() in this EA.
StringToCharArray does not correctly convert Unicode string to ANSI string.
code:
result in DebugView:
Used DLL is attached.
From the above, ansiString2 is perfect converted by twice call of WideCharToMultiByte.
StringToCharArray may be buggy.
Not reproduced. Too complicate way to check your message
1. Use '\n' at the end of string output with OutputDebugString
2. Write converted string to binary file and see what is written
3. Try to make backward conversion CharArrayToString and print it
Not reproduced. Too complicate way to check your message
1. Use '\n' at the end of string output with OutputDebugString
2. Write converted string to binary file and see what is written
3. Try to make backward conversion CharArrayToString and print it
Thanks for response, I've tried that.
Tried code:
Result is in image:
Log files (and source code) is attached.
EDIT: My computer locale is CP932, so acp.txt contains CP932(Shift_JIS) encoding string.
Thanks for response, I've tried that.
Tried code:
Result is in image:
Log files (and source code) is attached.
EDIT: My computer locale is CP932, so acp.txt contains CP932(Shift_JIS) encoding string.
Ok. We changed CharArrayToString and StringToCharArray.
Please try conversions with your CodePage in the file functions. I suspect we need make the same changes
Ok. We changed CharArrayToString and StringToCharArray.
Please try conversions with your CodePage in the file functions. I suspect we need make the same changes
Ok, what codepage should I convert it to?
I think you requested the "binary" output of StringToCharArray, so I did it.
I can convert it to any codepage, but it'll be different from "binary", won't it?
Ok, what codepage should I convert it to?
I think you requested the "binary" output of StringToCharArray, so I did it.
I can convert it to any codepage, but it'll be different from "binary", won't it?
There are specifical MultiByte from 1 to 4 bytes for 1 character - for example yours. Russian MultiByte is simple - 1 byte for 1 character always.
Try to write string to the file opened with FILE_ANSI flag. Then read string from this file.
Just use file functions instead of StringToCharArray and CharArrayToString
There are specifical MultiByte from 1 to 4 bytes for 1 character - for example yours. Russian MultiByte is simple - 1 byte for 1 character always.
Try to write string to the file opened with FILE_ANSI flag. Then read string from this file.
Just use file functions instead of StringToCharArray and CharArrayToString
Mmm, I'm confusing the purpose of that. You'd previously requested me as:
1. Use '\n' at the end of string output with OutputDebugString
2. Write converted string to binary file and see what is written
3. Try to make backward conversion CharArrayToString and print it
I had believed that you need materials to investigate the problem.
Now, you respond me that "write string to the file opened with FILE_ANSI flag. Then read string from this file".
You mean this is the solution for this problem? or way to get the materials to investigate the problem?
You mean this is the solution for this problem? or way to get the materials to investigate the problem?
No solution. Possible bug.
Way to get suspictions. And you can check it quickly now and after new build release. We'll check it too. but 2 checkers better than 1
PS We just need your answer. Is there bug in the file functions or not