Vladislav Andruschenko: Try specifying the encoding explicitly. FILE_ANSI or unicode
If FILE_BIN is replaced by FILE_ANSI, then the entire string will remain only the initial, but readable fragment, while the rest will not be, with unicode you get a blank string. It turns out that if you use ANSI, you must read line by line up to separators, and then add all parts to get one string. Isn't there anything simpler, except of course to return to MT4?
Can you please tell me how to make this construction
void OnStart()
{
int h=FileOpen("str.bin",FILE_READ|FILE_BIN);
if(h==INVALID_HANDLE){
Alert("Ошибка открытия файла");
return;
}
int s=FileSize(h);
string TXT=FileReadString(h,s);
Print(TXT);
FileClose(h);
}
works in MT5 the same way as in MT4, i.e. ТХТ variable is readable, not as squares.
It seems to be something with encoding, but I don't know how to solve it.
Can you please tell me how to make this construction
void OnStart()
{
int h=FileOpen("str.bin",FILE_READ|FILE_BIN);
if(h==INVALID_HANDLE){
Alert("Ошибка открытия файла");
return;
}
int s=FileSize(h);
string TXT=FileReadString(h,s);
Print(TXT);
FileClose(h);
}
works in MT5 the same way as in MT4, i.e. ТХТ variable is readable, not as squares.
It seems to be something with encoding, but I don't know how to solve it.
Try specifying the encoding explicitly. FILE_ANSI or unicode
No. You're not in place, you're together.
No. You're not in place, you're together.
Can you please advise whether it is possible to call the MA indicator to the chart with a program to setthe colour of itsdrawing?
I don't know how to call the colour settings of the indicator...
Can you please advise whether it is possible to call the MA indicator to the chart with a program to setthe colour of itsdrawing?
I don't know how to call it, but I don't know how to set its colour ...
You can, but you have to make a change in the custom indicator: add a colour to the input parameter
That's ok - thought maybe there's an easier way ... Thanks!
I think the developers could have added some more parameters for the handle ....
I didn't even see a colour change in the structures ...
like this
I see - I thought there might be an easier way... Thanks!
I think the developers could have added a few more parameters for the handle ....
I didn't even see a colour change in the structures ...
like this
Then it's like this:
Then it's like this:
I don't mind - it's a noramalek too ...