concept

Examples

Three runnable study scripts, simple → complex. Studies consume definition events you already Collected — they never call ctx.emit.

Lifecycle is always onEvent (per matching event) then onFinish (aggregate and publish).

Simple → complex

#

Example

Teaches

1

Event count

flows.declare, collect / publish, metric + table

2

Forward return

ctx.candles.forward, distribution result

3

Stop / target first hit

Barrier scan, rates, session buckets

Point each study’s flows.declare.slug at a definition you have Collected (examples below assume the definition examples slugs).

Next

  1. Collect and publish

  2. Results and stats

  3. First study guide