This cumbersome calculation for each bar is not required. As you need previous day's ATP, you can get the previous day's Total traded quantity(no. of shares for cash, no. of contracts for F&O) and total turnover from NSE Bhavcopy. Now divide the total turnover by total traded quantity. You get average price per share(for cash) or average price per contract (for F&O). In case of F&O further divide the ATP per contract by lot size. This gives you the ATP for F&O.
-Anant
-Anant
ATP is just available in NSE site .Why do the calculation.Todays ATP is 5418.29.Screen shot attached
This is such a simple Strategy!