double macd_buffer[300];
double signal_buffer[300];
int i,limit=ArraySize(macd_buffer);
ArraySetAsSeries(macd_buffer,true);
for(i=0; i<limit; i++)
macd_buffer[i]=iMA(NULL,0,12,0,MODE_EMA,PRICE_CLOSE,i)-iMA
(NULL,0,26,0,MODE_EMA,PRICE_CLOSE,i);
for(i=0; i<limit; i++)
signal_buffer[i]=iMAOnArray(macd_buffer,limit,9,0,MODE_SMA,i); |