I am working on semi-automated strategy using unmanaged approach. Some trades for same account same instrument could be placed manually, some through strategy. I would like to calculate daily PNL which would be combination of trades made by strategy and manual trades (placed through either FXCM mobile app or through NT8 simple order window while strategy is running). I can see Account object and all Executions, I guess I need to get through each of the Execution objects and get cumulative PNL from all the execution objects. Any samples or guidelines to get Account Realised PNL for real-time trading?
I can get unrealized PNL by using
PositionAccount.GetUnrealizedProfitLoss(PerformanceUnit.Currency);
and it works fine for trades placed manually. But want to get Realized as well (same number that is shows in NT Accounts tab in column Realized PNL). Or is there a way to accomplish the same using FXCM APIs while running NinjaTrader 8 in parallel?
Thanks
Comment