I know with NT8 now, you can pull up your real account (not strategy) PnL using the Position.Account function. I'm having a hard time coding a really simple indicator that will show my PnL on the chart, not just Chart Trader.
Here's my code so far:
protected override void OnBarUpdate()
{
if (PositionAccount.MarketPosition != MarketPosition.Flat)
{
Print("Open PnL: " + PositionAccount.GetUnrealizedProfitLoss(Performanc eUnit.Points, Close[0]));
}
Pretty straight forward, but I'm getting the error "The name 'PositionAccount' does not exist in the current context. What am I missing here? Is this not applicable to an indicator? Thanks for your help in advance!
Comment