This tune (a 3/4 retreat, not a waltz, of course) is by Pipe Major John McLellan (1875-1949) of Dunoon, who composed some well known tunes including "The Road to the Isles". It commemorates the Highland Brigade’s part in the battle of Magersfontein during the second Boer War. They were on the losing side and suffered heavy casualties.
Although this is a pipe tune with British military connections, I learned it from the playing of Tom McDermott of Fairlie, Ayrshire during sessions in that part of the world. Tom plays English concertina and he paired this tune with another 3/4 retreat by PM McLellan, "Lochanside" (a tune that Andy "where’s yer troosers" Stewart used for the song "By the Lochside"). That tune is also in the database here: