Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 111
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 don't understand how, I corrected the names, the line is still red regardless of the order type, just called differently. (then I have to find a way to cut it to 10 bars), I need exactly the way
try it now.
It's a good thing there's a sourcebook hanging around)
When you press the compile button the bot dies along with the terminal, and after opening EX it doesn't open and this file is empty.
It looks like this.
Also looked, if you put blue, green, gold, white, these colours change, but darkgray and azure does not put, it turns out white.
It's a good thing there's a sourcebook hanging around)
When you press the compile button the bot dies along with the terminal, and after opening EX it doesn't open and this file is empty.
It looks like this.
Also looked, if I put blue, green, gold, white, these colours change, but darkgray and azure does not put, it turns out white.
string string_value, // строка
int start_pos, // с какой позиции начать
int length=0 // длина извлекаемой строки
);
Thank you!
I also need help - I need to find out how many characters are in a string - how do I do that?
I use StringSplit to split a string read from a file. But the array output loses strings, all except first string. On output all except first string are empty, though array size is correct.
Also, I've encountered incomprehensible behavior with arrays of strings. I have to make two-dimensional arrays to save strings into an array.
Has anyone encountered this behavior?
if( StringFind( fileBuffer[idx][0], "[Main]" ) >= 0 ) {
idx++;
Print( "Buffer(main) = " + fileBuffer[idx][0] ); // debug
if( StringFind( fileBuffer[idx][0], "Kit_Names=" ) >= 0 ) {
Print( "check1 - " + fileBuffer[idx][0] ); // debug
string tmp = StringSubstr( fileBuffer[idx][0], 10 );
Print( tmp ); // debug
StringReplace( tmp, "\"", "" );
Print( tmp ); // debug
Print( StringSplit( tmp, sep, list ) );
Print( "check22 - " + tmp ); // debug
for(int i = 0; i < ArrayRange(list,0); i++) Print(list[i][0]); // debug
}
}
idx++;
}
Thank you!
Also need help - need to find out how many characters are in a string - how do I do that?
Returns the number of characters in the string.
string string_value // строка
);
Returns the number of characters in a string.
string string_value // строка
);
I declare an array at global EA level. Then in special function init() I call user function that fills the array with string constants.
Then in special function start(), I use the array only to read data.
Some time later, other data will fill the array. I.e., when I run the EA, I expect the array to remain unchanged while the EA is working, but the data somehow gets into the array, and only after some time (more than 10 minutes). When I restart the Expert Advisor, the array will be filled as it should be, but some time later, for reasons I don't understand, the array will again contain wrong values.
The only way out is to constantly reload the array in the start(), but I don't really like it, because the array should actually be filled only during the initialization.
What could be the problem? How to protect the array from modifications?
Can you give me a hint, please?
...
What could it be? How to keep an array from being modified?
A word of advice, please.
I declare an array at global EA level. Then in special function init() I call user function that fills the array with string constants.
Then in special function start(), I use the array only to read data.
Some time later, other data will fill the array. I.e., when I run the EA, I expect the array to remain unchanged while the EA is working, but the data somehow gets into the array, and only after some time (more than 10 minutes). When I restart the Expert Advisor, the array will be filled as it should be, but some time later, for reasons I don't understand, the array will again contain the wrong values.
The only way out is to constantly reload the array in the start(), but I don't really like it, because the array should actually be filled only during the initialization.
What could be the problem? How to protect the array from modifications?