Skip to main content

Conditions

Conditions are named boolean readings over the strategy’s own report columns. They classify a coin for the agent, and — when armed — can block an entry or close an open trade.

Authored on the strategy as an ordered list. Saves with the strategy as one atomic axis: every entry carries its verdict key explicitly (null for a building block — never “omit and hope”).

Order is precedence: among verdict-carrying conditions that read TRUE, the first in list order decides the coin’s directional read.

Metrics · Orders

Anatomy

FieldMeaning
KeyStable id (^[A-Z][A-Z0-9_]{1,39}$) — e.g. LIQUID_FLOOR, SQUEEZE_ON, BREAK_UP
NameDisplay label (≤ 80 chars)
VerdictBuilding block (null) or Decides with Up / Down / Neither
EnforcementAdvisory or Required
Hold (closes)Consecutive completed strategy bars that must read TRUE (15)
Exit roleEntry only or Also exits
DefinitionTree of clauses, nested condition refs, and groups

Platform caps (defaults; operator-tunable): up to 16 conditions per strategy, up to 16 clauses per condition (leaves counted toward the clause budget).


Verdict

Authoring is a two-step choice (as in the builder):

  1. Does this condition decide?
    • No · Building blockverdict: null
    • Yes · Decides → pick a side below
  2. Which side? (only when Decides)
    • Up — upside setup (maps to long for construction)
    • Down — downside setup (maps to short)
    • Neither — decided “no trade” directionally
AuthoredMeaning
Building blockNever decides a coin’s side. Still shows in the prompt and can be referenced by other conditions (e.g. BREAK_UP includes SQUEEZE_ON).
Up / Down / NeitherWhen this condition reads TRUE and wins precedence, it supplies that directional verdict.

Unresolved is an evaluation outcome only — missing input, not a false read. You cannot author UNRESOLVED as a verdict.

When a verdict may bind

A deciding verdict is legal only when the condition’s reference closure does not read a developing (forming) column. Binding entry direction off an intrabar wobble is refused at authoring (canBindEntryDirection). Frame-inert settled reads (e.g. some regime labels) may still carry a verdict — settledness is about developing bars, not “every operand must move every bar.”

Verdicts classify; they do not by themselves place a trade. Enforcement and exit role are what act.


Enforcement

ModeEffect of a FALSE reading
AdvisoryEvaluation continues; reading still shown to the agent; a verdict still classifies side
RequiredStops trade evaluation for that coin before any model call — no thought, no trade, no cost

UNRESOLVED does not stop a Required condition — missing input ≠ false.

Orthogonal to verdict: a building block can be Required, and a deciding condition can stay Advisory.

This is not the Signal rules “Required” flag (must-fire count on the scorecard). Same word, different axis.


Hold (closes)

How many consecutive completed strategy bars the condition must read TRUE.

ValueMeaning
1Always legal — one frame; the bar the asking surface names
2–5Multi-bar hold — only when the closure is frame-sensitive (a completed bar can change the reading) and the condition has at least one clause of its own (not only nested refs)

A referenced condition is resolved once and contributes one answer to every frame of the referrer — so a hold whose only bar-moving path runs through a reference would count reads that never happened (canHold).

Needs completed-bar columns for holds above 1: ranks, funding, MDS regime labels, session scalars, non-zero candle offsets, columns below the strategy timeframe, and developing reads are frame-inert or forming — they cannot support a multi-bar hold.

Which bar a one-close condition reads depends on the surface: a decision reads the newest completed strategy bar; a display may show the forming one.


Exit role

ModeEffect of a TRUE reading
Entry onlyAffects entries / classification; open trades follow stops and Exit policy
Also exitsOn a closed candle, closes open trades on the side the verdict opposes — Up closes shorts, Down closes longs; Neither or a building block closes both. FALSE / UNRESOLVED never close

Legal only when every operand of the closure is one a completed bar can move (canCarryExitRole / “needs a completed-bar read”). Developing (forming) reads cannot carry Also exits — that would be an intrabar exit.

Orthogonal to enforcement: one condition can Required-gate entries and Also-exit open risk.


Definition tree

Leaves and groups compose a boolean tree. Group depth ≤ 2 by typing (an inner group holds leaves only).

Members

MemberRole
Column clausecolumn · operator · literal over a report header
Condition ref another condition in the same strategy (e.g. SQUEEZE_ON)
GroupNest All / Any / Not / N of one level deep

Forward refs are legal. The builder rejects missing targets and cycles (self / mutual / transitive) and fixes a deterministic topological evaluation order.

Group operators

OpMeaning
All ofEvery member must read TRUE
Any ofAt least one member TRUE
NotUnary — inverts exactly one member
N ofExactly / at least n members TRUE (carries threshold n)

Clause operators

Legality is derived from the referenced column’s resolved output kind — not a free-form formula.

KindOperators (plain language)
Numeric / rankis below · is at most · is at least · is above · is between
Label (classification / direction / event / boolean)is · is any of

Arithmetic stays in the Metrics column grammar; conditions only compare.

Outcomes per coin

OutcomeMeaning
TRUEInputs read; test passed
FALSEInputs read; test failed — a valid answer, not an error
UNRESOLVEDAn input was missing — not a false result

Worked shape (from a squeeze playbook)

Illustrative layering — same axes as the builder cards:

KeyVerdictEnforcementRole in the tree
LIQUID_FLOORBuilding blockRequiredGate: e.g. vol24hUsd at least a floor
SQUEEZE_ONBuilding blockAdvisoryCompression: width / ADX caps
BREAK_UPDecides · UpAdvisoryRefs SQUEEZE_ON + release clauses (close change, RVOL, %B, …)
BREAK_DOWNDecides · DownAdvisoryMirror for downside release

Building blocks stay reusable; deciding conditions win precedence in list order when TRUE.



Chart levels (and series)

When a condition clause reads a price-derived metric (MA, band, channel, VWAP, …), the trading terminal can project those prices as labelled horizontal levels beside the candles — and optionally a series curve of what the rule has been reading over time.

Opt-in on the agent/coin qualification read (not a separate authoring axis). Drafting the condition is enough; the chart projection derives from the same grammar.

A level is not just a price

The same metric over Confirmed (closed) bars vs Developing (all / forming-inclusive) can differ materially at a window edge. Every served level therefore carries lineage:

FieldMeaning
barSetclosed or all — from effectiveColumnBars on that column (same rule as Metrics)
asOfBarOpenTimeOpen time of the newest bar in that set
provisionalWhether any contributing value came from the live forming bar
labelServer-composed (e.g. 4h · Donchian Lower · Confirmed) — client prints it; MCP gets the same string
clausesWhich condition clauses point at this level, with outcome

Drawing unit identity: (metric, resolved timeframe, barSet, offset). Two clauses on the same identity → one line. Same metric at two rungs, two bar sets, or two offsets → separate lines.

Unresolvable

A level that cannot state its lineage is not drawn. It is listed as withheld with a reason (e.g. not bar-derived / timeframe-inert scalar). Prefer waiting or rewriting the clause over inventing a price.

Series (curves)

Beside levels, a series projection can show the agent’s per-bar reading of a drawable column. Refusals include: relational operand not per-bar, cross-sectional transforms (e.g. rank), non-numeric outputs (classifications / events), or no history in window. Levels and series share the qualification envelope; they answer different questions (where the rule sits vs what it has been reading).

Entry / exit sets

Levels may be tagged by whether they belong to the entry condition set or the exit (Also exits) set — those evaluations can use different bar bases (display vs settled), so the same metric can appear twice with different lineage when both sides reference it.

Perception vs scorecard

Conditions inherit the report’s Confirmed / Developing semantics (see Metrics). The signal scorecard remains the commit plane for whether a coin earns a model call (Signal rules). Both layers are named in the prompt glossary so the model knows which is perception and which is commit.

References must resolve against the report post-state. A report edit that drops a referenced column fails compile; a dangling reference is unpersistable.

Metrics · Metric examples · Next: Orders