Can any one help me with Amibroker AFL code to plot Real Time advances & declines on chart

I am new to amibroker. I want to plot real time advances and declines of NSE on Amibroker.
Can any one help me with this AFL code?