Practical tutorials
Practical tutorials
Build and test strategy behavior from a first SJS example to advanced oversight and launch.
Start with one instrument and a small historical window. These tutorials provide complete source where a new script is introduced, explicit prerequisites, and checks for the expected behavior.
Main learning path
| Tutorial | What to establish |
|---|---|
| First SJS strategy | Trace a complete crossover entry and exit |
| Indicator-driven entry | Call a registered SMA and validate its output |
| Prevent duplicate orders | Distinguish overlap, repeated frames, pending orders, and consumed attempts |
| Session-aware strategy | Restrict entries without suppressing state or exits |
| Stateful exits | Track a position-specific watermark and close attempt |
| Pine to SJS | Consume recent numeric Pine events with explicit timing |
| Experiment with Agent Lab | Save, run, investigate, and publish a revision |
| Compare one change | Explain the first changed event between two runs |
| Add L3 oversight | Gate ordinary requests without moving the main algorithm out of SJS |
| Investigate an unexpected trade | Trace an outcome back to data and decisions |
| Backtest and launch | Review a saved candidate and its intended launch environment |
The AI review tutorial remains available as an advanced observational extension. Real runtime provider calls are separate from Agent Lab's authoring assistant and are disabled in historical backtests/warmup.
Use Apps & Running Sessions for lifecycle controls and the engine guides for individual module contracts. The execution examples are intentionally small; read their consumed-event and retry limitations before combining them.