Support Resistance
Quick Reference
| Property | Value |
|---|---|
| Dimension | technical |
| Category | technical |
| Version | v0.9.0 (Beta) |
| Output Column | support_distance |
Support and resistance levels: rolling_min(price) and rolling_max(price) with distance to current price
Formula
price - rolling_min(price, window)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
price | cdm_* | CDM source table |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer [5, 2000] | 50 | Window for rolling support/resistance calculation |
Output
Column: support_distance
Distance from current price to nearest support/resistance level (positive=above support, negative=below resistance)
Market Intuition & Trading Rationale
Support/resistance distance measures how far the current price is from its recent extremes: price - rolling_min(price, window). A small positive value means price is near its recent low (potential support). A large positive value means price has rallied far above its recent low. The feature captures the simplest form of support: the rolling minimum represents the recent "floor" that price has respected; the distance to that floor tells you how much room there is before the floor is tested.
This is a single-sided feature — it measures distance to support (rolling minimum). For resistance distance, compute the mirror: rolling_max(price, window) - price. The two can be used together to normalize price position within its recent range: (price - min) / (max - min), which is equivalent to a stochastic oscillator.
Support and resistance levels become more significant the more times they're tested without breaking. A rolling minimum that has held for 50 bars is a stronger support level than one that has held for 5 bars. The window parameter controls this: larger windows identify more significant, longer-term levels.
Usage Cases
- Support bounce entries: When support_distance is small (price near recent low) and showing signs of reversal (e.g., RSI turning up), enter long with a stop just below the support level. The risk is well-defined: distance to the support breach.
- Breakout confirmation: When price breaks below support (support_distance turns negative, meaning price is below the rolling minimum), a potential breakdown is underway. Confirm with volume — high volume breakdown = genuine; low volume = potential false breakdown (bear trap).
- Take-profit / stop-loss placement: Place take-profit orders near resistance (when price approaches the rolling max) and stop-loss orders just below support (when price approaches the rolling min). These levels are visible to other market participants, creating self-fulfilling order clustering.
YAML Definition
name: support_resistance
description: 'Support and resistance levels: rolling_min(price) and rolling_max(price)
with distance to current price'
category: technical
version: v0.9.0 (Beta)
dimension: technical
status: Pre-release
required_inputs:
- price
output_column: support_distance
output_description: Distance from current price to nearest support/resistance level
(positive=above support, negative=below resistance)
parameters:
window:
type: integer
description: Window for rolling support/resistance calculation
required: false
default: 50
constraints:
min: 5
max: 2000
formula: price - rolling_min(price, window)