OPEN-SOURCE SCRIPT
已更新 ESPI Front-Runner

📰 ESPI Front-Runner — "The Leak"
Detects unusual price and volume behavior in the window BEFORE corporate filings (ESPI on Warsaw Stock Exchange) or broker recommendations are published. The footprint of someone trading on information that isn't public yet — front-running, pre-disclosure leaks, or coordinated positioning before a known catalyst.
---
🧠 WHY IT WORKS
---
If price moves in the news direction before the news goes public, someone knew. Insiders, leaked drafts circulating in narrow client circles, recommendations distributed before official publication, sell-side desks tipping favored accounts — the channels are many, the footprint is the same. Price drifts toward the eventual reaction, volume builds quietly, and when the announcement finally hits, half the move is already done. This indicator anchors the analysis to the known event time and quantifies what happened in the run-up.
---
🔍 WHAT IT DETECTS
---
For each event you paste, the script computes three windows and a baseline:
📐 PRE — N bars before the event (did price already move?)
📐 POST — short reaction immediately after (T+1)
📐 POST EXT — extended reaction window (T+5, used to detect reload patterns)
📊 BASELINE — N bars further back (what does "normal" volume look like?)
Then it classifies the event into one of 11 anomaly types based on price moves, volume ratios, sentiment alignment, and cluster context.
---
🎨 ANOMALY CLASSES
---
🌊 SYSTEMATIC — 3+ same-direction confirmed leaks in a cluster (systemic, not isolated)
🎓 REC LEAK — price aligned with broker recommendation direction (event type R)
🔄 RELOAD — pre+, post-, post EXT+ with elevated volume (insider took profit and is reloading on pullback — NOT a sell-the-news)
🎯 CONFIRMED LEAK — pre-move aligned with sentiment of the filing
↔ CONTRARIAN — pre-move opposite to sentiment (fakeout, hedge, mispricing)
🐢 SLOW LEAK — small short-term move but large multi-week drift from a retroactive anchor (slow accumulation candidate)
🔴 PUMP LEAK — coordinated buying before event (sentiment unknown)
🟣 DUMP LEAK — coordinated selling before event (sentiment unknown)
🟡 STEALTH VOL — high volume without price movement (quiet positioning)
🟢 POST REACTION — quiet pre, large post (healthy reaction, no front-running)
⚪ ESPI — nothing interesting (standard event with no anomaly)
---
📊 HOW IT LOOKS
---
🟢 Green vertical line — positive ESPI filing
🔴 Red vertical line — negative ESPI filing
🟡 Yellow vertical line — neutral filing
🟣 Purple dashed line — broker recommendation (event type R)
🟥 Red box — pre-event window
🟩 Green box — post-event window
🟦 Cyan box — post-extended window (optional, for RELOAD analysis)
Each event gets a colored label with the anomaly class, sentiment tag (POS/NEG/NEU), and metrics: pre/post/post-ext returns and volume ratios. Multiple events on the same bar are aggregated into one label with a counter (e.g. "(3 ESPI)").
A summary label in the top-right corner shows aggregate stats: total events, leak count, reload count, stealth count, contrarian count.
---
📥 INPUT FORMAT
---
Paste lines into the Events field, one per line:
<unix> [sentiment] [type] # comment
Examples:
1776668400 +1 R # Trigon target 11.50 PLN
1776259860 -1 E # ESPI 23/2026 Q1 loss
1776259860 +1 # contract 50M PLN
1776259860 # bare timestamp — defaults to neutral, ESPI
Sentiment: -1 / 0 / +1 (optional, default 0)
Type: E (filing) or R (recommendation) — optional, default E
🐍 GET THE EVENTS — Companion Python scraper
Get the scraper here: pastebin.com/2XPrvH8G
Save as espi_scraper.py, then:
pip3 install requests beautifulsoup4
# Find company ID on biznes.pap.pl
python3 espi_scraper.py --list-companies "polimex"
# Generate paste-ready output for selected years (sentiment auto-classified
# from filing title, output ready to paste into the Events field)
python3 espi_scraper.py <ID> 2026 2025 2024 2023 --paste
# Pipe straight to clipboard
python3 espi_scraper.py <ID> 2026 2025 --paste | pbcopy # macOS
python3 espi_scraper.py <ID> 2026 2025 --paste | xclip # Linux
Then in TradingView: indicator settings → Events field → paste.
For broker recommendations (event type R), add lines manually with the
publication date — those aren't scraped.
---
⚙️ INPUTS
---
Pre / Post / Post EXT bars — analysis windows (HTF or auto-converted from minutes)
Baseline bars — background for volume ratio (default 20)
Recommendation pre-window multiplier — rec leaks earlier, default ×5 vs ESPI
Volume × baseline threshold — default 3.0×
Return % threshold — default 0.5%
Cluster N / K — search window and SYSTEMATIC threshold (default 3-of-5)
Slow leak anchor — optional retroactive anchor N bars back (default off)
Label size — tiny / small / normal (default) / large / huge
---
🎯 WHAT TO LOOK FOR
---
A single CONFIRMED LEAK is anecdotal. Look for clusters — that's what the SYSTEMATIC tag is for. Three or more same-direction leaks within five recent events on the same ticker is the strongest pattern this indicator surfaces.
REC LEAK with a 5-15 day pre-window means a recommendation circulated before publication. If the rally already covered most of the analyst's price target before the report went public, the report itself is no longer the catalyst — it's the exit liquidity.
RELOAD pattern (pre+/post-/post EXT+ with elevated post-ext volume) tells you the initial sell-off was a partial profit-take, not full distribution. Insiders who reload on the pullback are still long. The opposite — pre+/post-/post EXT- with collapsing volume — is a real sell-the-news.
SLOW LEAK with a 10-20 bar lookback catches multi-week accumulation that the standard pre-window misses. Useful for spotting recommendation front-running where the rally builds over a month, not days.
---
💡 PRO TIPS
---
Combine with VW Drift (Silent Accumulator) — a cluster of CONFIRMED LEAKs on a stock also flagging ACCUM means the same actor is positioning patiently AND timing news catalysts. Strongest dual signal in the toolkit.
Combine with Volume Profile Change Detector — a new cluster forming during the pre-window of a confirmed leak tells you the position is being built right now, at a specific price level.
Combine with AutomatOff — algos pulling away in the bars right before publication is a tell. Someone in the know is clearing the field.
Sentiment classification is rule-based on the filing title. Complex annexes (contract value increase vs cession vs scope change) can be misclassified. Edit sentiment manually in your paste if you spot one.
Broker recommendations are not publicly scraped — enter them manually with the publication date as event type R. The ×5 pre-window multiplier compensates for earlier circulation.
---
🌍 BUILT FOR
---
Warsaw Stock Exchange (GPW). The companion Python scraper (linked above) pulls filings from biznes.pap.pl and outputs the paste format directly. The indicator itself is market-agnostic — paste any event timestamps from any source on any ticker.
---
⚠️ DISCLAIMER
---
Research tool. Anomaly classifications are time correlations, not proof of manipulation. A single CONFIRMED LEAK is not a trade signal. Look for clusters, repeats, and confirmation across multiple toolkit indicators. Past performance doesn't guarantee future results. Not financial advice.
---
Open source. Part of the Smart Money Hunter / GPW Anomaly Detection toolkit.
Detects unusual price and volume behavior in the window BEFORE corporate filings (ESPI on Warsaw Stock Exchange) or broker recommendations are published. The footprint of someone trading on information that isn't public yet — front-running, pre-disclosure leaks, or coordinated positioning before a known catalyst.
---
🧠 WHY IT WORKS
---
If price moves in the news direction before the news goes public, someone knew. Insiders, leaked drafts circulating in narrow client circles, recommendations distributed before official publication, sell-side desks tipping favored accounts — the channels are many, the footprint is the same. Price drifts toward the eventual reaction, volume builds quietly, and when the announcement finally hits, half the move is already done. This indicator anchors the analysis to the known event time and quantifies what happened in the run-up.
---
🔍 WHAT IT DETECTS
---
For each event you paste, the script computes three windows and a baseline:
📐 PRE — N bars before the event (did price already move?)
📐 POST — short reaction immediately after (T+1)
📐 POST EXT — extended reaction window (T+5, used to detect reload patterns)
📊 BASELINE — N bars further back (what does "normal" volume look like?)
Then it classifies the event into one of 11 anomaly types based on price moves, volume ratios, sentiment alignment, and cluster context.
---
🎨 ANOMALY CLASSES
---
🌊 SYSTEMATIC — 3+ same-direction confirmed leaks in a cluster (systemic, not isolated)
🎓 REC LEAK — price aligned with broker recommendation direction (event type R)
🔄 RELOAD — pre+, post-, post EXT+ with elevated volume (insider took profit and is reloading on pullback — NOT a sell-the-news)
🎯 CONFIRMED LEAK — pre-move aligned with sentiment of the filing
↔ CONTRARIAN — pre-move opposite to sentiment (fakeout, hedge, mispricing)
🐢 SLOW LEAK — small short-term move but large multi-week drift from a retroactive anchor (slow accumulation candidate)
🔴 PUMP LEAK — coordinated buying before event (sentiment unknown)
🟣 DUMP LEAK — coordinated selling before event (sentiment unknown)
🟡 STEALTH VOL — high volume without price movement (quiet positioning)
🟢 POST REACTION — quiet pre, large post (healthy reaction, no front-running)
⚪ ESPI — nothing interesting (standard event with no anomaly)
---
📊 HOW IT LOOKS
---
🟢 Green vertical line — positive ESPI filing
🔴 Red vertical line — negative ESPI filing
🟡 Yellow vertical line — neutral filing
🟣 Purple dashed line — broker recommendation (event type R)
🟥 Red box — pre-event window
🟩 Green box — post-event window
🟦 Cyan box — post-extended window (optional, for RELOAD analysis)
Each event gets a colored label with the anomaly class, sentiment tag (POS/NEG/NEU), and metrics: pre/post/post-ext returns and volume ratios. Multiple events on the same bar are aggregated into one label with a counter (e.g. "(3 ESPI)").
A summary label in the top-right corner shows aggregate stats: total events, leak count, reload count, stealth count, contrarian count.
---
📥 INPUT FORMAT
---
Paste lines into the Events field, one per line:
<unix> [sentiment] [type] # comment
Examples:
1776668400 +1 R # Trigon target 11.50 PLN
1776259860 -1 E # ESPI 23/2026 Q1 loss
1776259860 +1 # contract 50M PLN
1776259860 # bare timestamp — defaults to neutral, ESPI
Sentiment: -1 / 0 / +1 (optional, default 0)
Type: E (filing) or R (recommendation) — optional, default E
🐍 GET THE EVENTS — Companion Python scraper
Get the scraper here: pastebin.com/2XPrvH8G
Save as espi_scraper.py, then:
pip3 install requests beautifulsoup4
# Find company ID on biznes.pap.pl
python3 espi_scraper.py --list-companies "polimex"
# Generate paste-ready output for selected years (sentiment auto-classified
# from filing title, output ready to paste into the Events field)
python3 espi_scraper.py <ID> 2026 2025 2024 2023 --paste
# Pipe straight to clipboard
python3 espi_scraper.py <ID> 2026 2025 --paste | pbcopy # macOS
python3 espi_scraper.py <ID> 2026 2025 --paste | xclip # Linux
Then in TradingView: indicator settings → Events field → paste.
For broker recommendations (event type R), add lines manually with the
publication date — those aren't scraped.
---
⚙️ INPUTS
---
Pre / Post / Post EXT bars — analysis windows (HTF or auto-converted from minutes)
Baseline bars — background for volume ratio (default 20)
Recommendation pre-window multiplier — rec leaks earlier, default ×5 vs ESPI
Volume × baseline threshold — default 3.0×
Return % threshold — default 0.5%
Cluster N / K — search window and SYSTEMATIC threshold (default 3-of-5)
Slow leak anchor — optional retroactive anchor N bars back (default off)
Label size — tiny / small / normal (default) / large / huge
---
🎯 WHAT TO LOOK FOR
---
A single CONFIRMED LEAK is anecdotal. Look for clusters — that's what the SYSTEMATIC tag is for. Three or more same-direction leaks within five recent events on the same ticker is the strongest pattern this indicator surfaces.
REC LEAK with a 5-15 day pre-window means a recommendation circulated before publication. If the rally already covered most of the analyst's price target before the report went public, the report itself is no longer the catalyst — it's the exit liquidity.
RELOAD pattern (pre+/post-/post EXT+ with elevated post-ext volume) tells you the initial sell-off was a partial profit-take, not full distribution. Insiders who reload on the pullback are still long. The opposite — pre+/post-/post EXT- with collapsing volume — is a real sell-the-news.
SLOW LEAK with a 10-20 bar lookback catches multi-week accumulation that the standard pre-window misses. Useful for spotting recommendation front-running where the rally builds over a month, not days.
---
💡 PRO TIPS
---
Combine with VW Drift (Silent Accumulator) — a cluster of CONFIRMED LEAKs on a stock also flagging ACCUM means the same actor is positioning patiently AND timing news catalysts. Strongest dual signal in the toolkit.
Combine with Volume Profile Change Detector — a new cluster forming during the pre-window of a confirmed leak tells you the position is being built right now, at a specific price level.
Combine with AutomatOff — algos pulling away in the bars right before publication is a tell. Someone in the know is clearing the field.
Sentiment classification is rule-based on the filing title. Complex annexes (contract value increase vs cession vs scope change) can be misclassified. Edit sentiment manually in your paste if you spot one.
Broker recommendations are not publicly scraped — enter them manually with the publication date as event type R. The ×5 pre-window multiplier compensates for earlier circulation.
---
🌍 BUILT FOR
---
Warsaw Stock Exchange (GPW). The companion Python scraper (linked above) pulls filings from biznes.pap.pl and outputs the paste format directly. The indicator itself is market-agnostic — paste any event timestamps from any source on any ticker.
---
⚠️ DISCLAIMER
---
Research tool. Anomaly classifications are time correlations, not proof of manipulation. A single CONFIRMED LEAK is not a trade signal. Look for clusters, repeats, and confirmation across multiple toolkit indicators. Past performance doesn't guarantee future results. Not financial advice.
---
Open source. Part of the Smart Money Hunter / GPW Anomaly Detection toolkit.
發行說明
bugfix: ESPI events near weekends/holidays no longer disappear. Previously the indicator only drew a label within a narrow 24h UTC window
after the post-EXT period ended — if that window fell on a Saturday, Sunday
or public holiday, no trading bar existed and the event was silently lost.
Now draws on the first available trading bar instead.
Also reduced default Post EXT bars from 5 to 2.
發行說明
fixes and updates 發行說明
v1.1 — Added 10 alert conditions (was zero). One per anomaly class: Systematic Leak, Confirmed Leak, Rec Leak, Reload, Contrarian, Pump, Dump, Stealth Volume, Slow Leak, Any Suspicious. Note: all alerts fire retroactively on the bar when the post-event window closes, not in real time.開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。