Hi All!
I want to test my system in trial MultiCharts 5.5 and I need help.
It's curious
, it's difficult for me to chage standart RSI to RSI_EMA like in TOS or OEC.
I'm change Average to XAverage in RSI code but it's no effect. Maybe someone help me with code or give me a rule where I can find RSI_EMA in EasyLanguage?
In MetaStock its was simple, because formula look like in many trading books.

This is a code RSI function from MultiCharts
---------------------------------------------------
inputs:
PriceValue( numericseries ),
Len( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 1 / Len ),
var4( 0 ) ;
if CurrentBar = 1 then
begin
var0 = ( PriceValue - PriceValue[Len] ) / Len ;
var1 = Average( AbsValue( PriceValue - PriceValue[1] ), Len ) ;
end
else
begin
var2 = PriceValue - PriceValue[1] ;
var0 = var0[1] + var3 * ( var2 - var0[1] ) ;
var1 = var1[1] + var3 * ( AbsValue( var2 ) - var1[1] ) ;
end ;
if var1 <> 0 then
var4 = var0 / var1
else
var4 = 0 ;
RSI = 50 * ( var4 + 1 ) ;
--------------------------------------------------
Thanks a lot!
dmitriy
I want to test my system in trial MultiCharts 5.5 and I need help.
It's curious
I'm change Average to XAverage in RSI code but it's no effect. Maybe someone help me with code or give me a rule where I can find RSI_EMA in EasyLanguage?
In MetaStock its was simple, because formula look like in many trading books.

This is a code RSI function from MultiCharts
---------------------------------------------------
inputs:
PriceValue( numericseries ),
Len( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 1 / Len ),
var4( 0 ) ;
if CurrentBar = 1 then
begin
var0 = ( PriceValue - PriceValue[Len] ) / Len ;
var1 = Average( AbsValue( PriceValue - PriceValue[1] ), Len ) ;
end
else
begin
var2 = PriceValue - PriceValue[1] ;
var0 = var0[1] + var3 * ( var2 - var0[1] ) ;
var1 = var1[1] + var3 * ( AbsValue( var2 ) - var1[1] ) ;
end ;
if var1 <> 0 then
var4 = var0 / var1
else
var4 = 0 ;
RSI = 50 * ( var4 + 1 ) ;
--------------------------------------------------
Thanks a lot!
dmitriy
