Constants required in array
alyehoud:
Trying to make an array of 4 EMAs, but getting error that the defined values of the array must be constants. Is there a workaround?
double lines[4]; lines[0] = iMA(NULL,PERIOD_H4,365,0,MODE_EMA,PRICE_CLOSE,1); lines[1] = iMA(NULL,PERIOD_D1,365,0,MODE_EMA,PRICE_CLOSE,1); lines[2] = iMA(NULL,PERIOD_H4,150,0,MODE_EMA,PRICE_CLOSE,1); lines[3] = iMA(NULL,PERIOD_D1,150,0,MODE_EMA,PRICE_CLOSE,1);
angevoyageur:
Wow, thanks. I fail at arrays.
Trying to make an array of 4 EMAs, but getting error that the defined values of the array must be constants. Is there a workaround?