tr Atr
0 0.00276 0.00276
1 0.01455 NaN
2 0.00895 NaN
3 0.00816 NaN
4 0.00596 NaN
5 0.00816 NaN
6 0.00844 NaN
7 0.01150 NaN
8 0.00473 NaN
9 0.00502 NaN
Please how to do a apply this formula to each tr
Atr = (prev_Atr * (14 - 1) + tr) / 14
what i want to do is
df["Atr"] = lambda x, y: (x * (14 -1) + y)/14
but i dont know how to assign
x = prev_Atr & y = tr