Wishes for MT5 - page 100

 
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.
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Идентификаторы типов данных
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Идентификаторы типов данных
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Идентификаторы типов данных - Документация по MQL5
 
By the way, the indicator can be a purchased indicator, without source code, with a custom enum, there is no way to know the numerical values.
 
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.

// Even if I could, it's very racially wrong. ;)

 
Integer:
By the way, the indicator may be purchased, without sources, with custom enum, there is no way to find out the numerical values.
Demand documentation from the developer of the indicator. And do not buy stolen goods.
 
Got the gist of the ideology :)
 
Integer:
By the way, the indicator can be purchased, without sources, with custom enum, there is no way to find out numerical values.
You can find out the enum values through IndicatorParametrs().
 
Yurich:
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).

:)

 
MetaDriver:

Err... I'm afraid that type description along with a list of all possible ENUM values (names) will not be returned by this function.

:)

It won't, but the names are known, and the values can be easily returned by trying .... manually :)
 
Integer:
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. :)

Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
  • www.mql5.com
Основы языка / Типы данных / Целые типы / Перечисления - Документация по MQL5