Your comments

How can I update avg price when I buy or sell part of a position.