Tradescript needed for afl

hi i need this tradescript for this afl for buy and sell

//KAMA

LBPeriods = Param( “LB Periods”, 10, 1, 200, 1 );

FSCPeriods = Param( “FSC Periods”, 2, 1, 200, 1 );

SSCPeriods = Param( “SSC Periods”, 30, 1, 200, 1 );

FastSmoothConst = 2 / ( FSCPeriods + 1 );

SlowSmoothConst = 2 / ( SSCPeriods + 1 );

Direction = abs( Close - Ref( Close, -LBPeriods ) );

Volatility = Sum( abs( Close - Ref( Close, -1 ) ), LBPeriods );

EfficiencyRatio = Direction / Volatility;

SC = ( EfficiencyRatio * ( FastSmoothConst - SlowSmoothConst ) +

SlowSmoothConst ) ^ 2;

KAMA = AMA( Close, SC );

Plot( KAMA, “KAMA”, ParamColor( “Color”, colorYellow ), styleLine );

For ABS you can use

ABS(CLOSE - OPEN)

as above syntax FSC and LB can not be coded in tradescript. please describe your condition in brief