This isn’t as simpler calculation as it might seem.
If you brought 10 shares of Global Mega Corp for $100.66 then sold the same 10 shares for $150.66 then it’s a simple calculation.
($150.66 x 10) - ($100.66 x 10) - FX fee / Stamp Duty = Profit
But … if you buy shares every months for 6 months at different prices but then only some you’d have to account for FIFO (first in first out) selling the first brought shares first.
It would look more like this
($117.55 x 30) - (($100.66 x 10), ($101.55 x 5), ($113.13 x 11), ($104.69 x 4)) - FX fee / stamp duty = profit + your remaining shares.
In short you need to build a spread sheet or use one of the many portfolio trackers as currently this feature wouldn’t fit tidily into the app.