OPEN-SOURCE SCRIPT
Updated

52 Week High/Low Offset Screener

232
Title:
52 Week High/Low Offset Screener

Visibility: Open (recommended) or Protected
Category: Indicator (not overlay)
Companion script: 52 Week High/Low (Current & Offset)
→ After the indicator is published, paste its script URL here in the description
(English NOTES / German HINWEISE).

----- Description (paste below; English first) -----

[A German description follows the English text.]

█ OVERVIEW

This is a Pine Screener companion to “52 Week High/Low (Current & Offset)”.

It scans a watchlist for where price sits relative to a lagged 52-week high/low (default offset: 52 weeks). You can constrain those distances in the script settings and/or with column filters in the Pine Screener.

Same calculation as the chart indicator. This script does not overlay on price; it outputs columns and a Hit flag.

This is a scan helper, not a buy or sell signal.

█ HOW TO RUN THE SCAN

1. Add this script to your Favorites (star). It will not appear in Pine Screener otherwise.
2. Open Products → Screeners → Pine (or tradingview.com/pine-screener/).
3. Choose a watchlist (keep it under 1,000 symbols).
4. Select “52 Week High/Low Offset Screener”.
5. Set the timeframe (daily is typical) and optional distance filters in the script settings.
6. Click Scan.
7. To apply the built-in distance filters, add a column filter: Hit = 1.

Only one Pine script can be used per scan.

█ COLUMNS

• Hit — 1 if all enabled script filters match, otherwise 0
• Distance % nearer offset — distance to the closer of the two offset levels
• Nearer to (1=High, −1=Low)
• Distance % offset high / offset low
• Offset high / Offset low — lagged 52-week levels
• Current 52W high / Current 52W low
• Close

Distance formula:
(close − offset level) / close × 100
Positive = price above that level, negative = below.

█ DISTANCE FILTERS (SCRIPT SETTINGS)

Disabled filters are ignored. All enabled filters must pass for Hit = 1.

• Side: All / only nearer to offset high / only nearer to offset low
• Constrain nearer distance (from % / to %)
• Constrain distance to offset high
• Constrain distance to offset low (DCA-style example: −15 to +8)
• Only below offset low
• Only above offset high

You can also filter on the columns themselves. Numeric filters are literal:

• Distance % offset low < 1 includes +0.08 (slightly above the low) and −16 (below the low)
• Below the offset low only: Distance % offset low < 0
• At least 1% below the low: Distance % offset low < −1
• Within 1% of the low: between −1 and 1

█ ALERT

Alert condition “52W Offset Hit” fires when a symbol matches the script’s distance filters.

█ NOTES

• Uses 52 weekly bars and a weekly offset; the current 52-week high/low includes the developing week.
• Chart companion: “52 Week High/Low (Current & Offset)”.
(Add the published indicator URL here after step 1 of the publishing sequence.)

This script does not generate trading signals and is not investment advice.

--------------------------------------------------------------------------------
DEUTSCH

█ ÜBERBLICK

Das ist der Pine-Screener zum Indikator „52 Week High/Low (Current & Offset)“.

Er scannt eine Watchlist danach, wo der Kurs relativ zu einem zeitversetzten 52-Wochen-Hoch/-Tief steht (Standard-Offset: 52 Wochen). Diese Abstände kannst du in den Skript-Einstellungen und/oder über Spaltenfilter im Pine Screener eingrenzen.

Dieselbe Berechnung wie der Chart-Indikator. Dieses Skript liegt nicht über dem Kurs; es liefert Spalten und ein Hit-Flag.

Das ist eine Scan-Hilfe, kein Kauf- oder Verkaufssignal.

█ SCAN AUSFÜHREN

1. Dieses Skript zu den Favoriten hinzufügen (Stern). Sonst erscheint es nicht im Pine Screener.
2. Products → Screeners → Pine öffnen (oder tradingview.com/pine-screener/).
3. Eine Watchlist wählen (unter 1.000 Symbole halten).
4. „52 Week High/Low Offset Screener“ auswählen.
5. Timeframe setzen (typisch Tageschart) und optional die Abstandsfilter in den Skript-Einstellungen.
6. Scan klicken.
7. Um die eingebauten Abstandsfilter anzuwenden, Spaltenfilter setzen: Hit = 1.

Pro Scan kann nur ein Pine-Skript verwendet werden.

█ SPALTEN

• Hit — 1, wenn alle aktivierten Skript-Filter zutreffen, sonst 0
• Distance % nearer offset — Abstand zum näheren der beiden Offset-Niveaus
• Nearer to (1=High, −1=Low)
• Distance % offset high / offset low
• Offset high / Offset low — zeitversetzte 52-Wochen-Niveaus
• Current 52W high / Current 52W low
• Close

Abstandsformel:
(Schlusskurs − Offset-Niveau) / Schlusskurs × 100
Positiv = Kurs über diesem Niveau, negativ = darunter.

█ ABSTANDSFILTER (SKRIPT-EINSTELLUNGEN)

Deaktivierte Filter werden ignoriert. Alle aktivierten Filter müssen für Hit = 1 gleichzeitig erfüllt sein.

• Side: All / only nearer to offset high / only nearer to offset low
• Constrain nearer distance (from % / to %)
• Constrain distance to offset high
• Constrain distance to offset low (DCA-Beispiel: −15 bis +8)
• Only below offset low
• Only above offset high

Du kannst auch direkt über die Spalten filtern. Numerische Filter gelten wörtlich:

• Distance % offset low < 1 enthält +0,08 (knapp über dem Tief) und −16 (unter dem Tief)
• Nur unter dem Offset-Tief: Distance % offset low < 0
• Mindestens 1 % unter dem Tief: Distance % offset low < −1
• Höchstens 1 % vom Tief entfernt: zwischen −1 und 1

█ ALERT

Die Alert-Bedingung „52W Offset Hit“ löst aus, wenn ein Symbol die Abstandsfilter des Skripts erfüllt.

█ HINWEISE

• Nutzt 52 Wochenkerzen und einen Wochen-Offset; das aktuelle 52-Wochen-Hoch/-Tief bezieht die laufende Woche ein.
• Chart-Begleiter: „52 Week High/Low (Current & Offset)“.
(Nach der Indikator-Veröffentlichung hier die Skript-URL einfügen.)

Dieses Skript erzeugt keine Handelssignale und ist keine Anlageberatung.
Release Notes
Indicator-URL
52 Week High/Low (Current & Offset)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.