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