I am trying to get the P&L from the TWS of IB.
See photo attached. I am trying to get the realized P&L when I am closing a trade (-629.04)
I can't seem to get it. Here is what I tried:
Print("Net profit is: " + SystemPerformance.RealTimeTrades.TradesPerformance .NetProfit);
Print("Total commission is: " + SystemPerformance.RealTimeTrades.TradesPerformance .TotalCommission);
NetProfit gives me a number of: -600
TotalCommision gives me a number of: 0
Thanks for helping.
Comment