That idea only works with some of the standard (non-custom) indicators supplied with MetaTrader.
It does not work in code...
Applied price constants. It can be any of the following values:
Constant | Value | Description |
---|---|---|
PRICE_CLOSE | 0 | Close price. |
PRICE_OPEN | 1 | Open price. |
PRICE_HIGH | 2 | High price. |
PRICE_LOW | 3 | Low price. |
PRICE_MEDIAN | 4 | Median price, (high+low)/2. |
PRICE_TYPICAL | 5 | Typical price, (high+low+close)/3. |
PRICE_WEIGHTED | 6 | Weighted close price, (high+low+close+close)/4. |
No way??
To get an indicator's value in an EA, I know of three basic choices:
1. Use the Tecnical Indicator funtions. https://docs.mql4.com/indicators
2. Use iCustom to collect values from an installed custom indicator. https://docs.mql4.com/indicators/iCustom
3. Calculate the values you want in the EA.
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
I want to use FIRST INDICATOR'S DATA at one of the MA then I set 8 but don't works.
What can be wrong? Is not 8?
Thanks.