==== Notes ==== * This function can only be used in signals.* Use [[AvgBarsLosTrade]] and [[AvgBarsEvenTrade]] to get the average number of bars a position was held during respectively losing trades and even trades.
==== Example ====<syntaxhighlight>AvgBarsWinTrade will </syntaxhighlight>Will return a value of 3.5 if four winning trades held positions for 2, 5, 3, and 4 bars</syntaxhighlight> .