NinjaScript > Language Reference > Strategy > TradeCollection > TradesPerformance >

MaxConsecWinner

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Returns the maximum number of consecutive winners seen.
 

Property Value

An int value that represents the maximum number of consecutive winners seen.

 

Syntax
<TradeCollection>.TradesPerformance.MaxConsecWinner

 

 

Examples

protected override void OnBarUpdate()
{
    // Print out the max consecutive winners of all trades

    Print("Average # bars per trade is: " + Performance.AllTrades.TradesPerformance.MaxConsecWinner);
}