Breakout Distance
Quick Reference
| Property | Value |
|---|---|
| Dimension | signal |
| Category | momentum |
| Version | v1.0 |
| Output Column | breakout_distance |
Distance of current price from recent range boundaries (high/low)
Formula
trade_price - rolling_max(trade_price, window_bars)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
trade_price | cdm_trade_enriched | Trade data enriched with bar context — price, volume, side, trade type |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window_bars | integer [5, 1000] | 50 | Number of bars for range calculation |
Output
Column: breakout_distance
Signed distance from range boundaries (positive above high, negative below low)
Market Intuition & Trading Rationale
Breakout distance measures how far the current trade price has moved above the recent range high, computed as trade_price - rolling_max(trade_price, window_bars). A positive value means price is above the highest level observed in the lookback window — a breakout to new highs. A zero or negative value means price is still within or below the established range.
This is the foundational calculation for range breakout detection. The rolling maximum over window_bars establishes a dynamic resistance level that adapts to recent market conditions. When price pierces this level, it signals that buying pressure has overwhelmed all selling pressure observed in the window — every seller at every price level within the range has been absorbed, and price discovery is occurring in new territory.
The choice of window_bars determines the trading horizon. Short windows (10–20 bars) detect micro-breakouts — small range expansions that may be noise or the beginning of a larger move. Medium windows (50–100 bars) capture intraday trend breakouts. Long windows (200+ bars) identify significant regime changes. Multi-window breakout confirmation (breakouts across multiple windows simultaneously) is a powerful confluence signal.
Breakout distance alone does not measure the conviction of the breakout. A new high by 1 tick (minimum price increment) is technically a breakout but carries less conviction than a new high by several ticks. This is where breakout_strength complements breakout_distance — it normalizes the distance by the range width to give a conviction score. Volume confirmation is also essential: breakouts on above-average volume are genuine; breakouts on thin volume are prone to failure.
Usage Cases
- Breakout entry signal: Enter long when breakout_distance becomes positive and exceeds a noise threshold (e.g., 2× tick size). Place a stop below the range high-turned-support.
- False breakout detection: A breakout_distance that briefly turns positive then quickly returns to zero indicates a failed breakout. Use this to fade the move or tighten stops.
- Range contraction setup: After a period of low volatility (narrow range), a positive breakout_distance with elevated volume signals the start of a new trending phase.
YAML Definition
name: breakout_distance
description: Distance of current price from recent range boundaries (high/low)
category: momentum
version: v0.9.0 (Beta)
dimension: signal
required_inputs:
- cdm_trade_enriched.trade_price
output_column: breakout_distance
output_description: Signed distance from range boundaries (positive above high, negative
below low)
tags:
- breakout
- range
- signal
- momentum
parameters:
window_bars:
type: integer
description: Number of bars for range calculation
required: false
default: 50
constraints:
min: 5
max: 1000
formula: trade_price - rolling_max(trade_price, window_bars)