Not sure if this is listed on the Breaking Code Changes, but for those who are trying to convert a strategy that calculates the PnL this may be useful
On Ninja 7 we used this to calculate the PnL
// Calculate the PnL for the last completed real-time trade
double lastProfit = lastTrade.ProfitCurrency * lastTrade.Quantity;
But on Ninja 8 we must avoid to multiply by Quantity ;
double lastProfitCurrency = lastTrade.ProfitCurrency;
// Pring the PnL to the NinjaScript Output window
Print("The last trade's profit in currency is " + lastProfitCurrency);
This is documented on both Ninja Help Guides :
N7 : http://ninjatrader.com/support/helpG...profitcurrency
N8 : http://ninjatrader.com/support/helpG...profitcurrency
Comment