|
Let's say we want to calculate the MA of RSI ,we need to define an Array(here it will be the RSI of last 14 periods on price_close) ,then we can use the function iMAOnArray() to calculate the moving average of the array ...
double rsi_buffer[300];
int i,limit=ArraySize(rsi_buffer);
ArraySetAsSeries(macd_buffer,true);
for(i=0; i<limit; i++)
rsi_buffer[i]=iRSI(NULL,0,14,PRICE_CLOSE,i);
double maofrsi=iMAOnArray(rsi_buffer,0,5,0,MODE_SMA,0);
Last edited by mobdeep386; 07-22-2007 at 09:34 PM.
|