This code (with double sma10 declaration added):
double rsi_buffer[10]; double sma10; int i,limit=ArraySize(rsi_buffer); ArraySetAsSeries(rsi_buffer,true); for(i=0; i<limit; i++) rsi_buffer[i]=iRSI(NULL,0,10,PRICE_CLOSE,i); sma10=iMAOnArray(rsi_buffer,0,10,0,MODE_SMA,0);
works perfectly ok. The fact that you get "0" as a result probably means, that
you don't have enough history data on a given symbol and period. Try to download
new data and check again. I can tell you for sure, that it's not a problem with code.
Adam Slucki:
This code (with double sma10 declaration added):
works perfectly ok. The fact that you get "0" as a result probably means, that
you don't have enough history data on a given symbol and period. Try to download
new data and check again. I can tell you for sure, that it's not a problem with code.
Hello again,
I've tried on real account, and it works perfect like you said.
Thank you Adam :)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I want to use sma that releated with previous indicator's data. Previous indicator is RSI.
I try like that:
And sma formula is;
But sma10 is return with "0.00000" value.
Any idea?