==== Notes ==== * This function can only be used in signals. * Use [[TotalBarsEvenTrades]] and [[TotalBarsWinTrades]] to get the total number of bars a position was held during respectively even and winning trades.
==== Example ====<syntaxhighlight>TotalBarsLosTrades will </syntaxhighlight>* Will return a value of 14 if four losing trades held positions for 2, 5, 3, and 4 bars . TotalBarsLosTrades will * Will return a value of 0 if no losing trades were completed during the entiretrading period</syntaxhighlight> .