AverageTimeInMarket

View as Markdown

Definition

Returns the average duration of a trade weighted by quantity.

Property Value

A TimeSpan value that represents the quantity-weighted average duration of a trade.

Syntax

TradesPerformance.AverageTimeInMarket

Examples

1protected override void OnBarUpdate()
2{
3 // Print out the quantity-weighted average duration of all trades
4 Print("Average time in market: " + SystemPerformance.AllTrades.TradesPerformance.AverageTimeInMarket);
5}