Retest Failure Strength
Quick Reference
| Property | Value |
|---|---|
| Dimension | signal |
| Category | momentum |
| Version | v1.0 |
| Output Column | retest_failure_strength |
Price drawdown from window peak 鈥?measures failure to reclaim a level after retest (S/R flip confirmation).
Formula
(price / (rolling_max(price, window) + 1e-10)) - 1
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
price | cdm_trade_enriched | Trade data enriched with bar context 鈥?price, volume, side, trade type |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer | 50 | Lookback window in ticks for peak reference |
Output
Column: retest_failure_strength
Negative deviation from window maximum (0 = at peak, negative = below peak)
Market Intuition & Trading Rationale
Retest Failure Strength captures the classic "support becomes resistance" (or vice versa) phenomenon at the microstructure level. When price breaks through a level but then returns to test it, the retest outcome reveals whether the level has truly flipped. If price cannot reclaim the prior peak (stays negative), the breakout has failed 鈥?the old level is now resistance, and the reversal is confirmed.
The feature computes the percentage drawdown from the rolling maximum: 0 means price is at the window peak (no failure), increasingly negative values mean price is falling further from the peak. This is a continuous measure rather than a binary "failed/not failed" flag 鈥?the magnitude of the failure carries information. A shallow failure (-0.5%) is ambiguous; a deep failure (-3%) with sustained negative readings is a high-conviction reversal signal.
The rolling_max reference creates a dynamic, adaptive peak level that moves with the market. In a trending-up market, the peak is constantly being refreshed and retest_failure_strength stays near 0. In a reversal, the peak becomes "stale" (price stops reaching new highs) and retest_failure_strength drifts negative 鈥?capturing the degradation of upward momentum before it shows in price levels.
Usage Cases
- Failed breakout detection: After a breakout pushes price to a new peak, monitor retest_failure_strength on the retracement. Values below -0.02 (2% below peak) that persist for multiple ticks confirm the breakout is failing and a reversal is underway.
- S/R flip confirmation: When price breaks below a support level then rallies back, retest_failure_strength that stays negative (below the pre-breakdown peak) confirms the old support is now resistance. Enter short on the failed retest.
- Trend degradation early warning: In an uptrend, retest_failure_strength drifting from 0 toward -0.01 signals that price is no longer making fresh highs 鈥?the trend is stalling. This is an early exit signal for long positions before an actual price decline.
- feature set integration: In the
microstructure_breakoutpack, retest_failure_strength detects when a breakout retest fails 鈥?the core reversal signal in breakout-failure scenarios. When combined with abs_price_distance (confirming price is near the mean/retest zone), negative readings trigger the failure signal.
YAML Definition
name: retest_failure_strength
description: Price drawdown from window peak 鈥?measures failure to reclaim a level
after retest (S/R flip confirmation).
category: momentum
dimension: signal
version: v0.9.0 (Beta)
required_inputs:
- price
output_column: retest_failure_strength
output_description: Negative deviation from window maximum (0 = at peak, negative = below peak)
tags:
- momentum
- mean_reversion
- signal
parameters:
window:
type: integer
description: Lookback window in ticks for peak reference
required: false
default: 50
formula: (price / (rolling_max(price, window) + 1e-10)) - 1