Nse stock historical volatility afl

Hi friends
i am new to amibroker community forum i need you experts help for preparing afl for historical volatility as per NSE calculations for all stocks
NSE Calculates historical volatility as follows

1:- Close price
2:- Yesterdays close price
3:- Underlying Log Returns (C) = LN(1/2)
LN(todays close(1)/Yesterdays Close(2) {excel comand}
4:- Previous Day Daily Volatility ( i want Afl which calculates )
5:- Current Day Daily Volatility
Sqrt(0.94Previous Day Daily VolatilityPrevious Day Daily Volatility +
0.06Current Day Daily VolatilityCurrent Day Daily Volatility)
{ sqrt(0.94 * 4 * 4 + 0.06 * 3 * 3 }
6:- Annualised Volatility = Current Day Daily Volatility * Sqrt( 365 )

please friends i want afl for above mention calculations

hope positive reply

If you can produce it Excel, using the same logic you can definitely produce it using AFL. Please share what you have tried so far.

thanks its done by my friend