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).