Help with AFL

#1
Hello all,

I need some help to convert these two lines in Pine script to Ami AFL .

b := close > alpha*close+(1-alpha)*nz(b[1],close) ? close : alpha*close+(1-alpha)*nz(b[1],close)
c := close < alpha*close+(1-alpha)*nz(c[1],close) ? close : alpha*close+(1-alpha)*nz(c[1],close)

Can someone please help?

Thanks a lot!
 
#2
b = IIf(Close > alpha*Close+(1-alpha)*nz(b[1],Close) , Close , alpha*Close+(1-alpha)*nz(b[1],Close))​
c = IIf(Close < alpha*Close+(1-alpha)*nz(c[1],Close) , Close , alpha*Close+(1-alpha)*nz(c[1],Close))​