How to calculate EMA from Volume in MQL5. In MQL4 it had iMAonArray() function, but in MQL5 I think it's absent.
I have to create a handle foriVolumes indicator. Then create an iMA indicator handle, but use iVolumes handle instead of price:
//--- create handle of the indicator handle_iVolumes=iVolumes(Symbol(),Period(),Inp_Volumes_applied_volume);
//--- if the handle is not createdif(handle_iVolumes==INVALID_HANDLE)
{
//--- tell about the failure and output the error codePrintFormat("Failed to create handle of the iVolumes indicator for the symbol %s/%s, error code %d",
Symbol(),
EnumToString(Period()),
GetLastError());
//--- the indicator is stopped earlyreturn(INIT_FAILED);
}//--- create handle of the indicator iMA
handle_iMA=iMA(Symbol(),Period(),Inp_MA_ma_period,Inp_MA_ma_shift,
Inp_MA_ma_method,handle_iVolumes);
//--- if the handle is not createdif(handle_iMA==INVALID_HANDLE)
{
//--- tell about the failure and output the error codePrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
Symbol(),
EnumToString(Period()),
GetLastError());
//--- the indicator is stopped earlyreturn(INIT_FAILED);
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please advise!
How to calculate EMA from Volume in MQL5. In MQL4 there was an iMAonArray() function, but in MQL5 I understand there is no such a function.
Please advise!
How to calculate EMA from Volume in MQL5. In MQL4 it had iMAonArray() function, but in MQL5 I think it's absent.
I have to create a handle foriVolumes indicator. Then create an iMA indicator handle, but use iVolumes handle instead of price:
Result:
We need to create a handle for the iVolumes indicator. Then create an iMA indicator handle, but substitute iVolumes handle instead of price:
Result:
Thank you, I will look into it)))).... learn
Thanks, I'll look into it)))).... learn
Just a note: THIS might not give out the correct data...
Just a note: THIS may not give out the correct data...
Why? What's it got to do with it? And if so, what other options are there?
Why? What does it have to do with?
I have no idea... Asked this question on the forum - no answer...
I have no idea... Asked this question on the forum - no answer...
What is the problem with the data? Visually it seems to be the same as Volume+MA indicator, I've scrolled through the history
I have no idea... Asked this question on the forum - no answer...
The only difference is long and double data type
The only difference is the data type long and double
Take a look at this. It may not be a general glitch, but it's also tense in a particular case...