I'm trying to determine what the PnL was of the last trade in a strategy. Problem is, I'm running the strategy for multiple instruments, so right now the "last trade" PnL may be for a different instrument, not the one I'm using the calculation for.
So for example, if the strategy is running for ES and GC, I want to check what the PnL was for the last GC trade, even if the actual last trade was for ES. Is there a way to do this?
Currently I'm using the following code to check the last trade but don't know how to identify which instrument it was for. Appreciate any help.
Trade lastTrade = SystemPerformance.RealTimeTrades[SystemPerformance.RealTimeTrades.Count - 1];
Comment