Back to docs
Generated builder reference

Strategy Builder Reference

Every condition, value ref, enum, and spec you can compose into a Quawd strategy. Each object links to its detail page with fields and the exact JSON schema.

Conditions

60

Value refs

27

Enums

51

Specs

2

Conditions

60 conditions

Trend

5 conditions

Momentum

2 conditions

Volatility

3 conditions

Volume

2 conditions

Bands

4 conditions

Price signals

13 conditions
avwap_reversion
entryexit

Anchored VWAP mean reversion signal

breakout
entry

Price above N-bar high/low (level/state — true every bar; for edge-based use cross+swing)

breakout_retest
entry

Breakout followed by pullback retest

compare
entryexitgate

LEVEL comparison on continuous values: lhs op rhs, true every bar the relation holds. USE WHEN: gating on a sustained condition (e.g. close > SMA(200), RSI < 30 throughout the consolidation). DO NOT USE for one-shot edge events — use 'cross' to fire once on the crossing bar. DO NOT USE for membership in a discrete set — use 'in_set'. For named zones inspect builder_discover(action='get', ref='workflow:named_anchor_zone'); for anchor fields use value_ref:anchor.

cross
entryexit

EDGE event on continuous values: fires once on the bar where lhs crosses rhs (was below/above, now the other side). USE WHEN: price crosses a moving average, indicator crosses a level (e.g. RSI crosses 30), Stochastic K crosses D. DO NOT USE for discrete/categorical refs like supertrend.direction ({-1,+1}) — use 'transition' instead. DO NOT USE when you want every bar the relation holds — use 'compare' for level/state semantics. For named zones inspect builder_discover(action='get', ref='workflow:named_anchor_zone').

divergence
entryexit

Price/indicator divergence (RSI, MACD, Stochastic, CCI, OBV)

gap
entry

Gap from previous close

in_set
entrygate

LEVEL membership on discrete/categorical values: true every bar value ∈ members (or its negation). USE WHEN: gating on SuperTrend direction == +1, regime label in {bull, neutral}. DO NOT USE on continuous values — use 'compare' instead. Cleaner than anyOf(compare(value == m) ...). The discrete-valued counterpart to 'compare'.

intermarket
entry

Intermarket relationship signal

spread
entry

Spread between two instruments (ratio, difference, log_ratio, zscore)

trailing_breakout
entry

Trailing breakout pattern. Example band: {"band":"bollinger","length":20,"mult":2}

trailing_entry
entry

Trailing band breakout entry (enter on band breach with trailing reference)

transition
entryexit

EDGE event on discrete/categorical values: fires once on the bar where ref's value differs from the prior bar (optionally constrained to a (from, to) pair). USE WHEN: SuperTrend direction flips (-1 → +1), regime label changes, any small-set categorical ref changes value. DO NOT USE on continuous values like price or RSI — use 'cross' for those. The discrete-valued counterpart to 'cross'.

Price levels

6 conditions

Patterns

3 conditions

Temporal

2 conditions

Time & events

6 conditions

Risk management

5 conditions

Cross-sectional

4 conditions

Combinators

5 conditions

Value refs

27 value refs

Typed references that resolve to a number at evaluation time.

anchor

OHLC field of a captured anchor bar (builder_save_anchor) — anchor_id, anchor_field: open|high|low|close|mid. Requires prior builder_save_anchor call.

binary_expr

Binary expression over two SignalRef operands — op: +|-|*|/|max|min. Compiles to a binary IRExpression so you can build composite expressions like (high + low) / 2 or max(rsi, cci).

constant

constant value reference

dist_from_vwap

(close - VWAP) / VWAP * 100. No extra fields required.

entry_bar

OHLC of the signal bar of the currently open position — entry_bar_field: open|high|low|close|range|body_high|body_low. NaN when flat; cleared on position close.

equity

Running equity curve value.

event_field

Event payload field — event_type_id, event_field; use list_event_types().

gap_pct

Gap percentage from the previous bar's close — (open - prev_close) / prev_close * 100. Same formula the top-level gap_pct condition uses; exposed as a value_ref so gap can be combined with other indicators inside compare/cross. No extra fields required.

indicator

Indicator output — RSI, CCI, EMA/SMA, ATR, ADX, ROC (decimal: 0.05=5%), MACD/signal/histogram, stochastic_k/d, Bollinger bands, volume_sma, pivot levels. Use builder_discover(action='get', ref='value_ref:indicator') for the full field list.

live_position

Metric computed from the currently open position (live, not frozen) — field: entry_price | bars_in_position | unrealized_pnl_pct | unrealized_pnl_usd | max_excursion_pct | min_excursion_pct. NaN when flat.

named_zone

Boundary of a saved named zone (builder_save_zone) — zone_id, zone_field: upper|lower|mid. Requires prior builder_save_zone call.

percentile

Rolling percentile rank of a price field — field, lookback_bars.

prev_bar

OHLCV field of a prior bar — field, offset (default 1 = previous bar).

price

Price field — open, high, low, close. Use value_ref:volume for volume (VIB-1317).

rolling_max

Rolling max of a price field or arbitrary ValueRef source — set exactly one of `field` (open|high|low|close) or `source` (nested SignalRef, e.g. indicator). Also takes lookback_bars.

rolling_min

Rolling min of a price field or arbitrary ValueRef source — set exactly one of `field` (open|high|low|close) or `source` (nested SignalRef, e.g. indicator). Also takes lookback_bars.

rolling_stats

Rolling statistic over a nested SignalRef source — stat: mean|std|zscore|sum|count|rank|percentile. Required fields: source (nested SignalRef), lookback_bars. percentile also requires percentile_level (0-100).

sequence_step

OHLC of the bar that matched a named step inside a named SequenceCondition — sequence_id (id on the sequence), step_id (id on the step), step_field: open|high|low|close|range|body_high|body_low. Captured at step fire, preserved for the lifetime of the open position, cleared on position close. NaN before the step has fired or when flat.

session

Session value — session_field: high|low|open|close|prior_close|bars_into_session|range|mid|in_session (boolean 1.0/0.0, never NaN; use to gate around TimeRef NaN trap). Optional window_start (HH:MM) + window_duration_minutes for intraday sub-windows (e.g. opening range).

shared_signal

Portfolio-level shared signal by name (VIB-2102) — name references a Portfolio.shared_signals entry. Resolves only inside a multi-member portfolio; bound to a member-local metric at compile time. Illegal in a standalone strategy.

swing

Recent swing high/low — swing_type: high|low, strength (bars each side), offset (0=latest).

time

Current bar's time component — component: hour|minute|day_of_week (0=Mon)|day_of_month|month|minutes_since_midnight|minutes_to_close|minutes_since_open. Session-aware variants return NaN for crypto/outside-session (silent-False); use AllOf with session.in_session==1 to gate around it (avoid Not wrapping).

trade_history

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

triggering_zone

Boundary of the entry ZoneCondition's firing zone — level: upper|lower|mid. Use in standing-exit sl_price_ref. Requires a required ZoneCondition.

unary_expr

Unary expression over a SignalRef source — op: abs|neg|log|log10|sqrt|pct_change. Compiles to a unary IRExpression so you can build e.g. abs(close - open) or log(volume).

ValueRef

The union of all value references usable as a signal.

volume

Base-asset trading volume for the current or a prior bar — offset (default 0 = current, 1..500 = prior bars).

Enums

51 enums

Bounded option sets referenced by condition and value-ref fields.

Anchor

3 values: month_start, session_open, week_open

Anchor Field

6 values: close, high, low, mid, open, range

Band Edge

2 values: lower, upper

Breakout Direction

3 values: down, same, up

Calc Type

4 values: difference, log_ratio, ratio, zscore

Confirm

2 values: close_only, intrabar

Direction

3 values: bearish, both, bullish

Direction

2 values: downtrend, uptrend

Direction

3 values: both, high, low

Direction

2 values: long, short

Direction

2 values: above, below

Direction

3 values: exit, long, short

Divergence Type

2 values: bearish, bullish

Edge

3 values: lower, mid, upper

Entry Bar Field

7 values: body_high, body_low, close, high, low, open, range

enum_april_august_december_february_january_july_june_march_

12 values: april, august, december, february, january, july, june, march, may, november, october, september

enum_friday_monday_saturday_sunday_thursday_tuesday_wednesda

7 values: friday, monday, saturday, sunday, thursday, tuesday, wednesday

enum_previous_high_previous_low_recent_resistance_recent_sup

6 values: previous_high, previous_low, recent_resistance, recent_support, session_high, session_low

Event

3 values: cross_in, cross_out, touch

Every

5 values: 1d, 1m, 1w, 2w, 3m

Field

6 values: bars_in_position, entry_price, max_excursion_pct, min_excursion_pct, unrealized_pnl_pct, unrealized_pnl_usd

Field

8 values: day_of_month, day_of_week, hour, minute, minutes_since_midnight, minutes_since_open, minutes_to_close, month

Field

8 values: bars_since_last_exit, consecutive_losses, consecutive_wins, last_pnl, last_pnl_pct, rolling_avg_pnl_pct, rolling_win_rate, trade_count

Field

3 values: current, drawdown_pct, peak

Field

4 values: close, high, low, open

Fill

2 values: none, previous

Firing

2 values: cross, level

Indicator

2 values: ema_cross, price_vs_ma

Indicator Type

3 values: BB, DC, KC

Level Direction

2 values: down, up

Ma Type

2 values: ema, sma

Mode

2 values: outside, within

Mode

3 values: cross_in, cross_out, level

Mode

2 values: band_mult, z

Mode

2 values: gap_fade, gap_go

Op

4 values: <, <=, >, >=

Op

6 values: abs, log, log10, neg, pct_change, sqrt

Op

6 values: *, +, -, /, max, min

Op

4 values: inside, outside, outside_above, outside_below

Op

6 values: !=, <, <=, ==, >, >=

Op

7 values: !=, <, <=, ==, >, >=, between

Pattern

19 values: bearish_engulfing, bullish_engulfing, dark_cloud_cover, doji, dragonfly_doji, evening_star, gravestone_doji, hammer, harami, harami_cross, inside_bar, inverted_hammer, marubozu, morning_star, piercing_line, shooting_star, spinning_top, three_black_crows, three_white_soldiers

Select

4 values: any, most_recent, nearest, oldest

Session

3 values: asia, eu, us

Session Field

9 values: bars_into_session, close, high, in_session, low, mid, open, prior_close, range

Side

2 values: away_lower, away_upper

Stat

8 values: count, ema, mean, percentile, rank, std, sum, zscore

Swing Type

2 values: high, low

Trigger Op

4 values: above, below, crosses_above, crosses_below

Trigger Type

3 values: in_window, post_event, pre_event

Update Rule

2 values: max, min

Specs

2 specs

Reusable structured payloads shared across conditions.

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.