Apply to: previous indicators data

To add comments, please log in or register
Mdali Nkosi
54
Mdali Nkosi  

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.

Marco vd Heijden
Moderator
8167
Marco vd Heijden  
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
STOP LOSS CHANGE EXPERT FUNCTION ON ALL TRADES (EXCEPT HEDGE TRADES)? On all open positions, before hedging , , excluding hedging trades from this EA, change stop loss to 50 on all open positions, pending stop loss level if 50 ;if 0 no change , if 50 change to 50 stop loss change happens on any position with stop >50 condition for stop loss...
cowmodee
64
cowmodee  
Mdali Nkosi:

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);

To add comments, please log in or register