Here's another idea - to do away with the three types of programme: "advisor", "indicator", "script", and instead check the following boxes in the settings: "allow program to trade", "allow program to draw", "allow one-time run". And in this way, this universal programme will turn into an advisor, or indicator, or script.
Here's the rub. IndicatorCreate(), the indicator may have a parameter of enum type, it's clear that we should specify int type and numeric value, but some ENUM have such fantastic values... I wish MqlParam had the type - "EnumName", its value is a string with a variant name, or simply, if the variable is enum, specify TYPE_STRING type, and the value indicates the variant name.
Integer: Such a baffle. IndicatorCreate(), the indicator may have a parameter of enum type, it's clear that it's necessary to specify int type and numeric value, but some ENUM have such fantastic values... Here, in MqlParam would be a type - "EnumName", its value would be a string with the name of the variant, or simply, if the variable is enum, specify TYPE_STRING type, and the value would be the name of the variant.
Dima, this is impossible. The ENUM-variant name exists only before compilation. It is just like a variable name. Only the variable name in runtime corresponds to the address, while the enum-variant name corresponds to the int value.
In other words: if you don't map an ENUM value (or int, whatever) to a string yourself, the compiler won't do it for you automatically.
Dima. I've been doing some research... Why don't you write a complaint to Service Desk? You have all the grounds for it. The problem is purely practical, real, and - most importantly - solvable on the part of the developer.
Ideological basis: Indicator that has enum-type in the instants, obviously stores string names of enum values (for output in the options window). This gives some hope that Stringo will depart from the rules of "strict writing" and will do what you want, because the necessary meta-information (the possible enum values) in linked indicator already exists and you are not asking to add anything dangerous to the code.
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.
Such a baffle. IndicatorCreate(), the indicator may have a parameter of enum type, it's clear that it's necessary to specify int type and numeric value, but some ENUM have such fantastic values... Here, in MqlParam would be a type - "EnumName", its value would be a string with the name of the variant, or simply, if the variable is enum, specify TYPE_STRING type, and the value would be the name of the variant.
Dima, this is impossible. The ENUM-variant name exists only before compilation. It is just like a variable name. Only the variable name in runtime corresponds to the address, while the enum-variant name corresponds to the int value.
In other words: if you don't map an ENUM value (or int, whatever) to a string yourself, the compiler won't do it for you automatically.
// Even if I could, it's very racially wrong. ;)
By the way, the indicator may be purchased, without sources, with custom enum, there is no way to find out the numerical values.
By the way, the indicator can be purchased, without sources, with custom enum, there is no way to find out numerical values.
You can get enum values through IndicatorParametrs().
I'm afraid that this function will not return type description with a list of all possible ENUM values (names).
:)
Err... I'm afraid that type description along with a list of all possible ENUM values (names) will not be returned by this function.
:)
Got the gist of the ideology :)
Dima. I've been doing some research... Why don't you write a complaint to Service Desk? You have all the grounds for it. The problem is purely practical, real, and - most importantly - solvable on the part of the developer.
Ideological basis: Indicator that has enum-type in the instants, obviously stores string names of enum values (for output in the options window). This gives some hope that Stringo will depart from the rules of "strict writing" and will do what you want, because the necessary meta-information (the possible enum values) in linked indicator already exists and you are not asking to add anything dangerous to the code.
Well, try it.
// Don't forget to report about the results. :)