Examples & Templates
The 12 templates that ship with Strategy Studio, plus patterns for indicators, helpers, and end-user frontends.
Studio ships 12 templates, each a complete, runnable strategy with a risk block, order-form fields and notes on the canvas explaining the design. New in the toolbar (or File → New → From template…) opens the New strategy gallery, grouped by tier; pick one to open it as a new graph, then remix. Each card shows its tier and what it teaches. See the Node Reference for exact ports.
Templates trade the market they are run on (Current market), so a copy run from the order form trades the chart's market. Two are pinned on purpose: Daily DCA (spot) buys the HYPE/USDC spot pair, and Relative Strength Rotation rotates between ETH and SOL. Templates marked Live only read data a candle backtest cannot replay (funding, taker flow): they backtest flat and only trade in paper or live.
Shipped templates
Beginner
| Template | What it does | Teaches |
|---|---|---|
Daily DCA (spot) | Buys a fixed USD amount of HYPE with USDC on the first bar of every UTC day. Spot, no leverage, no exits. | Spot markets, the New Day clock, USD → size conversion, and wallet readouts. |
Supertrend Flip | Always in the market: long while Supertrend is up, short while it is down, flips on the line break. Size is risk per trade ÷ distance to the line. | Target Position from a ±1 signal, and dollar-risk sizing. |
Trend Follower (EMA + ADX) | Long when the fast EMA is above the slow and ADX confirms strength, short when below, flat in chop. Daily-loss stop and a notional cap. | Symmetric long/short targets with Select, regime filters, and the risk block. |
Intermediate
| Template | What it does | Teaches |
|---|---|---|
Bollinger Mean Reversion | Fades closes outside the Bollinger bands when RSI agrees, with an ATR stop and a take-profit at the basis. At most 4 entries a day, pauses after 2 losses. | Bracket entries, edge-vs-level triggers, the flat gate, and the Trade Throttle. |
Volume Breakout | Donchian breakout confirmed by relative volume, held with an SR latch until the exit channel breaks, half banked at 2×ATR. | The offset trick, Toggle as a position state, and partial exits with Close Position fraction. |
Volatility Squeeze | Waits for Bollinger inside Keltner for N bars, then trades the first close outside the band; exits on the basis. | Count for N-of-M conditions and compression → expansion logic. |
Session Momentum | US-session range breakouts in the direction of the 50 EMA, flat at the session close, at most 3 entries a day. | Session windows, forced flattening, and per-day throttles. |
Multi-Timeframe Pullback | 4h EMA trend, 15m RSI pullback entries with a 1.5×ATR stop and 3×ATR target, 8-bar cooldown. | Per-node timeframe overrides and cooldown-spaced bracket entries. |
Advanced
| Template | What it does | Teaches |
|---|---|---|
Relative Strength Rotation | Holds whichever of ETH or SOL has the stronger positive momentum, rebalanced once a day; cash when neither is rising. | Multi-market graphs, Target Position per coin, and daily rebalancing via enabled. |
Range Grid | Three managed buy limits below a slow SMA anchor, repriced as it drifts, with a managed take-profit above the average entry. | Managed limit orders and position-sized exits. |
Funding Fade (live only) | Short when longs pay extreme funding and price is stretched; the mirror for negative funding. Exits when funding normalizes. | Funding as a signal, z-score stretch, and a live-only edge. |
Liquidation Fade (live only) | Fades one-sided taker flow when liquidations dominate the tape, with a tight ATR bracket, intra-bar. | Trade-tape meters, intra-bar execution, and streak-based pausing. |
Official strategies
The marketplace's official strategies (Lever up, Rotate, De-lever, Hedge, Take-profit ladder, Rebalance basket, Ratio rotation, TWAP vs VWAP, Break-even stop, Volume TWAP) are Studio graphs built from the same generic nodes, each with an order-form frontend, readouts and a status line. Fork to Studio (edit) on the marketplace to study how they are wired: for example, Rotate chains exec.twap fill outputs into a math.batch and a retrying exec.market. What each one does is in Strategy Examples.
Patterns worth knowing
- Exec nodes edge-arm by default.
fireMode: "edge"(the default) fires once per false→true transition offire, so a held-true condition places ONE order, not one per bar. Uselogic.edgewhen you need an explicit event (or asignal<>-typed input); usefireMode: "level"only when you pulsefireyourself. See signal vs level. - Throttle re-entries with
logic.cooldown, and turn one-bar pulses into a persistent regime level withlogic.toggle(SR latch, reset wins). - Gate intra-bar execution. Keep
fireOnBarClose: true(default) so you act once per close. Disable it only for deliberate intra-bar timers (clock.everyMs) or instantui.buttonpanels. - Size from money, not coins.
exec.notionalToSize,exec.sizeByEquityPct, andexec.sizeByRiskturn dollars/risk into a coin-unitsizeto feed an exec node — and keep you above the $10 min notional. - Hold a target, not a sequence.
exec.targetPositionreconciles the position to a signed size (+long, −short, 0 flat): it opens, adds, reduces, closes or flips as needed, so you don't wire separate entry, exit and flat-guard paths. - Chain on fills.
exec.marketandexec.twapreport their fills (filled,filledUsd,filledTotalUsd, …). Feed them into readouts, amath.batch, or the next order. Onexec.market, Retry until filled re-sends what didn't fill, Use available balance sizes to what the account can place and waits instead of failing, and Total cap stops after a total has filled. - Multi-timeframe with one node. Set a coarser
timeframeoverride on a single indicator (e.g. a 4h trend filter on a 1h graph) instead of a second data feed. - Stateful timers/latches (
clock.everyMs,logic.edge/gate/latch/toggle/cooldown/sustain/delay,risk.killSwitch) keep state across intra-bar ticks. - Factor large graphs into helpers — hundreds of nodes on one canvas is a smell.
Indicator graphs (chart overlays)
See Indicators. Set Graph type → indicator and end every output in a debug.plot.
- Dual EMA ribbon —
data.candles(coin = Current market) →ind.ema×2 → twodebug.plot(info + violet). - Volatility bands —
ind.bollinger→ threedebug.plot(upper/mid/lower). - HTF trend overlay —
ind.emawith a4htimeframe override →debug.plot, plotted on a 1h chart.
End-user frontends
See Strategy Frontends. Add ui.* nodes; every strategy in your library appears in the order form's Pro menu under Your strategies.
- Tunable EMA bot —
ui.slider(fast) +ui.slider(slow) → twoind.ema→logic.cross→exec.market;ui.balance→ size;ui.button"Flatten" →exec.closePosition;ui.statusshows LONG/FLAT/SHORT. - One-tap scaler —
ui.coin+ui.number(clip size) +ui.button"Buy clip" →exec.market. - Funding dashboard —
data.fundingRate→ui.readout(annualized %) +ui.gauge+ui.status. No exec nodes — pure monitoring.