Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 421
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
Hi. How do I find out the price of the object closest to the current price by the part of the name, at the beginning of "R"
The objects are horizontal bars (OBJ_TREND) with names "R 11", "R 7"...
... does not show anything like that.
.
Hello. How do you find an object by the part of the name that starts with "R"?
it doesn't find it that way.
.
The help says:
StringFind
Search for a substring in a string.
intStringFind(
stringstring_value, // string we are looking for
stringmatch_substring, //searched
intstart_pos=0// which position to start search
);
Parameters
string_value
[in] String to search in.
match_substring
[in] Match_substring to be searched.
start_pos=0
[in] Position in the string where the search should be started.
Returned value
Returns position number in the string where the substring to be searched starts, or -1 if no substring is found.
The reference reads:
Thank you, but what line are we looking in?
Thank you, but in which line are we looking?
Object name.
. there is nothing.
What, and in what case does StringFind() return? I gave a full footnote of the function from the help (although the help is right at your fingertips in the MetaEditor - just put the cursor on the function and press F1).
Help is open, I don't understand which line to look in, nothing is known yet except that there is an "R" in the name.
Like this.
There you go.
Thank you.
Greetings. Help is getting a volume return error:
I have an array created. Bid, date and volume..:
Marks: Invalid Array access