as per the ato link above, simple investor gets to pick which shares are sold in each transaction (i.e. whichever gives the better outcome)
algo trading by a broker in the process of fulfilling an order for a client would be for the broker to deal with (if they even make a gain or loss and do not pass the cost / saving on)