IB TWS platform by default applies the FIFO rule and cannot be changed, it is only possible to change in the statements for fiscal purposes. For traders pyramiding positions is an issue, because they are forced to sell the former and the accountability of unrealized P&L is affected. At IB there is a poll suggesting to add the LIFO feature. https://www.interactivebrokers.com/en/index.php?f=2493&sid=10604