Navigation: NinjaScript > Language Reference > Strategy >
protected override void OnBarUpdate()
{
// If the profit on real-time trades is > $1000 stop trading
if (SystemPerformance.RealtimeTrades.TradesPerformance.Currency.CumProfit > 1000)
return;
}
I use that example in coding but get an error.
However, if I replace RealtimeTrades with AllTrades... everything is OK.
SystemPerformance.AllTrades.TradesPerformance.Currency.CumProfit
So is the documentation wrong or the compiler?
And if I use the SystemPerformance.AllTrades.TradesPerformance.Currency.CumProfit
will this tally the total in the local strategy or across all my strategies?
Thank you
Comment