RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Details >

TradeStatMax

 

 

 

 

Category

Trade Statistics Functions

Description

The largest of trade record values for the most recent N trades or for all trades

Syntax

TradeStatMax(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

LongestTrade: TradeStatMax(T.Bars)

Duration of the longest closed trade.

BestReturn: TradeStatMax(T.NetPct, 20)

Best return among the 20 most recent trades.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC