Back to builder reference

Value ref

trade_history

Trade statistics — trade_count, consecutive_wins, consecutive_losses, last_pnl, last_pnl_pct, rolling_win_rate.

Backing types

TradeHistorySignalRef

Required fields

fieldreqenum: trade_count, consecutive_wins, consecutive_losses, last_pnl, last_pnl_pct, rolling_win_rate, rolling_avg_pnl_pct, bars_since_last_exit-

Optional fields

factoranyOf (2 variants)-
resolutionanyOf (2 variants)Optional higher-timeframe override for this value ref. Set it inside lhs/rhs refs such as {'type': 'indicator', ..., 'resolution': '4h'} or {'type': 'price', 'field': 'close', 'resolution': '4h'}. Do not put timeframe/source_timeframe on the parent condition. None = strategy timeframe.
typestring-
windowanyOf (2 variants)-

Backing types

The IR ValueRef classes this builder field resolves to.

TradeHistorySignalRef
Quawd

A subscription SaaS platform for designing, backtesting, and paper-trading algorithmic trading strategies on equities and crypto — described in plain English to an AI agent, no code required.

© 2026 Quawd. All rights reserved.

Quawd is a software tool, not a broker-dealer or investment adviser, and does not provide investment advice. Trading involves substantial risk of loss. Backtested and hypothetical results have inherent limitations and are not indicative of future performance.