Have you read about enum in the editors reference - it helps:
... After the enumeration is declared, a new integer-valued 4-byte data type appears. ...
Just place the cursors above enum and press F1.
You created the type Tipo_MM as a subset of ENUM_MA_METHOD using the ENUM_MA_METHOD constants. This is fine, although I don't know why you want to reject/disallow the other methods.
But iMA expects a ENUM_MA_METHOD, thus your error. So cast it back to the superset or drop your type and use the ENUM_MA_METHOD as the type of your variable.
iMA(NULL, PERIOD_CURRENT, 3, 0, (ENUM_MA_METHOD) Tipo_MediaMobile, PRICE_CLOSE, 0)
You created the type Tipo_MM as a subset of ENUM_MA_METHOD using the ENUM_MA_METHOD constants. This is fine, although I don't know why you want to reject/disallow the other methods.
But iMA expects a ENUM_MA_METHOD, thus your error. So cast it back to the superset or drop your type and use the ENUM_MA_METHOD as the type of your variable.
Greetings, Massimo.
input ENUM_MA_METHOD MA_Method = 0; // MA Method
input ENUM_APPLIED_PRICE MA_Price = 0; // MA Price
iMA(NULL,PERIOD_CURRENT,MA_Period,0,MA_Method,MA_Price)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello guys, I have this problem I can not solve. I wrote this code:
Then I insert "Tipo_MediaMobile" in this code:
but it gives me this warning:
"improper enumerator cannot be used "
You can help me solve this problem? Thank you all, Max