Back to MCP catalog
builder_compose

Combine two or more existing condition cards into one logical card (AND/OR/NOT/sequence).

Area

Strategy Builder

Group

Authoring

Access

Write

Risk

May change server state

Details

Full description

Combine multiple existing condition cards into one logical card. Call after creating two or more conditions with builder_add_condition when you need AND / OR / NOT logic, an N-of-M counter, a consecutive-bar requirement, or an ordered sequence. Returns a new card_id you can pass to builder_attach or compose further.

Modes

  • allOf — all children true on the same bar (AND)
  • anyOf — at least one child true (OR)
  • not — invert a single child
  • at_least — N-of-M children true (requires min_true)
  • consecutive — child true for min_true bars within window_bars
  • sequence — ordered steps (requires a steps payload)

Parameter aliases: mode/combinator and condition_ids/card_ids are interchangeable — pass exactly one of each pair.

builder_compose(strategy_id, mode="allOf", condition_ids=[rsi_card_id, ema_card_id])

Operates on

Builder objects this tool reads or produces, linked to their reference pages.

Capabilities

Bounded options and operating modes surfaced above the full JSON schema.

Composition modes

mode

allOfanyOfnotat_leastconsecutivesequence

Required Inputs

strategy_idstringStrategy ID

Optional Inputs

card_idsanyOf (2 variants)Alias for `condition_ids`. Pass one of `condition_ids` or `card_ids`.
combinatoranyOf (2 variants)Alias for `mode`. Pass one of `mode` or `combinator`.
condition_idsanyOf (2 variants)Card IDs to compose. Alias: `card_ids`.
min_trueanyOf (2 variants)Required for consecutive (min bars true) and at_least (min conditions true). Ignored otherwise.
modeanyOf (2 variants)Combinator: allOf (AND), anyOf (OR), not, at_least (N-of-M), consecutive (N bars), sequence (ordered steps). Alias: `combinator`.
sequence_idanyOf (2 variants)sequence: optional explicit id for the SequenceCondition. Required when any SequenceStepSignalRef targets this sequence. Must be unique within the strategy.
stepsanyOf (2 variants)sequence: ordered step dicts [{"condition_id": "<card_id>", "within_bars": <int|null>, "hold_bars": <int|null>, "id": "<step_id|null>"}]. Step `id` is required when the step's matched bar will be referenced via a SequenceStepSignalRef (e.g. a retest stop). This MCP builder surface does not accept raw SequenceStep StateOp fields such as `on_enter` or `on_bar`; those remain raw-IR-only until a dedicated state operation builder API exists.
strictbooleanconsecutive: if true bars must be consecutive, if false any N-of-M in window
window_barsanyOf (2 variants)Required for consecutive: rolling window size in bars. Ignored otherwise.
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.