Strategy designer
The page where you compose rule sets. Three modes, one underlying YAML model.
Every strategy is a tree of leaves grouped by AND / OR / NOT. The designer page is just three views on the same tree — pick the one that matches how your brain works that afternoon. Edits to one view immediately reflect in the others; nothing is lost on switching.
rules:
group: { op: and }
- leaf: { rsi(14) < 30 }
- leaf: { volume > vma20 * 1.5 }- ▸ AND
- ⋮⋮ RSI(14) < 30
- ⋮⋮ OR group
Block mode
The default. Each leaf and group is a card; cards stack vertically. Click + Leaf to add a new condition, + Group to start an AND / OR / NOT container. Direction is set per leaf via a tag (@long, @short, or @both) in the top-right of the card.
Text mode
The raw YAML editor with syntax highlighting. Useful if you're copying rules from a Telegram /show output, or if you want to diff two strategies in your head. Saving validates against the schema and warns on unknown keys.
Drag & drop mode
A tree view where leaves and groups can be dragged between containers. Best when you want to restructure a deeply nested rule set without re-typing it.
Nested AND / OR / NOT groups
Groups are unbounded. You can write `(A AND (B OR (NOT C)))` and it will evaluate exactly that way — short-circuiting on the same rules Python uses. NaN-bearing leaves abstain (return False); they do not poison the whole group.
Example
rules:
group:
op: and
children:
- leaf: { lhs: { indicator: rsi, period: 14 }, op: lt, rhs: { value: 30 }, dir: long }
- group:
op: or
children:
- leaf: { lhs: { indicator: ema, period: 20 }, op: gt, rhs: { indicator: ema, period: 50 } }
- leaf: { lhs: { bar: volume }, op: gt, rhs: { indicator: volume_ma, period: 20 } }Direction tags
Each leaf carries a direction tag. @long means the leaf only contributes to long-entry / long-exit logic. @short is the mirror. @both is the default — the leaf applies to whichever side the surrounding strategy is evaluating. Direction is colour-coded: green for long, red for short, neutral for @both — useful when a strategy mixes both sides in the same rule set so you can tell direction at a glance. @long @short @both.
The buttons
- + Leaf
- Adds a new condition under the focused group. Defaults to RSI(14) < 30 so you have something to edit.
- + Group
- Adds a new AND group under the focused container. Convert it to OR or NOT from the small op dropdown in its header.
- Save
- Persists the current draft to your account and runs schema validation. The strategy name is taken from the title field at the top.
- Delete
- Only appears when editing an existing strategy. Removes it from your account. There is no undo, but unrun strategies have no side-effects on your data.
Auto-persistence
The current draft is auto-persisted to a hidden field called _rules_draft every time you click +/- or edit a leaf. Deployments and dashboard restarts no longer wipe in-progress work. You will see the draft re-hydrate on next page load even if you never clicked Save.