NinjaScript > Language Reference > Strategy > Performance >

AllTrades

Print this Topic Previous pageReturn to chapter overviewNext page

Definition

AllTrades is a TradeCollection object of all trades generated by a strategy.

 

Syntax

Performance.AllTrades

 

 

Examples

protected override void OnBarUpdate()
{
    // Print out the number of long trades

    Print("The strategy has taken " + Performance.AllTrades.Count + " trades.");
}