This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community
double moving average of RSIBack to topics list |
|
mat79b8
2005.02.19 00:06
Hi,
I need some help to code the double moving average of RSI(14). I would like to know if it's the right way to do?
|
|
Slawa
2005.02.21 11:45
we recommend use another loop expression like in our samples
int start()
{
int i,limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i=0; i<limit; i++)
RSI_Buffer[i]=iRSI(NULL,0,14,PRICE_CLOSE,i);
for(i=0; i<limit; i++)
tmp[i]=iMAOnArray(RSI_Buffer,Bars,14,0,MODE_EMA,i);
for(i=0; i<limit; i++)
RSI_Double[i]=iMAOnArray(tmp,Bars,14,0,MODE_EMA,i);
return(0);
}
|
|
mat79b8
2005.02.22 17:58
thanks Slawa.
regards, Mat |
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets
