Support and Resistance Zones Filtered by Logistic Regression
Summary
This indicator identifies candidate support and resistance from confirmed pivot highs and lows. For each pivot, it encodes RSI relative to 50 and candle body size relative to ATR as binary features, then applies a logistic function to estimate whether the level will be respected. A configurable probability threshold determines which candidate levels are displayed as regression-selected zones.
The script updates each level as price revisits or crosses it: a close back on the original side counts as a respect, while a close through the level ends it. Users can also set a minimum number of respects, hide distant active levels, and display retest or break markers and prediction labels. The source shows a learning-rate update using accumulated pivot outcomes, but offers no out-of-sample evaluation, calibration evidence, or trading results. Pivot confirmation requires subsequent bars, and the resulting probabilities should be treated as indicator outputs rather than demonstrated forecasts.
Key ideas
- Confirmed pivot highs and lows form the candidate resistance and support levels.
- RSI and candle body size relative to ATR become binary inputs to a logistic model.
- A probability threshold controls which candidate levels are plotted.
- Price returning across a level and closing on its original side increments its respect count.
- The script describes no validation showing that its probability estimates predict future price behavior.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.