Navigation: Realtest Script Language > Syntax Element Details > TradeStatAvg Category Trade Statistics Functions Description The average of trade record values for the most recent N trades or for all trades Syntax TradeStatAvg(value, count, symbol) Parameters value - trade value formula count - number of recent trades to include, or all trades if omitted symbol - specific symbol to include, or all symbols if omitted Notes See the link above for important information about this function category. Examples AvgProfit: TradeStatAvg(T.Profit) Average profit of all closed trades. RecentAvg: TradeStatAvg(T.NetPct, 10) Average return of the 10 most recent trades. Copyright © 2020-2026 Systematic Solutions, LLC