EMA smoothed RSI in MultiChart

Discussion in 'Technical Analysis' started by dddforum, Dec 7, 2009.

  1. dddforum

    dddforum

    Hi All!

    I want to test my system in trial MultiCharts 5.5 and I need help.

    It's curious :confused:, 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
     
  2. dddforum

    dddforum

    Hi All!
    I Built RSI EMA indicator, that close to OEC, but not 100%. Something wrong in code.

    ----------

    inputs: PriceValue(NumericSeries),Len(NumericSimple);
    variables: AU( 0 ), AD( 0 );


    AU = XAverage( IFF( PriceValue > PriceValue[1], PriceValue - PriceValue[1], 0 ), Len ) ;

    AD = XAverage( IFF( PriceValue[1] > PriceValue, PriceValue[1] - PriceValue, 0 ), Len ) ;

    RSI_EMA = 100-(100/(1+AU/AD));
    -------------
     
  3. dddforum

    dddforum

    Well dan!

    It's not new indicator iisue, it's OEC datafeed issue yesterday. CME orOEC not working half of hour and last bar before bug has different value in OEC chart and MultiCharts chart FROM the same OEC datafeed :D