Ricky Ponting has announced he will retire from all forms of cricket after the Champions League in October.