LongTrades

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > SystemPerformance >

LongTrades

Previous page Return to chapter overview Next page

Definition

LongTrades is a TradeCollection object of long trades generated by a strategy.

 

Syntax

SystemPerformance.LongTrades

 

Examples

ns

protected override void OnBarUpdate()
{
    // Print out the number of long trades
    Print("The strategy has taken " + SystemPerformance.LongTrades.Count + " long trades.");
}