
- www.mql5.com
Good day fellas
Can someone kindly assist me in coding a RSI(10) with a [SMA(10), Apply To: Previous Indicators Data...] Like so:
(iRSI(NULL,0,10,PRICE_CLOSE,0)>iMA(NULL,0,10,0,MODE_SMA,.......,0) The blank part I want it to be Applied To: Previous Indicators Data.
Your assistance will be highly appreciated.
are you asking for something like this?
int moving_average_period=10; double rsi[]; ArraySetAsSeries(rsi,true); int h_rsi=iRSI(_Symbol,_Period,moving_average_period,PRICE_CLOSE); CopyBuffer(h_rsi,0,0,4,rsi); double sma_with_rsi[]; ArraySetAsSeries(sma_with_rsi,true); int h_sma_with_rsi=iMA(_Symbol,_Period,moving_average_period,0,MODE_SMA,iRSI(_Symbol,_Period,moving_average_period,PRICE_CLOSE)); CopyBuffer(h_rsi,0,0,4,sma_with_rsi);
cowmodee:
are you asking for something like this?
Thanks for your suggest!
It is easy.
// for example: Create a handle to some indicator, I will use Triple Exponencial here as an example: int iTEMA_handle = INVALID_HANDLE; // Load the indicator.. put some values.. price etc.. iTEMA_handle = iTEMA(NULL,PERIOD_CURRENT,18,0,PRICE_WEIGHTED); // Now lets create another indicator..(iAMA for example) and make it work on the Previous indicator data: int iAMA_handle = INVALID_HANDLE; iAMA_handle = iAMA(NULL, PERIOD_CURRENT,44,2,65,0, iTEMA_handle); //Notice that, instead of passing a PRICE as last argument of iAMA indicator, I passed the iTEMA handle! // That is it.. // iAMA indicator will be applied over the result of the previous indicator data..
Notice that, instead of passing a PRICE as last argument of iAMA indicator, I passed the iTEMA handle (which is the handle of the previous indicator) as a source of PRICE. (last argument)
That is it..
iAMA indicator will be applied over the result of the previous indicator data..
I hope this is what you have asked for :)
: Sometimes I understand and reply what was not the real purpose of the OP question... because of lack of attention (defict of attention which I have at a very high level.. sorry.) please correct me if I did such mistake.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good day fellas
Can someone kindly assist me in coding a RSI(10) with a [SMA(10), Apply To: Previous Indicators Data...] Like so:
(iRSI(NULL,0,10,PRICE_CLOSE,0)>iMA(NULL,0,10,0,MODE_SMA,.......,0) The blank part I want it to be Applied To: Previous Indicators Data.
Your assistance will be highly appreciated.