MaxConsecutiveWinner

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > TradeCollection > TradesPerformance >

MaxConsecutiveWinner

Previous page Return to chapter overview Next 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.MaxConsecutiveWinner

 

 

 

Examples

ns


protected override void OnBarUpdate()
{
    // Print out the max consecutive winners of all trades
    Print("Max # of consecutive winners is: " + SystemPerformance.AllTrades.TradesPerformance.MaxConsecutiveWinner);
}