<!-- Generated by scripts/generate_language_docs.py. Do not edit directly. -->

# Authoring language

[Quick-start](language-quickstart.md) · [Collections](language-collections.md) · [Machine-readable specification](language-specification.json) · [Full signatures, defaults and bounds](language-reference.md)

```text
Quawd authoring language — JSON objects with a kind discriminator.
Signatures below are reference notation, not executable text syntax.
? means optional. kind/indicator discriminators are required for union selection.
Full detail adds defaults and bounds; specification/get supply exact constraints.
Fields not listed are refused on closed objects.
Rule is the saved attachment shape; operation inputs below describe authoring calls.
JSON Schema covers structural validation; parser/compiler admission remains authoritative.
Use get for exact detail; full owning-model lifecycle descriptions are in the specification.
Operation signatures are an index; tools/list supplies their local types and exact input schemas.

ROOTS (complete)
Condition = Condition
Rule = Rule
ValueRef = ValueRef
condition:all_of = AllOfCondition & Condition
condition:always_true = AlwaysTrueCondition & Condition
condition:any_of = AnyOfCondition & Condition
condition:at_least = AtLeastCondition & Condition
condition:at_session = AtSessionCondition & Condition
condition:at_time = AtTimeCondition & Condition
condition:breakout_retest = BreakoutRetestCondition & Condition
condition:calendar_schedule = CalendarScheduleCondition & Condition
condition:candle_pattern = CandlePatternCondition & Condition
condition:compare = CompareCondition & Condition
condition:condition_ref = ConditionReference & Condition
condition:consecutive = ConsecutiveCondition & Condition
condition:cross = CrossSignalCondition & Condition
condition:eod_flatten = EodFlattenCondition & Condition
condition:fixed_targets = FixedTargetsCondition & Condition
condition:flag_pattern = FlagPatternCondition & Condition
condition:fvg = FairValueGapCondition & Condition
condition:in_set = InSetCondition & Condition
condition:latch = LatchCondition & Condition
condition:liquidity_sweep = LiquiditySweepCondition & Condition
condition:not = NotCondition & Condition
condition:order_block = OrderBlockCondition & Condition
condition:ote = OTECondition & Condition
condition:pennant_pattern = PennantPatternCondition & Condition
condition:range = RangeCondition & Condition
condition:sequence = SequenceCondition & Condition
condition:spread = SpreadCondition & Condition
condition:trailing_stop = TrailingStopCondition & Condition
condition:transition = TransitionCondition & Condition
config:allocation = BasketAllocationAuthoring
config:collection_risk = CollectionRiskPolicy
config:construction_constraints = CollectionAuthoringConstraints
config:execution = ExecutionConfig
config:portfolio_allocation = PortfolioAllocationAuthoring
config:position_policy = PositionPolicyConfig
config:rebalance = NoRebalance | CalendarRebalance
config:risk = RiskPolicy
config:sizing = SizingConfig
construction:basket = EqualWeight | ManualWeights | BasketRankConstruction | SignalProportional_IndicatorValueRef_
construction:portfolio = EqualWeight | ManualWeights | PortfolioRankConstruction | TrailingReturnRotation | PortfolioMemberSignalConstruction
portfolio:create = PortfolioCreateAuthoring
portfolio:member = Member
portfolio:shared_signal = SharedSignal
portfolio:update = PortfolioUpdateAuthoring
resource:anchor = AnchorDefinition
resource:zone = ZoneDefinition
value_ref:anchor = AnchorValueRef & ValueRef
value_ref:binary_expr = BinaryExprValueRef & ValueRef
value_ref:constant = ConstantValueRef & ValueRef
value_ref:entry_bar = EntryBarValueRef & ValueRef
value_ref:equity = EquityValueRef & ValueRef
value_ref:event_distance = EventDistanceValueRef & ValueRef
value_ref:event_field = EventFieldValueRef & ValueRef
value_ref:indicator = IndicatorValueRef & ValueRef
value_ref:live_position = LivePositionValueRef & ValueRef
value_ref:named_zone = NamedZoneValueRef & ValueRef
value_ref:percentile = PercentileValueRef & ValueRef
value_ref:price = PriceValueRef & ValueRef
value_ref:rank = RankValueRef & ValueRef
value_ref:rolling_max = RollingMaxValueRef & ValueRef
value_ref:rolling_min = RollingMinValueRef & ValueRef
value_ref:rolling_stats = RollingStatsValueRef & ValueRef
value_ref:sequence_step = SequenceStepValueRef & ValueRef
value_ref:session = SessionValueRef & ValueRef
value_ref:shared_signal = SharedSignalValueRef & ValueRef
value_ref:sibling = SiblingValueRef & ValueRef
value_ref:swing = SwingValueRef & ValueRef
value_ref:time = TimeValueRef & ValueRef
value_ref:tracked = TrackedValueRef & ValueRef
value_ref:trade_history = TradeHistoryValueRef & ValueRef
value_ref:triggering_zone = TriggeringZoneValueRef & ValueRef
value_ref:unary_expr = UnaryExprValueRef & ValueRef
value_ref:volume = VolumeValueRef & ValueRef
value_ref:xs_dispersion = DispersionValueRef & ValueRef
value_ref:xs_zscore = ZScoreValueRef & ValueRef

NAMED DEFINITIONS (complete)
ADXIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'adx_di'; period?: integer; output?: 'adx' | 'plus_di' | 'minus_di')
AVWAPIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'avwap'; anchor?: 'session' | 'session_open' | 'week' | 'week_open' | 'month' | 'month_open' | 'month_start' | 'ytd' | 'custom'; anchor_datetime?: string | null; output?: 'value' | 'std_dev')
AdIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'ad')
AllOfCondition(kind: 'all_of'; conditions: list[Condition]; child_names?: list[string | null] | null)
AlwaysTrueCondition(kind: 'always_true')
AnchorDefinition(id: string; source: TimestampAnchorSource | BarIndexAnchorSource | ConditionTriggerAnchorSource)
AnchorPeriod = 'session' | 'week' | 'month'
AnchorPriceSpec(kind: 'anchor'; anchor_id: string; anchor_field: 'open' | 'high' | 'low' | 'close' | 'mid' | 'range')
AnchorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'anchor'; anchor_id: string; anchor_field: 'open' | 'high' | 'low' | 'close' | 'mid' | 'range')
AnyOfCondition(kind: 'any_of'; conditions: list[Condition]; child_names?: list[string | null] | null)
AroonIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'aroon'; period: integer; line: 'up' | 'down')
AtLeastCondition(kind: 'at_least'; conditions: list[Condition]; min_true: integer; child_names?: list[string | null] | null)
AtSessionCondition(kind: 'at_session'; anchor: 'open' | 'close'; offset_minutes: integer)
AtTimeCondition(kind: 'at_time'; time: string)
AtrOffsetSpec(kind: 'atr_offset'; atr_period?: integer; atr_multiplier: number)
BandOutput = 'upper' | 'middle' | 'lower'
BarIndexAnchorSource(kind: 'bar_index'; bar_index: integer)
BasketAllocationAuthoring(rebalance?: NoRebalance | CalendarRebalance | null; capital_model?: 'partitioned' | 'shared_pool'; constraints?: CollectionAuthoringConstraints | null; collection_risk?: CollectionRiskPolicy | null; construction: EqualWeight | ManualWeights | BasketRankConstruction | SignalProportional_IndicatorValueRef_)
BasketRankConstruction(kind: 'rank_based'; score_ref: IndicatorValueRef; top_n: integer; exit_top_n?: integer | null)
BinaryExprValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'binary_expr'; op: '+' | '-' | '*' | '/' | 'max' | 'min'; left: ValueRef | number; right: ValueRef | number)
BollingerValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'bollinger'; period?: integer; multiplier?: number; output: 'upper' | 'middle' | 'lower' | 'bandwidth' | 'stddev')
BreakoutRetestCondition(lookback_bars?: integer; pullback_depth_atr?: number; within_bars?: integer; direction: 'long' | 'short'; kind: 'breakout_retest')
CalendarRebalance(min_interval_bars?: integer; kind: 'calendar'; schedule: Rebalance)
CalendarScheduleCondition(every: '1d' | '1w' | '2w' | '1m' | '3m'; day?: Weekday | null; time?: string | null; tz?: string | null; holiday_policy?: 'next_session' | 'skip' | 'previous_session'; kind: 'calendar_schedule')
CandlePatternCondition(pattern: PatternName; max_body_frac?: number | null; min_body_frac?: number | null; min_wick_ratio?: number | null; max_opposite_wick_frac?: number | null; min_range_atr?: number | null; atr_period?: integer; kind: 'candle_pattern')
CandlestickValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'candlestick'; pattern: PatternName)
CollectionAuthoringConstraints(max_active_sleeves?: integer | null; max_position_pct?: number | null; min_position_pct?: number | null; asset_class_caps?: map[string, number] | null)
CollectionRiskPolicy(max_daily_loss_pct?: number | null; halt_behavior?: 'soft' | 'hard'; cooldown_bars?: integer; max_entries_per_day?: integer | null; max_total_entries?: integer | null; min_cash_pct?: number | null; day_basis?: 'utc_calendar')
CompareCondition(left: ValueRef; op: CompareOp; right: ValueRef | number; kind: 'compare')
CompareOp = '<' | '<=' | '>' | '>=' | '==' | '!='
Condition = LiquiditySweepCondition | FairValueGapCondition | OrderBlockCondition | OTECondition | FlagPatternCondition | PennantPatternCondition | BreakoutRetestCondition | CandlePatternCondition | EodFlattenCondition | AtTimeCondition | CrossSignalCondition | TransitionCondition | InSetCondition | RangeCondition | CompareCondition | SpreadCondition | FixedTargetsCondition | TrailingStopCondition | CalendarScheduleCondition | AlwaysTrueCondition | AllOfCondition | AnyOfCondition | NotCondition | AtLeastCondition | SequenceCondition | ConsecutiveCondition | ConditionReference | LatchCondition | AtSessionCondition
ConditionReference(kind: 'condition_ref'; definition_id: string)
ConditionSequenceStep(id?: string | null; condition: Condition; within_bars?: integer | null; hold_bars?: integer | null)
ConditionTriggerAnchorSource(kind: 'condition_trigger'; condition: Condition)
ConsecutiveCondition(kind: 'consecutive'; condition: Condition; min_true: integer; window_bars: integer; strict?: boolean; child_name?: string | null)
ConstantValueRef(kind: 'constant'; value: number)
CrossSignalCondition(left: ValueRef; right: ValueRef | number; direction: LevelDirection; kind: 'cross')
DispersionValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'xs_dispersion'; source: ValueRef | number; stat: 'stdev' | 'range')
DonchianValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'donchian'; period?: integer; output: BandOutput)
EntryBarField = 'open' | 'high' | 'low' | 'close' | 'range' | 'body_high' | 'body_low'
EntryBarValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'entry_bar'; entry_bar_field: EntryBarField)
EodFlattenCondition(kind: 'eod_flatten'; flatten_minutes_before_close?: integer)
EqualWeight(kind: 'equal_weight')
EquityValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'equity'; field: 'drawdown_pct' | 'current' | 'peak')
EventDistanceValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'event_distance'; event_type_id: string; direction: 'next' | 'previous'; unit?: 'minutes' | 'bars' | null)
EventFieldValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'event_field'; event_type_id: string; event_field: string; fill?: 'none' | 'previous'; max_age_seconds?: integer | null; occurrences_back?: integer)
ExecutionConfig(order_type?: 'market' | 'limit' | 'stop' | 'stop_limit'; limit_price?: number | PctOffsetSpec | AtrOffsetSpec | AnchorPriceSpec | ZonePriceSpec | TriggeringZonePriceSpec | NamedZoneValueRef | null; stop_price?: number | PctOffsetSpec | AtrOffsetSpec | AnchorPriceSpec | ZonePriceSpec | TriggeringZonePriceSpec | NamedZoneValueRef | null; time_in_force?: 'gtc' | 'day'; mode?: 'trade' | 'alert'; alert_cooldown_minutes?: integer | null)
FairValueGapCondition(kind: 'fvg'; direction?: PatternBias; min_gap_pct?: number; expires_after_bars?: integer | null; fill_frac?: number; resolution?: Timeframe | null; select?: ZoneSelection)
FixedTargetsCondition(take_profit_pct?: number | null; take_profit_tiers?: list[TpTierSpec]; take_profit_r_multiple?: number | null; stop_loss_pct?: number | null; stop_loss_price_ref?: ValueRef | null; stop_order_id?: string | null; time_stop_bars?: integer | null; breakeven_trigger_pct?: number | null; breakeven_buffer_pct?: number; kind: 'fixed_targets')
FlagPatternCondition(kind: 'flag_pattern'; momentum_bars: integer; consolidation_bars: integer; direction: 'up' | 'down' | 'same'; min_momentum_pct?: number)
GapIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'gap'; session?: 'us' | 'eu' | 'asia' | null)
HaltBehavior = 'soft' | 'hard'
InSetCondition(kind: 'in_set'; value: ValueRef; members: list[number]; negate?: boolean)
IndicatorValueRef = MovingAverageValueRef | PeriodIndicatorValueRef | MacdIndicatorValueRef | StochasticIndicatorValueRef | SrsiIndicatorValueRef | AdIndicatorValueRef | OBVIndicatorValueRef | AroonIndicatorValueRef | SupertrendIndicatorValueRef | BollingerValueRef | DonchianValueRef | KeltnerValueRef | VWAPBandsValueRef | VWAPIndicatorValueRef | AVWAPIndicatorValueRef | ADXIndicatorValueRef | PivotIndicatorValueRef | CandlestickValueRef | GapIndicatorValueRef
KeltnerValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'keltner'; period?: integer; multiplier?: number; atr_period?: integer | null; output: BandOutput)
LatchCondition(kind: 'latch'; arm: Condition; fire: Condition)
LevelDirection = 'above' | 'below'
LiquiditySweepCondition(kind: 'liquidity_sweep'; lookback_bars?: integer; within_bars?: integer; direction?: 'low' | 'high' | 'both')
LivePositionValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'live_position'; field: 'entry_price' | 'bars_in_position' | 'unrealized_pnl_pct' | 'unrealized_pnl_usd' | 'max_excursion_pct' | 'min_excursion_pct')
MacdIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'macd' | 'macd_signal' | 'macd_histogram'; fast_period: integer; slow_period: integer; signal_period: integer)
ManualWeights(kind: 'manual'; weights: map[string, number])
Member(strategy_id: string; revision_id?: string | null)
MovingAverageValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'ema' | 'sma' | 'wma' | 'vwma'; period: integer; offset?: integer)
NamedZoneValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'named_zone'; zone_id: string; zone_field: ZoneLevel)
NoRebalance(min_interval_bars?: integer; kind: 'none')
NotCondition(kind: 'not'; condition: Condition; child_name?: string | null)
OBVIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'obv')
OTECondition(kind: 'ote'; direction?: PatternBias; swing_strength?: integer; fib_upper?: number; fib_lower?: number; expires_after_bars?: integer | null; fill_frac?: number; select?: ZoneSelection)
OrderBlockCondition(kind: 'order_block'; direction?: PatternBias; expires_after_bars?: integer | null; fill_frac?: number; resolution?: Timeframe | null; select?: ZoneSelection; use_wicks?: boolean; min_body_frac?: number | null; min_displacement_atr?: number | null)
PatternBias = 'bullish' | 'bearish' | 'both'
PatternName = 'hammer' | 'inverted_hammer' | 'shooting_star' | 'doji' | 'dragonfly_doji' | 'gravestone_doji' | 'spinning_top' | 'marubozu' | 'bullish_engulfing' | 'bearish_engulfing' | 'harami' | 'harami_cross' | 'inside_bar' | 'morning_star' | 'evening_star' | 'piercing_line' | 'dark_cloud_cover' | 'three_white_soldiers' | 'three_black_crows'
PctOffsetSpec(kind: 'pct_offset'; pct: number)
PennantPatternCondition(kind: 'pennant_pattern'; momentum_bars: integer; consolidation_bars: integer; direction: 'up' | 'down' | 'same'; min_momentum_pct?: number)
PercentileValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'percentile'; field?: PriceField | null; source?: ValueRef | number | null; lookback_bars?: integer)
PeriodIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'rsi' | 'atr' | 'roc' | 'cci' | 'volume_sma' | 'mfi' | 'cmf' | 'std' | 'var' | 'median'; period: integer; offset?: integer)
PivotIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'pivot_p' | 'pivot_s1' | 'pivot_s2' | 'pivot_s3' | 'pivot_r1' | 'pivot_r2' | 'pivot_r3')
PortfolioAllocationAuthoring(rebalance?: NoRebalance | CalendarRebalance | null; capital_model?: 'partitioned' | 'shared_pool'; constraints?: CollectionAuthoringConstraints | null; collection_risk?: CollectionRiskPolicy | null; construction?: EqualWeight | ManualWeights | PortfolioRankConstruction | TrailingReturnRotation | PortfolioMemberSignalConstruction | null)
PortfolioCreateAuthoring(name: string; project_id: string; members: list[Member]; allocation?: PortfolioAllocationAuthoring | null; shared_signals?: list[SharedSignal])
PortfolioMemberSignalConstruction(kind: 'member_signal_rotation'; score_signal: string; top_n: integer)
PortfolioRankConstruction(kind: 'rank_based'; score_signal: string; top_n: integer; exit_top_n?: integer | null)
PortfolioUpdateAuthoring(name?: string | null; project_id?: string | null; members?: list[Member] | null; allocation?: PortfolioAllocationAuthoring | null; shared_signals?: list[SharedSignal] | null)
PositionMode = 'single' | 'accumulate' | 'scale_in' | 'reverse'
PositionPolicyConfig(mode?: PositionMode; max_positions?: integer | null; min_bars_between?: integer | null; scale_factor?: number | null; max_entries_per_day?: integer | null; max_total_entries?: integer | null)
PriceField = 'open' | 'high' | 'low' | 'close'
PriceValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'price'; field?: PriceField; offset?: integer)
RangeCondition(kind: 'range'; subject: ValueRef; low: ValueRef | number; high: ValueRef | number; low_inclusive: boolean; high_inclusive: boolean)
RankValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'rank'; source: ValueRef | number)
Rebalance = 'daily' | 'weekly' | 'monthly'
RiskPolicy(max_daily_loss_pct?: number | null; halt_behavior?: HaltBehavior; cooldown_bars?: integer; short_equity_floor_pct?: number | null)
RollingMaxValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'rolling_max'; field?: PriceField | null; source?: ValueRef | number | null; lookback_bars?: integer)
RollingMinValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'rolling_min'; field?: PriceField | null; source?: ValueRef | number | null; lookback_bars?: integer)
RollingStatsValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'rolling_stats'; source: ValueRef | number; lookback_bars: integer; stat: 'mean' | 'std' | 'zscore' | 'sum' | 'count' | 'rank' | 'percentile' | 'ema'; percentile_level?: number | null)
Rule(rule_id: string; definition_id: string; label?: string | null; role: 'entry' | 'exit' | 'gate'; enabled?: boolean; direction?: 'long' | 'short' | null; remainder_unprotected?: boolean | null; size_frac?: number | null)
SequenceCondition(kind: 'sequence'; id?: string | null; steps: list[ConditionSequenceStep])
SequenceStepValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'sequence_step'; sequence_id: string; step_id: string; step_field: EntryBarField)
SessionValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'session'; session_field: 'open' | 'high' | 'low' | 'close' | 'prior_close' | 'bars_into_session' | 'range' | 'mid' | 'in_session'; window_start?: string | null; window_duration_minutes?: integer | null; offset?: integer | null)
SharedSignal(name: string; source: IndicatorValueRef | PriceValueRef | VolumeValueRef)
SharedSignalValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'shared_signal'; name: string)
SiblingValueRef(symbol: string; resolution?: Timeframe | null; kind: 'sibling'; source: ValueRef | number)
SignalProportional_IndicatorValueRef_(kind: 'signal_proportional'; score_ref: IndicatorValueRef)
SizingConfig(mode?: SizingMode; allocation?: number; fixed_usd?: number | null; fixed_units?: number | null; risk_pct?: number | null; formula?: ValueRef | null; formula_unit?: 'usd' | 'units'; formula_fallback?: 'skip'; min_usd?: number | null; max_usd?: number | null; headroom_pct?: number | null)
SizingMode = 'pct_equity' | 'fixed_usd' | 'fixed_units' | 'fixed_risk_pct' | 'formula'
SpreadCondition(symbol_a: string; symbol_b: string; calc_type?: 'ratio' | 'difference' | 'log_ratio' | 'zscore'; window_bars?: integer; trigger_op?: 'above' | 'below' | 'crosses_above' | 'crosses_below'; threshold?: number; hedge_ratio?: number | null; kind: 'spread')
SrsiIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'srsi_k' | 'srsi_d'; period: integer; k_period?: integer; d_period?: integer)
StochasticIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'stochastic_k' | 'stochastic_d'; period?: integer; k_period?: integer; d_period?: integer)
SupertrendIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'supertrend'; period?: integer; multiplier?: number; output?: 'value' | 'direction')
SwingValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'swing'; swing_type: 'high' | 'low'; strength?: integer; offset?: integer; value_at_swing?: ValueRef | number | null)
TimeValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'time'; field: 'hour' | 'minute' | 'day_of_week' | 'day_of_month' | 'month' | 'minutes_since_midnight' | 'minutes_to_close' | 'minutes_since_open'; timezone?: string | null)
Timeframe = '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '1d'
TimestampAnchorSource(kind: 'timestamp'; timestamp: string)
TpTierSpec(pct: number; size_frac: number)
TrackedValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'tracked'; source: ValueRef | number; extreme: 'max' | 'min'; since?: 'start' | 'entry' | null)
TradeHistoryValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'trade_history'; field: 'trade_count' | 'consecutive_wins' | 'consecutive_losses' | 'last_pnl' | 'last_pnl_pct' | 'rolling_win_rate' | 'rolling_avg_pnl_pct' | 'bars_since_last_exit'; lookback_bars?: integer | null)
TrailingReturnRotation(top_n: integer; kind: 'trailing_return'; lookback_bars: integer; metric?: 'return')
TrailingStopCondition(atr_period?: integer | null; atr_multiplier?: number | null; trailing_pct?: number | null; activation_pct?: number | null; kind: 'trailing_stop')
TransitionCondition(kind: 'transition'; source: ValueRef; from_value?: number | null; to_value?: number | null)
TriggeringZonePriceSpec(kind: 'triggering_zone'; level?: 'upper' | 'lower' | 'mid')
TriggeringZoneValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'triggering_zone'; level?: ZoneLevel)
UnaryExprValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'unary_expr'; op: 'abs' | 'neg' | 'log' | 'log10' | 'sqrt' | 'pct_change'; source: ValueRef | number)
VWAPBandOutput = 'upper' | 'middle' | 'lower' | 'std_dev'
VWAPBandsValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'vwap_bands'; anchor?: AnchorPeriod; multiplier?: number; output: VWAPBandOutput)
VWAPIndicatorValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'indicator'; indicator: 'vwap'; anchor?: AnchorPeriod)
ValueRef = PriceValueRef | IndicatorValueRef | ConstantValueRef | AnchorValueRef | NamedZoneValueRef | TriggeringZoneValueRef | SwingValueRef | PercentileValueRef | RollingMaxValueRef | RollingMinValueRef | VolumeValueRef | EventFieldValueRef | TradeHistoryValueRef | EquityValueRef | LivePositionValueRef | SessionValueRef | TimeValueRef | EntryBarValueRef | SequenceStepValueRef | RollingStatsValueRef | UnaryExprValueRef | BinaryExprValueRef | SharedSignalValueRef | EventDistanceValueRef | RankValueRef | ZScoreValueRef | DispersionValueRef | SiblingValueRef | TrackedValueRef
VolumeValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'volume'; offset?: integer)
Weekday = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'
ZScoreValueRef(symbol?: string | null; resolution?: Timeframe | null; kind: 'xs_zscore'; source: ValueRef | number)
ZoneDefinition(id: string; upper: number | ConstantValueRef | AnchorValueRef; lower: number | ConstantValueRef | AnchorValueRef)
ZoneLevel = 'upper' | 'lower' | 'mid'
ZonePriceSpec(kind: 'zone'; zone_type?: 'fvg' | 'order_block' | 'ote' | null; direction?: 'bullish' | 'bearish' | null; select?: 'nearest' | 'most_recent' | 'oldest'; level?: 'upper' | 'lower' | 'mid')
ZoneSelection = 'nearest' | 'most_recent' | 'oldest' | 'any'

CONDITION CLASSES AND ADMISSION
condition:all_of: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:always_true: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:any_of: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:at_least: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:at_session: schedule; state=none; nested=conditional; Schedule admission permits an entry/exit root or an all_of-only path; other nesting and signal scans are refused. Session requirements still apply.
condition:at_time: schedule; state=none; nested=conditional; Schedule admission permits an entry/exit root or an all_of-only path; other nesting and signal scans are refused. Session requirements still apply.
condition:breakout_retest: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:calendar_schedule: schedule; state=none; nested=conditional; Schedule admission permits an entry/exit root or an all_of-only path; other nesting and signal scans are refused. Session requirements still apply.
condition:candle_pattern: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:compare: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:condition_ref: reference; state=none; nested=conditional; Placement is checked after binding the referenced owned source.
condition:consecutive: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:cross: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:eod_flatten: exit_policy; state=none; nested=forbidden; Pass directly to add_rule(role='exit'). eod_flatten (flat before the close) cannot sit inside 'any_of': eod_flatten is a policy on the position (a resting order or a flat window), not a true/false condition, so 'any_of' would have no effect on it and the policy would apply unconditionally. Attach the policy definition directly as its own exit rule, and attach the conditional exit as a separate exit rule.
condition:fixed_targets: exit_policy; state=live_position; nested=conditional; With only time_stop_bars, this is a predicate and may be composed. With stop-loss or take-profit orders, it is a protective policy: attach it directly in an exit rule, outside combinators.
condition:flag_pattern: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:fvg: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:in_set: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:latch: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:liquidity_sweep: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:not: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:order_block: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:ote: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:pennant_pattern: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:range: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:sequence: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:spread: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
condition:trailing_stop: exit_policy; state=live_position; nested=forbidden; Pass directly to add_rule(role='exit'). trailing_stop cannot sit inside 'any_of': trailing_stop is a policy on the position (a resting order or a flat window), not a true/false condition, so 'any_of' would have no effect on it and the policy would apply unconditionally. Attach the policy definition directly as its own exit rule, and attach the conditional exit as a separate exit rule.
condition:transition: predicate; state=none; nested=allowed; Predicate/combinator source may be nested; child and context admission still applies.
Protective exit policies belong directly in exit rules, not under Boolean combinators. fixed_targets with only time_stop_bars is a predicate and may be combined.
Clock schedules retain current role/nesting admission; there is no separate rule schedule slot.
Position-scoped operands need a position context; a signal scan does not provide one.
Basket instruments share one strategy definition; portfolios combine member strategies. Allocation uses construction.kind and rebalance.kind. Manual weights belong only in construction. Portfolio updates use a patch: omitted fields preserve, allocation null clears, shared_signals [] clears. Construction-managed rotation refuses member entry/gate/exit/protective logic. Member rotation retains member logic but may trim and top up holdings. Member rotations require partitioned capital; cash reserves are refused on rotations. Portfolio walk-forward has no parameter optimization. Published structure does not replace mode-specific allocation admission or compiled-member plan checks.
Execution price and allocation score positions have narrower schemas than ValueRef.

VALUE UNITS AND CONTEXT
value_ref:anchor: anchor_field=open | anchor_field=high | anchor_field=low | anchor_field=close | anchor_field=mid: price; anchor_field=range: price (high - low of the captured bar: a price difference); contexts=condition,execution; state=anchor
value_ref:binary_expr: op=+ | op=- | op=max | op=min: same_as_source (the operands are expected to share a unit; mixing units is legal and unchecked); op=* | op=/: not_determined (unknown: the unit derives from both operands and the operator; unit inference through expressions is tracked as later work); contexts=condition,sizing; state=none
value_ref:constant: *: same_as_source (a literal: write it in the unit of the operand it is compared with or combined with); contexts=condition,sizing; state=none
value_ref:entry_bar: *: price (range is a price difference); contexts=condition; state=entry_bar
value_ref:equity: field=current: currency_amount; field=peak: currency_amount (running high-water mark); field=drawdown_pct: percent {'min': 0.0} (0 at a new high; positive while underwater); contexts=condition; state=strategy_equity
value_ref:event_distance: unit=minutes: minutes {'min': 0.0} (infinity when no such occurrence is known (not absent)); unit=bars: bar_count {'min': 0.0} (infinity when no such occurrence is known (not absent)); contexts=condition; state=event_data
value_ref:event_field: *: payload_declared (the unit is whatever the event type's payload publishes for this field); contexts=condition; state=event_data
value_ref:indicator: indicator=ema | indicator=sma | indicator=wma | indicator=vwma | indicator=median | indicator=bollinger,output=upper | indicator=bollinger,output=middle | indicator=bollinger,output=lower | indicator=keltner,output=upper | indicator=keltner,output=middle | indicator=keltner,output=lower | indicator=vwap_bands,output=upper | indicator=vwap_bands,output=middle | indicator=vwap_bands,output=lower | indicator=vwap | indicator=avwap,output=value: price; indicator=rsi | indicator=mfi | indicator=stochastic_k | indicator=stochastic_d | indicator=aroon,line=up | indicator=aroon,line=down | indicator=adx_di,output=adx | indicator=adx_di,output=plus_di | indicator=adx_di,output=minus_di: bounded_oscillator {'min': 0.0, 'max': 100.0}; indicator=atr: price (Wilder-smoothed average true range); indicator=roc: ratio (0.05 is a 5% move; a threshold of 5 means 500%); indicator=cci: dimensionless (unbounded; not a percent); indicator=volume_sma: volume; indicator=cmf: ratio {'min': -1.0, 'max': 1.0}; indicator=std: price (population standard deviation of the close); indicator=var: price_squared (population variance of the close); indicator=macd | indicator=macd_signal | indicator=macd_histogram: price (a difference of exponential averages, in price units); indicator=srsi_k | indicator=srsi_d: bounded_oscillator {'min': 0.0, 'max': 100.0} (0-100, not 0-1); indicator=ad: volume (cumulative from the first loaded bar; the absolute level is arbitrary); indicator=obv: volume (cumulative signed volume; the absolute level is arbitrary); indicator=supertrend,output=value: price (the active band; jumps across price when the trend flips); indicator=supertrend,output=direction: enum_code {'min': -1.0, 'max': 1.0} (+1 uptrend, -1 downtrend); indicator=bollinger,output=bandwidth: percent {'min': 0.0} ((upper - lower) / middle * 100, so 5 means 5% of the middle band); indicator=bollinger,output=stddev: price (population standard deviation); indicator=donchian,output=upper | indicator=donchian,output=middle | indicator=donchian,output=lower: price (excludes the current bar); indicator=vwap_bands,output=std_dev: price {'min': 0.0} (volume-weighted standard deviation of typical price around the VWAP; not scaled by multiplier); indicator=avwap,output=std_dev: price (volume-weighted standard deviation around the anchored VWAP); indicator=pivot_p | indicator=pivot_s1 | indicator=pivot_s2 | indicator=pivot_s3 | indicator=pivot_r1 | indicator=pivot_r2 | indicator=pivot_r3: price (constant for the UTC day; rolls at the UTC day, not the session); indicator=candlestick: enum_code {'min': -1.0, 'max': 1.0} (-1 bearish hit, 0 no hit, +1 bullish hit); indicator=gap: percent (2 means a 2% gap; present only on the session's opening bar, absent elsewhere); contexts=condition; state=none
value_ref:live_position: field=entry_price: price (first lot only); field=bars_in_position: bar_count (includes the fill bar; counted from the first lot); field=unrealized_pnl_pct: percent (first lot only); field=unrealized_pnl_usd: currency_amount (all lots; quote currency despite the _usd suffix); field=max_excursion_pct: percent {'min': 0.0} (best unrealized PnL since entry; first lot only); field=min_excursion_pct: percent {'max': 0.0} (worst unrealized PnL since entry; first lot only); contexts=condition; state=live_position
value_ref:named_zone: zone_field=upper | zone_field=lower | zone_field=mid: price; contexts=condition,execution; state=named_zone
value_ref:percentile: *: bounded_oscillator {'min': 0.0, 'max': 100.0} (percent rank in the window; the window includes the current bar); contexts=condition; state=none
value_ref:price: *: price; contexts=condition; state=none
value_ref:rank: *: bounded_oscillator {'min': 0.0, 'max': 1.0} (0 is the lowest symbol, 1 the highest; absent with fewer than 2 values); contexts=condition; state=portfolio_universe
value_ref:rolling_max: *: same_as_source (highest of the prior N bars; excludes the current bar); contexts=condition,sizing; state=none
value_ref:rolling_min: *: same_as_source (lowest of the prior N bars; excludes the current bar); contexts=condition,sizing; state=none
value_ref:rolling_stats: stat=mean: same_as_source (the window includes the current bar); stat=std: same_as_source (population standard deviation, in source units); stat=zscore: dimensionless (unbounded); stat=sum | stat=ema: same_as_source; stat=count: count (the number of values in the window: always lookback_bars); stat=rank: rank (1 to lookback_bars, not 0-1 and not 0-100); stat=percentile: same_as_source (the VALUE at percentile_level, in source units: not a rank, unlike `percentile`); contexts=condition,sizing; state=none
value_ref:sequence_step: *: price (range is a price difference); contexts=condition; state=none
value_ref:session: session_field=open | session_field=high | session_field=low | session_field=close | session_field=prior_close | session_field=mid: price; session_field=range: price (session high - session low: a price difference); session_field=bars_into_session: bar_count {'min': 0.0}; session_field=in_session: boolean {'min': 0.0, 'max': 1.0} (1.0 inside the session, 0.0 outside); contexts=condition; state=none
value_ref:shared_signal: *: not_determined (unknown: declared by the portfolio shared_signals entry this name binds to, not by this operand); contexts=condition; state=none
value_ref:sibling: *: same_as_source (the named symbol's own value of source); contexts=condition; state=portfolio_universe
value_ref:swing: *: same_as_source (the confirmed swing's price (a price) when value_at_swing is omitted, otherwise the unit of value_at_swing; absent until a swing is confirmed); contexts=condition; state=none
value_ref:time: field=hour: calendar_index {'min': 0.0, 'max': 23.0}; field=minute: calendar_index {'min': 0.0, 'max': 59.0}; field=day_of_week: calendar_index {'min': 0.0, 'max': 6.0} (0 is Monday); field=day_of_month: calendar_index {'min': 1.0, 'max': 31.0}; field=month: calendar_index {'min': 1.0, 'max': 12.0} (1 is January); field=minutes_since_midnight: minutes {'min': 0.0, 'max': 1439.0}; field=minutes_to_close | field=minutes_since_open: minutes {'min': 0.0} (session-aware; absent on 24h assets); contexts=condition; state=none
value_ref:tracked: *: same_as_source (the running extreme of source; unset (comparison unknown) until a value arrives); contexts=condition; state=none
value_ref:trade_history: field=trade_count: count {'min': 0.0} (closed trades; reads 0 before the first); field=consecutive_wins | field=consecutive_losses: count {'min': 0.0} (current streak; reads 0 before the first trade); field=last_pnl: currency_amount (absent before the first closed trade); field=last_pnl_pct: percent (absent before the first closed trade); field=rolling_win_rate: percent {'min': 0.0, 'max': 100.0} (of the last `lookback_bars` closed trades; 50 means half won); field=rolling_avg_pnl_pct: percent (average over the last `lookback_bars` closed trades); field=bars_since_last_exit: bar_count (absent before the first closed trade); contexts=condition; state=trade_history
value_ref:triggering_zone: level=upper | level=lower | level=mid: price; contexts=condition,execution; state=triggering_zone
value_ref:unary_expr: op=abs | op=neg: same_as_source; op=log: dimensionless (natural logarithm of the source); op=log10: dimensionless (base-10 logarithm of the source); op=sqrt: not_determined (unknown: the unit is the square root of the source's unit); op=pct_change: percent ((current - prior) / prior * 100 over one bar); contexts=condition,sizing; state=none
value_ref:volume: *: volume {'min': 0.0}; contexts=condition; state=none
value_ref:xs_dispersion: stat=stdev: same_as_source {'min': 0.0} (sample standard deviation (ddof=1)); stat=range: same_as_source {'min': 0.0} (highest value minus lowest value); contexts=condition; state=portfolio_universe
value_ref:xs_zscore: *: dimensionless (standard deviations from the universe mean; absent with fewer than 2 values or zero spread); contexts=condition; state=portfolio_universe
unit bar_count: a number of bars
unit boolean: 0.0 for false, 1.0 for true
unit bounded_oscillator: fixed-range oscillator; see range
unit calendar_index: calendar ordinal; see range
unit count: a plain count
unit currency_amount: account-currency amount
unit dimensionless: unitless number
unit enum_code: coded value; see note
unit minutes: a number of minutes
unit not_determined: not confirmed; see reason
unit payload_declared: the unit the event type's payload schema declares
unit percent: percent: 2 means 2%
unit price: quote-currency price level (a difference of prices is also in price units)
unit price_squared: squared quote-currency price units (variance)
unit rank: ordinal rank, 1 is the lowest
unit ratio: ratio: 0.02 means 2%
unit same_as_source: same unit and scale as the source operand
unit volume: traded volume units (shares, or coins for crypto)

DECLARED CROSS-OBJECT RESTRICTIONS
config:execution: A bidirectional strategy (one long entry group plus one short) currently requires order_type='market'; non-market entry orders are rejected at compile time.
config:execution: A bidirectional entry the compiler lowers to an auction order type — a bare at_time entry on the session open, or an equity stateless-calendar entry — is rejected; only plain market entries merge across directions.
config:sizing: Stop distance is currently derived only from fixed_targets.stop_loss_pct or trailing_stop.
execution_price:zone: The execution-price zone lookup and the entry's zone condition are decoupled registry queries that can resolve to different zones. Use an entry signal that is not a zone condition of the same type, or the triggering-zone execution price.
value_ref:time: Session-relative time fields resolve only on session-aware (equity) symbols. On a 24h asset they would silently be NaN, so the compiler rejects them instead of producing a never-firing condition.

ENTRY SEMANTICS (current)
single: same-side=all_of; long/short conflict=skip; An opposite entry signal never reverses an open position. Even when an exit fills on that bar, the opposite entry is not placed; its complete entry group must fire again on a later bar while the strategy is flat.
accumulate: same-side=all_of; long/short conflict=skip; position_policy.mode='accumulate': a SAME-direction entry signal while invested opens another lot rather than being blocked, until position_policy.max_positions lots are open. An opposite entry signal never reverses an open position. Even when an exit fills on that bar, the opposite entry is not placed; its complete entry group must fire again on a later bar while the strategy is flat.
scale_in: same-side=all_of; long/short conflict=skip; position_policy.mode='scale_in': a SAME-direction entry signal while invested opens another lot rather than being blocked, until position_policy.max_positions lots are open. An opposite entry signal never reverses an open position. Even when an exit fills on that bar, the opposite entry is not placed; its complete entry group must fire again on a later bar while the strategy is flat.
reverse: same-side=all_of; long/short conflict=skip; position_policy.mode='reverse': an opposite entry signal while invested flips the position. The current side is closed with a reduce-only market order (fills next bar) and the opposite side is opened once flat (fills the bar after) WITHOUT its entry condition having to fire again. There is no same-bar cross-zero fill. A fresh signal for the side just left supersedes the pending flip, and both directions firing at once holds the position.

OPERATIONS (registered; authorization checked on invocation)
add_rule(condition: object; direction?: Direction | null; name?: string | null; remainder_unprotected?: boolean | null; role: 'entry' | 'exit' | 'gate'; scan_run_id?: string | null; size_frac?: number | null; strategy_id: string)
assess_overfitting_risk(strategy_id: string)
builder_add_condition(condition: object; name?: string | null; scan_run_id?: string | null; strategy_id: string)
builder_attach_rule(definition_id: string; direction?: Direction | null; remainder_unprotected?: boolean | null; role: 'entry' | 'exit' | 'gate'; size_frac?: number | null; strategy_id: string)
builder_clone_strategy(name?: string | null; strategy_id: string)
builder_compile(strategy_id: string)
builder_compose(definition_ids?: list[string] | null; kind: CombinatorMode; min_true?: integer | null; sequence_id?: string | null; steps?: list[object] | null; strategy_id: string; strict?: boolean; window_bars?: integer | null)
builder_delete_anchor(anchor_id: string; strategy_id: string)
builder_delete_condition(definition_id: string; strategy_id: string)
builder_delete_strategy(strategy_id: string)
builder_delete_zone(strategy_id: string; zone_id: string)
builder_detach_rule(rule_id: string; strategy_id: string)
builder_discover(action: 'quickstart' | 'overview' | 'specification' | 'facets' | 'list' | 'get'; detail?: 'compact' | 'full'; filters?: DiscoveryFilters | null; ref?: string | null)
builder_edit_strategy(name?: string | null; strategy_id: string; symbols?: list[string] | null; timeframe?: Timeframe | null; volume_units?: 'base' | 'quote' | null)
builder_get_strategy(strategy_id: string)
builder_list_strategies(limit?: integer; offset?: integer; project_id?: string | null; status?: string | null; symbol?: string | null)
builder_rename_definition(definition_id: string; new_name: string; strategy_id: string)
builder_save_anchor(anchor: object; strategy_id: string)
builder_save_zone(strategy_id: string; zone: object)
builder_set_allocation(allocation: BasketAllocationAuthoring; strategy_id: string)
builder_set_strategy_config(patch: object; replace_sizing?: boolean; strategy_id: string)
builder_update_condition(definition_id: string; expected_source_version?: integer | null; strategy_id: string; updates: object)
compare_backtests(backtest_ids: list[string])
correlate_strategies(backtest_ids: list[string]; method?: CorrelationMethod)
create_event_type(description?: string; event_type_id: string; name: string; payload_schema?: object | null)
create_portfolio(allocation?: PortfolioAllocationAuthoring | null; members: list[Member]; name: string; project_id: string; shared_signals?: list[SharedSignal])
create_strategy(name: string; project_id: string; symbols: list[string]; timeframe: Timeframe)
delete_event_type(event_type_id: string)
delete_portfolio(portfolio_id: string)
describe_allocation(strategy_id: string)
evaluate_paper_session(session_id: string)
explain_bar(backtest_id: string; bar_id?: integer | null; context_bars?: integer; sleeve_id?: string | null; timestamp?: string | null)
get_backtest(backtest_id: string; detail?: BacktestDetail | null; include?: list[BacktestInclude] | null; include_indicators?: IndicatorDetail | null; trades_limit?: integer; trades_offset?: integer)
get_condition_timeline(backtest_id: string; end_bar: integer; max_bars?: integer; sleeve_id?: string | null; start_bar: integer)
get_current_signal_state(lookback_bars?: integer; strategy_id: string)
get_paper_trading_session(session_id: string)
get_portfolio(portfolio_id: string)
get_scan_batch(batch_id: string; detail?: string; min_occurrences?: integer; significant_only?: boolean)
get_strategy_patch_schemas(strategy_id: string)
get_walk_forward(per_window_limit?: integer; per_window_offset?: integer; walk_forward_id: string)
ingest_events(event_type_id: string; events: list[object]; source?: string)
list_assets(asset_class?: string | null; fetch_all?: boolean; limit?: integer | null; offset?: integer; summary?: boolean; symbols?: list[string] | null)
list_event_types(category?: string | null; ids?: list[string] | null)
list_paper_trading_sessions(limit?: integer; offset?: integer; strategy_id: string)
list_portfolios(limit?: integer; offset?: integer)
list_runs(batch_id?: string | null; limit?: integer; offset?: integer; portfolio_id?: string | null; strategy_id?: string | null; type?: RunKind)
project_create(description?: string | null; name: string)
project_delete(project_id: string)
project_get(project_id: string)
project_get_scratchpad(limit?: integer; parent_id?: string | null; parent_type?: string | null; project_id?: string | null)
project_list(cursor?: string | null; limit?: integer; q?: string | null)
project_write_scratchpad(content: string; label?: string | null; parent_id?: string | null; parent_type?: string | null; project_id?: string | null)
query_events(end_ts?: string | null; event_type_id: string; limit?: integer; offset?: integer; start_ts?: string | null; symbol?: string | null)
release_holdout(confirm?: boolean; project_id: string)
rerun_backtest(backtest_id: string; collect_diagnostics?: boolean; storage_profile?: string)
reset_event_type_schema(event_type_id: string)
run_backtest(benchmark_symbol?: string | null; collect_diagnostics?: boolean; detail?: 'summary' | 'full'; end_date?: string | null; fee_pct?: number | null; initial_cash?: number; lookback?: string | null; overrides?: object | null; portfolio_id?: string | null; slippage_pct?: number | null; start_date?: string | null; storage_profile?: string; strategy_id?: string | null; sweep?: object | null; wait_for_completion?: boolean)
scan_run_list(limit?: integer; offset?: integer; project_id: string; symbol?: string | null; verdict?: string | null)
signal_compare(conditions: list[object]; end_date: string; filter_condition?: object | null; horizon?: integer; hypothesis?: string; labels?: list[string] | null; project_id?: string | null; resolution: string; start_date: string; symbol: string)
signal_scan(condition: object; end_date: string; filter_condition?: object | null; horizons?: list[integer] | null; hypothesis?: string; max_combinations?: integer; min_occurrences?: integer; outcome_mode?: string; project_id?: string | null; resolution: string; start_date: string; sweep_mode?: 'cartesian' | 'zip_by_index'; symbol?: string | null; symbols?: list[string] | null)
start_paper_trading(alert_mode?: boolean; fee_pct?: number | null; initial_cash?: number; notification_channel?: 'all' | 'email' | 'push'; slippage_pct?: number | null; strategy_id: string)
stop_paper_trading(session_id: string)
update_portfolio(patch: PortfolioUpdateAuthoring; portfolio_id: string)
validate_on_holdout(strategy_id: string)
walk_forward(benchmark_symbol?: string | null; fee_pct?: number | null; initial_cash?: number; mode?: string; oos_pct?: number; overrides?: object | null; portfolio_id?: string | null; select_by?: string; slippage_pct?: number | null; strategy_id?: string | null; sweep?: SweepSpec | null; total_lookback?: string; windows?: integer)

DETAIL REFS (complete)
condition:all_of
condition:always_true
condition:any_of
condition:at_least
condition:at_session
condition:at_time
condition:breakout_retest
condition:calendar_schedule
condition:candle_pattern
condition:compare
condition:condition_ref
condition:consecutive
condition:cross
condition:eod_flatten
condition:fixed_targets
condition:flag_pattern
condition:fvg
condition:in_set
condition:latch
condition:liquidity_sweep
condition:not
condition:order_block
condition:ote
condition:pennant_pattern
condition:range
condition:sequence
condition:spread
condition:trailing_stop
condition:transition
config:allocation
config:allocation:equal_weight
config:allocation:manual
config:allocation:rank_based
config:allocation:signal_proportional
config:collection_risk
config:construction_constraints
config:execution
config:portfolio_allocation
config:position_policy
config:rebalance
config:risk
config:sizing
construction:portfolio
execution_price:anchor
execution_price:atr_offset
execution_price:named_zone
execution_price:pct_offset
execution_price:zone
indicator_shape:ad
indicator_shape:adx
indicator_shape:aroon
indicator_shape:atr
indicator_shape:avwap
indicator_shape:bb
indicator_shape:candlestick
indicator_shape:cci
indicator_shape:cmf
indicator_shape:dc
indicator_shape:ema
indicator_shape:gap
indicator_shape:kc
indicator_shape:macd
indicator_shape:max
indicator_shape:median
indicator_shape:mfi
indicator_shape:min
indicator_shape:obv
indicator_shape:pctile
indicator_shape:pivot
indicator_shape:pphl
indicator_shape:rmm
indicator_shape:roc
indicator_shape:rsi
indicator_shape:rw
indicator_shape:sma
indicator_shape:std
indicator_shape:sto
indicator_shape:stoch_rsi
indicator_shape:str
indicator_shape:var
indicator_shape:vol_sma
indicator_shape:vwap
indicator_shape:vwap_bands
indicator_shape:vwma
indicator_shape:wma
portfolio:create
portfolio:member
portfolio:shared_signal
portfolio:update
recipe:bidirectional_ema_cross
recipe:ema_crossover
recipe:event_blackout
recipe:event_payload_threshold
recipe:formula_sized_vwap_dislocation
recipe:keltner_reentry
recipe:opening_range_breakout
recipe:pairs_spread_zscore
recipe:post_loss_cooldown
recipe:squeeze_release
recipe:squeeze_then_breakout
recipe:three_of_five_confluence
recipe:top_decile_momentum_basket
recipe:trend_pullback
recipe:weekly_dca
resource:anchor
resource:zone
value_ref:anchor
value_ref:binary_expr
value_ref:constant
value_ref:entry_bar
value_ref:equity
value_ref:event_distance
value_ref:event_field
value_ref:indicator
value_ref:live_position
value_ref:named_zone
value_ref:percentile
value_ref:price
value_ref:rank
value_ref:rolling_max
value_ref:rolling_min
value_ref:rolling_stats
value_ref:sequence_step
value_ref:session
value_ref:shared_signal
value_ref:sibling
value_ref:swing
value_ref:time
value_ref:tracked
value_ref:trade_history
value_ref:triggering_zone
value_ref:unary_expr
value_ref:volume
value_ref:xs_dispersion
value_ref:xs_zscore
workflow:anchor_signal_ref
workflow:named_anchor_zone
```
