Strategies Reference
Each strategy in the app uses two bands — first_band and second_band — chosen from the indicator types below. Signals occur when the sign of (second − first) flips on a closed bar; execution happens at the next bar open.
Overview
- Decide on closed candles only; avoid forming bars.
- Execute at the next bar's open after a cross.
- Length controls smoothness vs lag; offset should be 0.
- Use stable baselines (HL2, BBM, VWAP, KCB, DCM) against responsive lines (EMA, HMA, JMA, Supertrend) for clearer signals.
Categories
- Basics — first_band vs second_band, cross logic, length & offset
- Moving Averages — EMA, SMA, RMA, HMA, JMA, ZLMA, T3, TEMA, …
- Price-Based Lines — HL2, HLC3, OHLC4, HiLo
- Volume-Based — VWAP, VWMA
- Trend / Other — Supertrend, PSAR
- Channels & Bands — Bollinger (BBL/BBM/BBU), Keltner (KCL/KCB/KCU), Donchian (DCL/DCM/DCU)
Strategy Selection Workflow
- Define the regime: Trend, mean-reversion, breakout, or volatility compression. Match it to Trend, Range, or Breakout strategies in the list.
- Pick timeframe & liquidity: Choose intervals where the pair trades cleanly. High-volume majors tolerate faster signals; long-tail alts often need slower baselines.
- Filter the Strategy Index: Use the search chips for indicator types (e.g., “ema”, “vwap”, “supertrend”) and the limit dropdown to surface the newest evaluations.
- Validate factors: Open the detail view. Confirm length, multiplier, std, etc. still respect current volatility.
- Stage the plan: Note entry, exit, and invalidation logic in your trade checklist before using the strategy live.
Keep a shared template for each setup so team members can reconcile executions against the documented rules.
Common Factors
- length: Main window/period (integer). Many indicators use this.
- offset: Shift result right by N bars (integer; optional).
- Some types require extras: see their pages (e.g., multiplier for Supertrend, std for Bollinger, scalar for Keltner).
Use the exact field names as shown on the Strategy Detail page's Factors JSON.
Performance Metrics (Strategy List)
- Score: Composite quality indicator. Check Profit Factor and trade count before promoting a strategy.
- Daily Profit: Average daily return during the evaluation window. Normalise for leverage and holding time before comparing.
- Profit Factor: Total gains divided by total losses. Target above 1.4 for production; 1.1–1.3 may require discretion.
- Streak: Current win/loss run. Use as a sentiment gauge rather than a predictive tool.
- Best Strategy: Execution mode (Static Long/Short, Flip, etc.). Align with how you plan to trade the signals.
Always cross-check the evaluation date and sample size. Fresh strategies can degrade quickly if market structure changes.
First vs Second Band
- Symmetry: Either line can be fast or slow; the names only describe their role in the signal.
- Signal rule: Compute Diff = second − first. A cross occurs when the sign of Diff flips between two consecutive closed bars.
- Direction: If first > second on the crossing bar → SHORT; otherwise → LONG.
- Execution: Enter or exit at the open of the bar immediately after the crossing bar (next-open).
- Examples:
- EMA(21) as first vs SMA(55) as second → trend cross; EMA below SMA → LONG.
- VWAP (second) vs EMA(13) (first) → intraday mean-reversion/trend flips.
- Supertrend (second) vs HMA(21) (first) → trend confirmation pair.
Length & Offset (Deep Dive)
Length
- Effect: Higher length → smoother line, fewer signals, more lag. Lower length → faster response, more whipsaw.
- Lag note: SMA lag ≈ (length−1)/2 bars; EMA/HMA/JMA can reduce apparent lag.
- Heuristic ranges (guides, not rules):
- 1m: fast 7–21, baseline 34–55
- 3m–5m: fast 10–21, baseline 55–89
- 15m: fast 14–34, baseline 89–144
- 1h: fast 21–55, baseline 100–200
- Channels: Wider std/scalar reduce cross count; narrower increases it.
Offset
- Semantics: Shifts the output forward by N bars (to the right). In practice this uses older values for today's bar.
- Default: 0. Changing it usually breaks parity with the app and can introduce look-ahead bias if misused.
- When to use: Rare—sometimes to align anchored series (e.g., VWAP variants) or to replicate a published method; otherwise leave it 0.
Optimization & Validation Playbook
- Baseline check: Start from the suggested ranges above. Verify the equity curve and trade distribution on the Strategy Detail page.
- Sensitivity sweep: Alter a single factor (e.g., length, multiplier) ±20% and confirm performance holds.
- Walk-forward: Rerun the strategy on the next time segment (or higher interval) to ensure robustness.
- Manual replay: Step through recent candles in TradingView using the documented factors to ensure the signals align with expectations.
- Execution drill: Log hypothetical fills at the next bar open to validate slippage assumptions before live deployment.
Terms & Glossary
Strategy fields
- Strategy Name: Human-readable identifier for the configuration.
- Trading Pair: Symbol (e.g., DOGE_USDT) you will chart and trade.
- Interval: Timeframe (e.g., 1m, 5m, 15m). Signals are evaluated on this timeframe.
- Expiration Time: Strategy validity; ignore the strategy after this time.
- first_band / second_band: Two indicator definitions, each with a type and factors map.
- type: Indicator name (e.g., ema, sma, supertrend, bbm, vwap).
- factors: Parameter map for the indicator (see below).
Inputs & price series
- open/high/low/close: Standard OHLC prices per bar.
- volume: Traded quantity in the bar (needed by VWAP/VWMA).
- HL2: (High + Low) / 2 — see Price-Based.
- HLC3: (High + Low + Close) / 3 — Typical Price.
- OHLC4: (Open + High + Low + Close) / 4.
Factors (parameters)
- length (int): Window/period. Higher = smoother with more lag; lower = faster but noisier.
- offset (int): Shifts the output forward by N bars. Usually 0.
- na, nb, nc (floats 0–1): HWMA smoothing/trend/seasonality weights.
- poles (2 or 3): SSF filter order (3 is sharper).
- a (float): T3 smoothing coefficient.
- multiplier (float): Supertrend band distance in ATR units; higher = wider bands, fewer flips.
- std (float): Bollinger band standard deviation; higher = wider bands.
- scalar (float): Keltner band scaling; higher = wider channel.
- anchor (str): VWAP session anchor; the app uses daily anchoring internally.
- mamode (str): Moving-average mode (sma/ema/etc.) used inside some band calculations.
- ddof (int): Degrees of freedom for standard deviation (Bollinger); typically 0 or 1.
Channel/variant codes
- BBL/BBM/BBU: Bollinger Lower / Mid / Upper lines.
- KCL/KCB/KCU: Keltner Channel Lower / Basis / Upper lines.
- DCL/DCM/DCU: Donchian Channel Lower / Mid / Upper lines.
Signals & execution
- Band: Any single indicator series used as first or second input.
- Diff: second − first
- Cross: The sign of Diff flips between two consecutive closed bars.
- Direction: If first > second on the crossing bar → SHORT; else → LONG.
- Closed bar: A candle that has finished; values won't repaint.
- Next-open execution: Enter/exit at the open of the bar immediately after the crossing bar.
Pairing tips
- Trend: pair a fast MA (e.g., EMA 21) vs a slower baseline (e.g., SMA 55) or Supertrend.
- Mean-reversion: use a midline (HL2/BBM/VWAP) vs a fast MA and wait for crossbacks.
- Volatility control: widen std/scalar/multiplier to reduce churn.
Risk & Trade Management Checklist
- Document a max position size and daily stop aligned with the strategy’s historical drawdown.
- Pre-define exit rules for invalidation (e.g., opposite cross, loss vs ATR multiple, close beyond channel).
- Track live vs backtest slippage; widen spreads reduce mean-reversion edge quickly.
- Review performance after every 20–30 trades or when volatility regime shifts.
- Archive retired strategies with notes so the team knows why they were pulled.