NinjaScript > Language Reference > Strategy >

TradesPerformanceValues

Print this Topic Previous pageReturn to chapter overviewNext page

Definition

Performance values of a collection of Trade objects.

 

Currency and Point based calculations are per trade
Percent based calculations are per traded unit

 

Methods and Properties

AvgEtd

A double value representing avg end trade draw down

AvgMae

A double value representing avg maximum adverse excursion

AvgMfe

A double value representing avg maximum favorable excursion

AvgProfit

A double value representing avg profit

CumProfit

A double value representing cumulative profit (percent is compounded)

DrawDown

A double value representing draw down

LargestLoser

A double value representing largest loss

LargestWinner

A double value representing largest gain

ProfitPerMonth

A double value representing profit per month always as a percent

StdDev

A double value representing standard deviation on a per unit basis

 

 

Examples

protected override void OnBarUpdate()
{
    // If the profit on real-time trades is > $1000 stop trading
    if (Performance.RealtimeTrades.TradesPerformance.Currency.CumProfit > 1000)
         return;
}