AllTrades

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > SystemPerformance >

AllTrades

Previous page Return to chapter overview Next page

Definition

A TradeCollection object of all trades generated by a strategy.

 

Syntax

SystemPerformance.AllTrades

 

Examples

ns


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