I want to plot EMA with RSI parameters

src=(Close);
length = Param("RSI Length",14,1,100,1);
SSF=Param( "SF RSI SMoothing Factor",5,1,50,1);
RSII=ema(rsi(src,length),SSF);

But I try this type amibroker editor show error too many arguments help me.

length = Param( "RSI Length", 14, 1, 100, 1 );
SSF = Param( "SF RSI SMoothing Factor", 5, 1, 50, 1 );
RSII = ema( rsi( length ), SSF );
Plot( RSII, "RSII", colorDefault );

What src = (close); missing

Close is implicit in the RSI() formula.

https://www.amibroker.com/guide/afl/rsi.html

If you want to have possibility of using different array other than Close then you have to use RSIa() function

src=(Close);
length = Param("RSI Length",14,1,100,1);
SSF=Param( "SF RSI SMoothing Factor",5,1,50,1);
RSII=EMA(RSIa(src,length),SSF);

As written in manual here
https://www.amibroker.com/guide/afl/rsi.html

Second version RSIa accepts input array so it RSI can be applied to other arrays than close.


BTW, please use code tags when inserting codes to your post.
It is mandatory rule.

Thanks for your reply
Sir but I want to plot close arrya any other solution.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.