GrossProfit

<< Click to Display Table of Contents >>

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

GrossProfit

Previous page Return to chapter overview Next page

Definition

Returns the gross profit.
 

Property Value

A double value that represents the gross profit.

 

Syntax
<TradeCollection>.TradesPerformance.GrossProfit

 

 

 

Examples

ns


protected override void OnBarUpdate()
{
    // Print out the gross profit of all trades
    Print("Gross profit is: " + SystemPerformance.AllTrades.TradesPerformance.GrossProfit);
}