Type : Indicator, Name : RegEMA
inputs:
EMA_Length( 9 ),
Lambda( 9 ) ;
variables:
RegEMA( 0 ),
Alpha( 2 / ( EMA_Length + 1 ) ) ;
if CurrentBar > 3 then
RegEMA = (RegEMA[1]*(1+2*Lambda) + Alpha * (C-RegEMA[1]) — Lambda * RegEMA[2])/(1+lambda)
else
RegEMA = Close ;
Plot1( RegEMA, «RegEMA») ;
Type : Indicator, Name : RegMomentum
inputs:
EMA_Length( 9 ),
Lambda( 9 ) ;
variables:
RegEMA( 0 ),
Alpha( 2 / ( EMA_Length + 1 ) ) ;
if CurrentBar > 3 then
RegEMA = (RegEMA[1]*(1+2*Lambda) + Alpha * (C-RegEMA[1]) — Lambda * RegEMA[2])/(1+lambda)
else
RegEMA = Close ;
Plot1( (RegEMA — RegEMA[1]) / RegEMA, «RegMom») ;
Plot2( 0 ) ;