Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1595

 
Artyom Trishkin #:
See what number ends the value of constants of the ENUM_APPLIED_PRICE enumeration.
Hello, Artyom, I will look later, when I will be at my computer.

Regards, Vladimir.
 
MrBrooklin #:
Hello, Artyom! Later, when I will be at my computer, I will definitely look at it.

Regards, Vladimir.
And then look at what is passed to the functions of creating indicators as the calculation price. And compare them.
 
Artyom Trishkin #:
Look at the number at which the ENUM_APPLIED_PRICE enumeration constants end.

This is certainly very plausible, but it's important to know where this parameter is placed in the count. After all, ENUM_MA_METHOD also has integer values 0-3.

As far as I am concerned, it makes no difference what this word means. Descriptor, identifier or something else. If my memory is not completely dry, somewhere in the documentation I met "window descriptor" and somewhere "window handle".

Just like a mouse, we never really think about which mouse we are talking about.

 
MrBrooklin #:
And how would you briefly characterise the word handle?

as it is in translation - handle..as from a suitcase - the suitcase is taken by the handle, system (and not only) objects by handles. It's a well-established term.

handles represented in int or long can only be compared for equivalence and correctness.

(if two numeric representations are equal, we are talking about handles of one suitcase, if a handle has a special value, 0 or -1 as a tradition, it means "handle without suitcase").

 
Alexey Viktorov #:

This is certainly very plausible, but it plays an important role on which place this parameter stands. After all, ENUM_MA_METHOD also has integer values 0-3.

As far as I am concerned, it makes no difference what this word means. Descriptor, identifier or something else. If my memory is not completely dry, somewhere in the documentation I met "window descriptor" and somewhere "window handle".

Just like a mouse, we never really think about which mouse we are talking about.

The question was not "why is the handle so named", but why does it start with 10. That second question was my answer.
 

Alexei V. Stop making a habit of arguing.

don't make a habit of taking the reference


whatever you understand there is irrelevant.

 
Artyom Trishkin #:
The question was not "why is the handle so named", but why does it start with 10. That second question was my answer.

Artem, the first line of my answer is about why it starts with 10.

Forum on trading, automated trading systems and testing trading strategies.

Questions from MQL5 MT5 MetaTrader 5 beginners

Alexey Viktorov, 2025.09.26 13:56

This is certainly very plausible, but what place this parameter is on in the account plays an important role. After all, ENUM_MA_METHOD also has integer values 0-3.

 
Alexey Viktorov #:
It plays an important role on which place this parameter is placed. After all, ENUM_MA_METHOD also has integer values 0-3

Explain. I don't get it.

Pay attention to the last parameter: type of price for calculation, or indicator handle.

I.e. MA is calculated either on the data of the specified price or on the data of the indicator whose handle is passed to the function.

What difference does it make which place this parameter is placed in the function?

 
PRICE_CLOSE=1
PRICE_OPEN=2
PRICE_HIGH=3
PRICE_LOW=4
PRICE_MEDIAN=5
PRICE_TYPICAL=6
PRICE_WEIGHTED=7
I can't tell you why the minimum handle value doesn't start at 8. Maybe some other values will be added.....
 
Artyom Trishkin #:
I can't tell you why the minimum handle value doesn't start at 8. Maybe some other values will be added....

Good evening, Artem. I looked in the documentation of the enumeration of ENUM_APPIE_PRICE of the IMA handle. There are only seven identifiers, as you have in your previous message. Now I see. This is due to the fact that in place of the enumeration of the applied price there may be a handle of another indicator. Thank you! )

Regards, Vladimir.