GX Key Zones - Hold / Break / Strong

527
GX Key Zones merges the key price levels intraday traders watch into confluence zones, scores each zone by the levels inside it, and marks how price reacts when it reaches a zone: did the zone hold, or did price close through it?

The script shows where the zones are and what price did there. It does not give buy or sell signals, entries, stops or targets.

*LEVELS USED ━━━━━━━━━━━━━━━━━━━━

Each level carries a weight:

• Previous week high / low (PWH, PWL) — 3 • Previous day high / low (PDH, PDL) — 2 • Premarket high / low, 04:00–09:30 ET (PMH, PML) — 2 • Previous day close (PDC) — 1.5 • Opening range high / low, 15 min by default (ORH, ORL) — 1.5 • Last two confirmed swing highs and lows (SwH, SwL) — 1.5 • Classic daily pivots P, R1, S1, R2, S2 — 1 • Nearest round numbers above and below price (Rnd) — 1

Every level can be switched off.

*HOW ZONES ARE BUILT ━━━━━━━━━━━━━━━━━━━━

All active levels are sorted by price.
Levels within 0.35 ATR of each other are merged into one zone (a zone is never wider than about 0.7 ATR, and at least 0.15 ATR tall).
The zone score is the sum of the weights of its levels. A zone needs at least 2 levels and a score of 3 or more.
Zones scoring 5 or more are "strong" and drawn with a thicker border.
Example: PDH (2) + PMH (2) + R1 (1) close together form one zone with a score of 5.0.

The nearest zones to price are drawn (4 by default): red above price, green below price, yellow when price is inside the zone. Each zone shows its level names and score. A yellow ★ marks the highest-scoring zone among the zones shown.

*HOLD AND BREAK MARKS ━━━━━━━━━━━━━━━━━━━━

Checked on closed bars only.

HOLD ▲ — support zone held • The previous bar closed above the bottom of the zone • The bar dipped into the zone, but not more than 0.5 ATR below it • The bar closed above the top of the zone, as an up bar • The lower wick is at least 35% of the bar's range

HOLD ▼ — resistance zone held: the same rules, mirrored.

BREAK ▲ — close above the zone • The previous bar closed at or below the top of the zone • The bar closed at least 0.1 ATR above the top, as an up bar • The body is at least 50% of the bar's range • Volume is at least 1.2 times its 20-bar average (skipped on symbols without volume)

BREAK ▼ — close below the zone: the same rules, mirrored.

Other rules: • Marks are made during the regular session only (09:30–16:00 ET) by default • At least 5 bars between marks • If several zones qualify on the same bar, the highest-scoring zone is used • Optional: mark only strong zones • Optional: hide ▲ marks while the chart is in a downtrend and ▼ marks while in an uptrend (trend = close vs EMA 50, EMA slope, ADX(14) ≥ 20 and DI direction). Off by default.

Hover over a mark to see the zone and its score. HOLD marks are slightly lighter than BREAK marks.

━━━━━━━━━━━━━━━━━━━━ TABLE ━━━━━━━━━━━━━━━━━━━━

• Last mark and how many bars ago it happened • The zone of that mark and its score • Nearest zone above and below price (mid price · score), or "In zone" • Trend state: Trend Up, Trend Down or No trend

*REPAINTING ━━━━━━━━━━━━━━━━━━━━

• Previous day and week values are requested with a one-bar offset inside the request and lookahead on, so only completed days and weeks are read. Historical and realtime values match. • Premarket high / low come from the extended-hours feed on the chart timeframe, without lookahead, and are used from 09:30. • The opening range is used only after it is complete. • Swing highs and lows are confirmed 10 bars after they form (adjustable), like any pivot. • HOLD and BREAK marks are final once the bar closes. • Zones and the ★ are redrawn on the last bar. Round numbers follow the current price.

*SETTINGS ━━━━━━━━━━━━━━━━━━━━

Levels — choose which levels to use, opening range length, swing length.
Zones — merge distance (ATR), minimum zone score, strong zone score.
Zone reactions — hold / break / both, wick and body thresholds, break distance, relative volume, strong zones only, bars between marks, trend filter, regular session only.
Display — number of zones shown, box length, level names, ★ on the strongest zone, table and colors.
Alerts — plain text or Discord webhook JSON.
Defaults are set for US stocks on a 15-minute chart. For 24-hour markets (crypto, forex, futures) turn off "Regular session only"; premarket and opening range levels do not apply there. On daily and higher charts the daily levels, pivots, premarket and opening range are not used.

*ALERTS ━━━━━━━━━━━━━━━━━━━━

• Alert conditions: HOLD ▲, HOLD ▼, BREAK ▲, BREAK ▼ and any mark. Use "Once Per Bar Close". • "Any alert() function call" sends the mark, zone, score and close price as plain text or as a Discord webhook message. • Alerts describe what price did at a zone. They are not instructions to buy or sell.

*HOW IT CAN BE USED ━━━━━━━━━━━━━━━━━━━━

• As a map: see at a glance where several important levels stack up near price. • As a log of reactions: which zones held and which were broken during the session. • Together with your own analysis and risk rules.

A zone that held before can fail the next time, and a break can reverse. Past reactions do not predict future price movement. The default thresholds have not been optimized.

*CREDITS ━━━━━━━━━━━━━━━━━━━━

The idea of clustering key levels into confluence zones and the hold / breakout candle rules come from "Key Level Confluence & Target Zones" by PhenLabs, published under the Mozilla Public License 2.0. This script is a rewrite with a different level set for US stocks (premarket, opening range, previous week), weighted zone scoring, a volume condition for breaks, an optional trend filter and a strongest-zone marker. It contains no trade plans and no performance statistics. Released under the Mozilla Public License 2.0.

━━━━━━━━━━━━━━━━━DISCLAIMER ━━━━━━━━━━━━━━━━━━━━

Educational tool, not investment advice. The script marks price levels and past price reactions only and provides no trade recommendations. Trading involves risk of loss; you are responsible for your own decisions.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.