LongestFlatPeriod

<< Click to Display Table of Contents >>

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

LongestFlatPeriod

Previous page Return to chapter overview Next page

Definition

Returns the longest duration of being flat.
 

Property Value

A TimeSpan value that represents the longest duration of being flat.

 

Syntax
<TradeCollection>.TradesPerformance.LongestFlatPeriod

 

 

 

Examples

ns


protected override void OnBarUpdate()
{
    // Print out the longest duration of being flat
    Print("Longest flat period: " + SystemPerformance.AllTrades.TradesPerformance.LongestFlatPeriod);
}