NinjaScript > Language Reference > Strategy > TradeCollection > TradesPerformance >

GrossProfit

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Returns the gross profit.
 

Property Value

A double value that represents the gross profit.

 

Syntax
<TradeCollection>.TradesPerformance.GrossProfit

 

 

Examples

protected override void OnBarUpdate()
{
    // Print out the gross profit of all trades

    Print("Average # bars per trade is: " + Performance.AllTrades.TradesPerformance.GrossProfit);
}