hello with all,
I would need a help I would wish to know if it is possible to put a new indicator in punt forms esignal. Here the formula, this formula comes from Tradestation. this indicator is called Kauffman MA thank you of your assistance and to give me the indicator has to establish.
I thank you all by advance
PS : I am french
{ Kaufman's Adaptive Moving Average }
inputs:
Price( numericseries ),
EffRatioLength( numericsimple ),
FastAvgLength( numericsimple ), { this input assumed to be a constant >= 1 }
SlowAvgLength( numericsimple ) ; { this input assumed to be a constant >= 1 }
{ Eff = Efficiency }
variables:
NetChg( 0 ),
TotChg( 0 ),
EffRatio( 0 ),
ScaledSFSqr( 0 ),
SlowAvgSF( 2 / ( SlowAvgLength + 1 ) ),
FastAvgSF( 2 / ( FastAvgLength + 1 ) ),
SFDiff( FastAvgSF - SlowAvgSF ) ;
{ Eff = Efficiency, SF = Smoothing Factor }
if CurrentBar = 1 then
AdaptiveMovAvg = Price
else
begin
NetChg = AbsValue( Price - Price[ EffRatioLength ] ) ;
TotChg = Summation( AbsValue( Price - Price[1] ), EffRatioLength ) ;
if TotChg > 0 then
EffRatio = NetChg / TotChg
else
EffRatio = 0 ;
{ note that EffRatio is somewhat similar to RSI }
ScaledSFSqr = Square( SlowAvgSF + EffRatio * SFDiff ) ;
AdaptiveMovAvg = AdaptiveMovAvg[1] + ScaledSFSqr * ( Price - AdaptiveMovAvg[1] ) ;
end ;
I would need a help I would wish to know if it is possible to put a new indicator in punt forms esignal. Here the formula, this formula comes from Tradestation. this indicator is called Kauffman MA thank you of your assistance and to give me the indicator has to establish.
I thank you all by advance
PS : I am french
{ Kaufman's Adaptive Moving Average }
inputs:
Price( numericseries ),
EffRatioLength( numericsimple ),
FastAvgLength( numericsimple ), { this input assumed to be a constant >= 1 }
SlowAvgLength( numericsimple ) ; { this input assumed to be a constant >= 1 }
{ Eff = Efficiency }
variables:
NetChg( 0 ),
TotChg( 0 ),
EffRatio( 0 ),
ScaledSFSqr( 0 ),
SlowAvgSF( 2 / ( SlowAvgLength + 1 ) ),
FastAvgSF( 2 / ( FastAvgLength + 1 ) ),
SFDiff( FastAvgSF - SlowAvgSF ) ;
{ Eff = Efficiency, SF = Smoothing Factor }
if CurrentBar = 1 then
AdaptiveMovAvg = Price
else
begin
NetChg = AbsValue( Price - Price[ EffRatioLength ] ) ;
TotChg = Summation( AbsValue( Price - Price[1] ), EffRatioLength ) ;
if TotChg > 0 then
EffRatio = NetChg / TotChg
else
EffRatio = 0 ;
{ note that EffRatio is somewhat similar to RSI }
ScaledSFSqr = Square( SlowAvgSF + EffRatio * SFDiff ) ;
AdaptiveMovAvg = AdaptiveMovAvg[1] + ScaledSFSqr * ( Price - AdaptiveMovAvg[1] ) ;
end ;
Comment