I'm trying to calculate a moving average over momentum indicator but EA crash at the boot of the back test because of the buffer I think ... someone has a better idea how to solve this ... I'm trying to calculate the moving average in the wrong way i think...
//--- Get MOMENTUM and MA_Momentumdouble momentum_val = iMomentum(NULL,0,10,PRICE_WEIGHTED,0);
double momentum_array[];
for(int i = 13; i >= 0; i--)
{
momentum_array[i] = iMomentum(NULL,0,10,PRICE_WEIGHTED,i);
}
double ma_moment_val = iMAOnArray(momentum_array,0,14,0,MODE_SMA,0);
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.
Hi guys,
I'm trying to calculate a moving average over momentum indicator but EA crash at the boot of the back test because of the buffer I think ... someone has a better idea how to solve this ... I'm trying to calculate the moving average in the wrong way i think...
tx a lot