Im having trouble with an error when compiling a strategy.
'NinjaTrader.NinjaScript.Strategies.Strategy.Posit ion()' is a 'method', which is not valid in the given context.
Ive simulated the error by copying from the help file.
protected override void OnBarUpdate()
{
//Add your custom strategy logic here.
// If not flat print our open PnL
if (Position.MarketPosition != MarketPosition.Flat)
Print("Open PnL: " + Position.GetUnrealizedProfitLoss(PerformanceUnit.P oints, Close[0]));
}
Comment