NinjaScript > Language Reference > Strategy > TradeCollection > TradesPerformance >
ProfitFactor
Definition Returns the profit factor.
Property Value
A double value that represents the profit factor.
Syntax <TradeCollection>.TradesPerformance.ProfitFactor
Examples
protected override void OnBarUpdate() { // Print out the profit factor of all trades
Print("Average # bars per trade is: " + Performance.AllTrades.TradesPerformance.ProfitFactor); }