Support / Resistance (S/R)
Objective level clustering, strength scoring, and nearest-level outputs.
What It Measures
S/R identifies objective support and resistance clusters from pivot interactions, reaction strength, and recency.
Inputs
- Candidate level prices from pivots and local structure.
- Touch counts and reaction magnitude over lookahead bars.
- Recency weighting and side classification (support/resistance).
sr_zone_history_bars:20sr_zone_future_bars:-1sr_zone_alpha_base:0.06sr_zone_alpha_strength_mult:0.1sr_zone_alpha_cap:0.22
Calculation Pipeline
- Generate level candidates and merge nearby prices.
- Compute touch stats and post-touch reaction scores.
- Compute recency and strength (with decay).
- Filter by recency/strength thresholds with nearby level fallback.
- Return sorted levels plus nearest support/resistance.
Formulas & Rules
raw = (touches / 6.0) + (reaction_score * 6.0)
base_strength = clip(raw / 1.7, 0.0, 1.0)
recency_decay = exp(-(1 - recency) / tau)
strength = clip((base_strength * recency_decay) + (0.20 * recency), 0.0, 1.0)
recent_ok = recency >= min_recency_ratio OR strength >= stale_relax_strength
strength_ok = strength >= strength_threshold
level kept if recent_ok AND strength_okLive Worked Example
| TF | Nearest Support | Nearest Resistance | Levels | Stacked Confluence |
|---|---|---|---|---|
| 1W | $65,081 | $69,199 | 8 | 0 |
| 1D | $62,402 | $72,222 | 8 | 0 |
| 4H | $62,534 | $72,936 | 8 | 0 |
Failure / Fallback Behavior
- If timeframe data is empty, returns no levels and null nearest levels.
- If filtering removes all levels on one side, nearby fallback can inject nearest side levels.
- Role-reversal markers (S->R / R->S) are derived from prior side-vote touches.
Interpretation Notes
S/R levels are probabilistic zones. Stronger levels carry more reaction history and recency support.