Strategies
Your approach. Clear agentic steps.
Build an inspectable strategy from entries, exits, and risk limits. Choose the version your agent follows.
4H Trendline Breakout v1. A trader asks Cook to build an agent from the BTC chart. Cook proposes the nodes and waits for approval before building the connected instructions.
- Wait for a closed 4h candle above resistance and the descending trend line.
- Plan up to 0.5% risk before costs.
- Place the stop below the signal candle and target 2 times the risk distance.
- Keep one position open at a time.
The trader reviews the strategy and chooses whether to test and approve it. A draft does not activate monitoring or orders.
The agent definition contains the connected strategy below. The film finishes on the complete graph, including the wait branch, and holds for three seconds before replay. This is a draft, not a deployed agent.
BTC · 4h close
Start one evaluation when a BTC four-hour candle closes. Ignore partial candles and duplicate close events.
- Market
- BTC/USD
- Interval
- 4h · UTC
- Event
- candle.closed
- Deduplication
- symbol + timeframe + close_time
- Output
- Closed OHLCV candle
Read chart levels
Reuse the marked horizontal resistance and descending trend line from the preceding analysis. Keep the approved anchors fixed and project the trend line to each candle close.
- Resistance
- Marked upper horizontal level
- Trend line
- Descending line from analysis
- Support
- Retained on chart as context
- Projection
- y = y₁ + (y₂ − y₁) × (t − t₁) / (t₂ − t₁)
- Refresh
- 69 prior closed candles; freeze marks for 3 evaluations
- Missing level
- Skip this evaluation
Breakout confirmed?
Require a completed candle to close above both resistance and the descending trend line. The previous close must not already be above both, so a continuing breakout cannot repeatedly trigger entry.
- Confirmation
- Completed candle crosses above both levels
- Expression
- candle.closed AND close > resistance AND close > trend(close_time)
- Fresh cross
- previous.close ≤ resistance OR previous.close ≤ trend(previous.close_time)
- On true
- Continue to risk checks
- Otherwise
- Wait for the next candle
Define risk
Place the stop one venue tick below the breakout candle low. Size the position to risk 0.5% of equity and place the target twice the entry-to-stop distance above entry.
- Risk budget
- Up to 0.5% of current equity before costs
- Stop
- Breakout candle low − venue tick size
- Target
- entry + 2 × (entry − stop)
- Size in BTC
- min(equity × 0.005 / (entry − stop), available cash / entry); round down
- Validation
- target > entry > stop; positive size
- Costs
- 2R before fees and slippage
Trade
Configure a long entry after the confirmed close, with size and protective exits supplied by the risk step. Recalculate against the entry quote before submission.
- Direction
- Long · BTC/USD
- Entry
- Next candle open after confirmation; recalculate risk
- Size
- Risk-step quantity · round down to venue lot size
- Stop
- Risk-step stop · stop-market · reduce-only
- Target
- Risk-step target · limit · reduce-only
- Exit handling
- Cancel sibling exit when position closes
- Position limit
- One open position for this strategy
- Validation
- Skip if protective exits cannot be attached
Wait for next candle
End this evaluation when the candle has not crossed above both levels. Wait for the next completed BTC four-hour candle before checking again.
- Reason
- Breakout not confirmed
- Next check
- Next closed BTC 4h candle
- Evaluation
- End this run; trigger starts the next
- Trade
- No entry from this branch
What you get
Make every node clear.
Define how your agent enters, exits, and manages risk.
- Indicators and conditions. Connect indicators, thresholds, and filters.
- Sequence and branches. Choose what happens when checks pass or fail.
- Invalidation and exits. Define invalidation and backtest exits.
Stay in control.
Test changes before updating your agent.
- Edit and backtest. Compare changes against historical results.
- Approve a version. Your approved version drives testing and monitoring. Edits stay in draft; execution permission is separate.
