SortinoRatio

<< Click to Display Table of Contents >>

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

SortinoRatio

Previous page Return to chapter overview Next page

Definition

Returns the Sortino ratio using a risk free return.
 

Property Value

A double value that represents the Sortino ratio using a risk free return.

 

Syntax
<TradeCollection>.TradesPerformance.SortinoRatio

 

 

Examples

ns


protected override void OnBarUpdate()
{
    // Set a 0% risk free return
    SystemPerformance.AllTrades.TradesPerformance.RiskFreeReturn = 0;
 
    // Print out the Sortino ratio of all trades based on a zero risk free return
    Print("Sortino ratio is: " + SystemPerformance.AllTrades.TradesPerformance.SortinoRatio);
}