Issue #23254:handle currencyExchangeSense and populate _gainLoss
Issue #23254:improve query
Merge pull request #418 from garyhgohoos/23254-2

Issue #23254:handle currencyExchangeSense and populate _gainLoss