Back to builder reference

Value ref

binary_expr

Binary expression over two ValueRef operands.

left and right accept nested value references or finite numeric literals. Operators are +, -, *, /, min and max. Nest expressions to form spreads, ratios and scaled levels; apply unary_expr for transforms or rolling_stats for smoothing, then compare the result or use it for sizing. Symbol/resolution overrides belong on supporting leaf operands. Literal division by zero is refused. Readiness warns about known mismatches for +, -, min and max, naming the path and both dimensions. Numeric literals adopt the other dimension for +, -, min, max and comparisons. For * and /, either literal operand makes the dimension unknown; fully known operands derive dimensions (price / price is a ratio, currency / price is quantity, price * quantity is currency). Percent, ratio and oscillator scales stay distinct. Unknown dimensions never warn. Units stay advisory except a known sizing formula_unit contradiction. Consumer-specific admission still applies.

Backing types

BinaryExprValueRef

Required fields

leftreqanyOf (2 variants)-
opreqenum: +, -, *, /, max, min-
rightreqanyOf (2 variants)-

Optional fields

kindstring-

Backing types

The IR ValueRef classes this builder field resolves to.

BinaryExprValueRef
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.