Add entry and exit dates, and entry and exit prices to the database, and archive closed positions to a second link, and you're cooking looks good