Automation Strategy Definition Template
Note:
This document defines the structure and current state of my automated strategies
🤖 Automation Candidate​
Status: ready | prototype | backlog
Complexity: low / medium / high
API needs: place/cancel conditional orders, OCO or emulated OCO, fetch funding, fetch VWAP/BB
🧩 Origin Metadata​
| Field | Description | Example |
|---|---|---|
| Idea Source | Where the concept originated | Manual trade / Backtest result / Observation / Forum / Research paper |
| Discovery Context | What prompted the idea | Repeated manual success / QLIR anomaly / News-driven pattern |
| Initial Validation | How it first showed promise | Positive expectancy in N manual trades / Backtest > 1.2 PF / Visual edge |
| Stage | Concept → Code Written -> Backtested → Paper Trade (various position scales) -> Live → Scaling -> Deprecated | Protoype |
-
note that not all strategies need to go all the way through the pipeline, this is just the full length process, confidence for live deployment can happen at any stage.
Signal Definition (inputs)​
- Timeframes: [execution_tf, confirm_tf]
- Indicators: BB(20,2), VWAP(session or 1h), Volume(20)
- Features: bandwidth_percentile, vwap_distance_pct, wick/body ratio, volume_ratio
State Machine​
IDLE→ detect setup preconditionsARMED→ stage entries (and mirror side if straddle)FILLED→ cancel opposite; attach stop + TP ladderMANAGE→ tighten stop on rules (time or structure)EXIT→ TP hit / invalidation / timeout
Risk Controls​
- Max attempts per session: N
- Cooldown after fail: X minutes
- Kill switch on BTC whipsaw / VWAP slope breach
- Slippage guard: reject if est. slip > Y bps
Telemetry​
- Log: entry buffer used, MFE/MAE, fill slippage bps, funding P&L
- Alerts: on fill, on stop move, on timeout
- Tags:
strategy:<name>,mode:auto
Backtest Hooks (QLIR)​
- Label: regime flip, first midline test, second test, range edge
- Metrics: win-rate by bandwidth bucket, TP ladder hit-rate, attempt index performance
- Outputs: optimal buffer, stop model (fixed vs ATR), best hold window
💼 Live Wallet​
[View on Drift →](https://app.drift.trade/overview/portfolio?authority=<some_address>)
Maybe later create a component or iframe or something so user doesnt have to leave my site??
Example Spec​
Automation Notes — Range-Bound Bounce​
- Detect range: rolling HH/LL clustering with min 2 touches per edge; VWAP slope ≈ 0; BB bandwidth ≤ 40th pct.
- Entry rules: limit at edge ± buffer; require rejection candle or close-back-inside; volume_ratio ≥ 1.2 at edges.
- Stops/TPs: stop beyond edge (buffer bps); TP1=VWAP, TP2=opposite edge; optional reload on re-test.
- Invalidation: VWAP slope |s| > threshold or close + follow-through outside band.
- Cooldown: after 3 attempts on same edge, pause until fresh liquidity builds (N bars).