Can you give me an example (or at least a key line), because I can't think of anything? Is it also going to be a huge list of values with sifting through the left-hand values, or is there only a useful one? At the moment I don't think there's anything to sift from, there are no left-handed ones in the list... but I can't get hold of the idea.
To avoid going through all possible enum values (because it's really long) the following preparations should be made#18771(something like caching). Then with the help of this function#18763 you can easily translate string/rows to enum knowing ranges of all needed enums. Or one can search for enum in a comparatively small range#18768.
template<typename T>
bool StringToEnum(conststring i_str, T &o_val, int i_min_enum, int i_max_enum)
{
for(int i = i_min_enum; i <= i_max_enum && !IsStopped(); i++) {
o_val = (T)i;
if(i_str == EnumToString(o_val))
return(true);
}
o_val = WRONG_VALUE;
return(false);
}
template<typename T>
bool StringToEnum(conststring i_str, T &o_val) { return StringToEnum(i_str, o_val, INT_MIN, INT_MAX); } // медленный вариант
How did you determine that it wasn't starting, how can you tell?
P.S.
Try it like this
The second expert in OnInit section makes conclusions in log and there are no log messages. The log does not even contain a message from the terminal about the start of the Expert Advisor. And the name of the Expert Advisor does not appear on the chart in the upper right corner.
12345678902003 #: And what function is used for this purpose? MqlRates? And if I use ObjectGet, I should specify the object property there; if I take OBJPROP_PRICE, how should I make it fetch the price to the current bar.
Get is Get. And there is a function to get price or time on a bar from an object by name or by type of object and name get a certain property of the object. Not the bar number but the offset from zero is used.
Get is Get. And there is a function to get price or time on a bar from an object by name or by type of object and name get a certain property of the object. Not the bar number, but the offset from zero is used.
This can be done using the ObjectGetValueByTime() function.
Example
double p = ObjectGetValueByTime( 0,"имя объекта...",Time[0]);
I have the following problem - the Terminal\MQL4\Indicators folder has indicators in its indicator list, but the terminal MQL4 itself does not have these indicators in its list from which these indicators are dragged onto the chart. How to make these indicators appear in the terminal list, so that they can be used in the chart of the MQL4 terminal ? In the screenshot on the right side are those indicators that are available in the MQL4terminaland on the left side are indicators of the same terminal in theMQL4 4\Indicators folder(as an example)
Halina Okopna-Pecuch #: I have the following problem - the list of indicators in the folder Terminal\MQL4\Indicators contains indicators, but in the terminal MQL4 in its list from which these indicators are dragged on the chart, they are not. How to make these indicators appear in the terminal list, so that they can be used in the chart of the MQL4 terminal ?In the screenshot on the right side are those indicators that are available in the MQL4terminaland on the left side are indicators of the same terminal in theMQL4 4\Indicators folder(as an example )
Halina Okopna-Pecuch #: The problem is as follows - the Terminal\MQL4\Indicators folder has indicators in the indicators list, but the terminal MQL4 itself does not have these indicators in its list from which these indicators are dragged onto a chart. How to make these indicators appear in the terminal list, so that they can be used in the chart of the MQL4 terminal ?In the screenshot on the right side are those indicators that are available in the MQL4terminaland on the left side are indicators of the same terminal in theMQL4 4\Indicators folder(as an example )
Try dropping these files into the Experts and Scripts folders and see what appears in their respective folders in the terminal.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can you give me an example (or at least a key line), because I can't think of anything? Is it also going to be a huge list of values with sifting through the left-hand values, or is there only a useful one? At the moment I don't think there's anything to sift from, there are no left-handed ones in the list... but I can't get hold of the idea.
To avoid going through all possible enum values (because it's really long) the following preparations should be made#18771(something like caching). Then with the help of this function#18763 you can easily translate string/rows to enum knowing ranges of all needed enums. Or one can search for enum in a comparatively small range#18768.
How did you determine that it wasn't starting, how can you tell?
P.S.
Try it like this
The second expert in OnInit section makes conclusions in log and there are no log messages. The log does not even contain a message from the terminal about the start of the Expert Advisor. And the name of the Expert Advisor does not appear on the chart in the upper right corner.
And what function is used for this purpose? MqlRates? And if I use ObjectGet, I should specify the object property there; if I take OBJPROP_PRICE, how should I make it fetch the price to the current bar.
Get is Get. And there is a function to get price or time on a bar from an object by name or by type of object and name get a certain property of the object. Not the bar number but the offset from zero is used.
Get is Get. And there is a function to get price or time on a bar from an object by name or by type of object and name get a certain property of the object. Not the bar number, but the offset from zero is used.
This can be done using the ObjectGetValueByTime() function.
Example
I have the following problem - the list of indicators in the folder Terminal\MQL4\Indicators contains indicators, but in the terminal MQL4 in its list from which these indicators are dragged on the chart, they are not. How to make these indicators appear in the terminal list, so that they can be used in the chart of the MQL4 terminal ? In the screenshot on the right side are those indicators that are available in the MQL4 terminaland on the left side are indicators of the same terminal in theMQL4 4\Indicators folder (as an example )
These are probably not indicators.
The problem is as follows - the Terminal\MQL4\Indicators folder has indicators in the indicators list, but the terminal MQL4 itself does not have these indicators in its list from which these indicators are dragged onto a chart. How to make these indicators appear in the terminal list, so that they can be used in the chart of the MQL4 terminal ? In the screenshot on the right side are those indicators that are available in the MQL4 terminaland on the left side are indicators of the same terminal in theMQL4 4\Indicators folder (as an example )
Try dropping these files into the Experts and Scripts folders and see what appears in their respective folders in the terminal.
They are probably not indicators
They are indicators because they are displayed on other terminals and not on this one in particular, although they are in fact there
Try dropping these files into the Experts and Scripts folders and see what appears in their respective folders in the terminal.
Everything is unchanged. No indicators on the terminal
Everything is unchanged. No indicators on the terminal
This folder (data directory), of this terminal?
Try restarting the terminal
or right click, navigator tab -- indicators , ---- refresh.