Navigation: Realtest Script Language > Syntax Element Details > TradeStatSum Category Trade Statistics Functions Description The sum of trade record values for the most recent N trades or for all trades Syntax TradeStatSum(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 TotalProfit: TradeStatSum(T.Profit) Total dollar profit of all closed trades. SymProfit: TradeStatSum(T.Profit, 0, Symbol) Total profit for the current symbol only. Count=0 means all trades. Copyright © 2020-2026 Systematic Solutions, LLC