Support Resistance with Breaks and Retests

Published on MillionChart by CandleKing.

The Break and Retest indicator is a visual aid for spotting continuation areas and pullbacks. It draws support and resistance levels automatically and uses a sequence of conditions to decide when a breakout has happened and then been retested. It also tries to detect liquidation-style events and still output a retest in those cases.

Repaint note: the "potential" labels follow live retest events as they develop, so they are the only part that is forced to repaint.

Settings:
- Lookback Range: how far back to look when a pivot triggers a new support or resistance level.
- Bars Since Breakout: how many bars must pass after a breakout before a retest is detected.
- Retest Detection Limiter: when a potential retest is flagged, this sets how many bars it may stay active while waiting for confirmation.

Repaint options:
- On: repainting allowed. By default the system uses the current close, which repaints.
- Off - Bar Confirmation: no repainting, and alerts fire when the bar closes, one candle later.
- Off - High & Low: no repainting, but it uses highs and lows instead of the close, which may give a higher but less accurate result.

How it works: the calculation does not look for a perfect retest inside a zone. It focuses on price fluctuation around the zones, so it tends to produce more results. Potential retests update continuously until one is confirmed, and are deleted if not. If a potential retest is active and the next candle drops below the value at detection, a retest is placed.

Alerts are available for the signals.