Historical Swing Clusters

Support Resistance Zone Calculator

Group confirmed historical swing highs and lows into price zones. Inspect their ranges and counts; these retrospective clusters do not estimate trade probabilities.

15 candles parsed

Format: Open,High,Low,Close — exactly four columns, no header, 3–5,000 oldest-to-newest rows. Remove timestamps and extra columns from exports. Initial values are synthetic.

Percent of whole-sample mean midpoint

Filter clusters by confirmed swing count

Swing Count Legend

5+ swing points
4 swing points
3 swing points
1–2 swing points

Zone Visualization

160.80155.90151.00
2x
2x

High-Derived Zones (1)

157.20 - 157.80(center: 157.50)
2 swing points

Low-Derived Zones (1)

151.50 - 152.00(center: 151.75)
2 swing points
2
Total Zones
1
Resistance
1
Support

How to Use the Support Resistance Zone Calculator

Paste chronological OHLC rows in the format shown above. The calculator finds strict one-neighbor swing highs and lows, then groups each kind separately. A swing is confirmed only after the next candle closes; the first and last bars are excluded.

  1. Prepare consistent data: Use one instrument, timeframe and adjustment basis. The four-column format cannot detect timestamps, missing sessions or mixed instruments.
  2. Set tolerance: A 0.5% setting means 0.5% of the mean midpoint of the entire supplied sample. Points are sorted by price and join the first eligible cluster; its center is updated as an arithmetic mean.
  3. Filter by count: The threshold counts qualifying swing points, not every candle touching a zone. No volume weighting, recency weighting or probability model is used.
  4. Read the range: Minimum and maximum are observed swing prices, not a symmetric tolerance band. A single-point cluster has zero price width even though its chart marker has a minimum visible height.

Interpreting Zones Without Look-Ahead

Low-derived clusters are labelled support and high-derived clusters resistance. Those names describe where the input points came from; they do not locate the zones relative to the latest close or automatically swap roles after a breakout. Changing the sample changes its mean and can change clustering. Do not treat a full-sample zone as a signal that was known at every earlier candle.

What the Color Counts Do Not Show

Colors group counts into 1–2, 3, 4 and 5+ swing points. A larger count is not a verified measure of reliability, institutional interest or expected return. This calculator does not estimate breakout size, identify live entries or backtest stops. To evaluate a bounce or breakout rule, define it on information available at each bar and include costs in a separate test.

Fidelity's support and resistance overview explains the chart-analysis concepts; it does not validate this calculator's specific clustering method.

Frequently Asked Questions

How are zones calculated?

An interior high must exceed both neighboring highs; an interior low must be below both neighboring lows. Equal values do not qualify. Highs and lows are clustered separately, sorted by price, using the first cluster whose current mean is within tolerance. The first and last bars cannot be confirmed swing points.

What does the count mean?

The count is the number of confirmed swing points in a cluster, not every visit to that price area. Counts and color buckets describe this sample only; they do not measure the chance that a zone will hold or produce a profitable trade.

How is tolerance applied?

Tolerance is a percentage of the mean of all input candle midpoints. It is compared with the evolving cluster mean, not the distance between every pair of points. The final zone spans its actual minimum and maximum swing prices. Changing the dataset can change the clusters; no tolerance is universally optimal.

Are these signals available in real time?

A swing requires the next candle to close, and clustering uses the whole supplied sample. These results are a retrospective summary, not a point-in-time signal series. Support means low-derived and resistance means high-derived; neither label is automatically reassigned after a breakout.

What data should I paste?

Use 3–5,000 chronological candles, one line per candle with exactly Open,High,Low,Close and no header or date column. Prices must be finite, positive and internally consistent. The parser rejects invalid rows instead of skipping them. The initial data is a synthetic example; timestamps and missing sessions cannot be checked in this format.

Describe Your Zone Rules in a Pine Script Draft

Describe your rules to Pineify's coding tools, then review the generated script and test it in TradingView. This calculator does not transfer its zones automatically or place trades.