"Declaration without type" isn't using it. You are apparently trying to declare it. Post the code.
There are some 6 functions like this one:
double cdl_volume(MqlRates &r, ENUM_APPLIED_VOLUME _which=VOLUME_TICK) { if ( _which == VOLUME_TICK) return ( r.tick_volume ); else return ( r.real_volume ); }
the error appears only in these cases.
What's more,
if I type (anywhere) ENUM_APPLIED, the autocompletion feature recognizes ENUM_APPLIED_PRICE only
Shouldn't the autocompleter recognize the ENUM_APPLIED_VOLUME also?
- EAV is only meantioned on the Price Constants - MQL4 Documentation Since no functions use it it's probably not implemented in mt4. Is used in MT5.
- Try
enum ENUM_APPLIED_VOLUME { VOLUME_TICK, VOLUME_REAL }; double cdl_volume(const MqlRates& r, ENUM_APPLIED_VOLUME _which=VOLUME_TICK) { return _which == VOLUME_TICK ? r.tick_volume : r.real_volume; }
Thank you for point this solution out.
I thought about it myself, but I didn't know if VOLUME_TICK came first.
I will drop a message to service desk anyway
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 try to port an indicator from MT5 to MT4,
and this error is all over the place. for example:
'ENUM_APPLIED_VOLUME' - declaration without type utils_mql5.mqh 353 69
Apparently this type is not recognized, although I find it in mql4 docs
what can I do about it? Is this a bug? Am i doing something wrong?