OPEN-SOURCE SCRIPT
AlphaX News Filter with Webhook Alerts

AlphaX News Filter — Pre-Scheduled Economic Event Blocker with Webhook Alerts
Block trading during high-impact news events automatically. Get real-time alerts to any webhook, Telegram bot, or automation service the moment a news window opens or clears.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 What This Indicator Does
Pre-schedule up to 4 economic news events (NFP, CPI, FOMC, PCE or any custom label) directly on your chart. Around each event, a configurable block window fires structured JSON alerts and shades your chart red so you never accidentally enter a trade into a volatile news spike.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🗓️ Pre-Scheduled Events
Enter the exact date and time of any economic release. Each event has its own enable/disable toggle, custom label, and timestamp. Times display in your chart's local timezone with no UTC confusion.
⏱️ Configurable Block Window
Set a symmetric buffer (5–120 minutes, default 18 min) applied both before and after each event. Covers the pre-release positioning freeze and the post-release volatility tail in one setting.
🔔 Structured JSON Alerts — Webhook Ready
These JSON payloads plug directly into 3Commas, Alertatron, WunderTrading, Telegram bots, n8n, Make, Zapier, or any custom webhook endpoint to pause and resume your bots automatically.
📊 Visual Chart Overlays
🔴 Red background shading covers the entire block window on the chart
📍 A dashed vertical line marks the exact moment of each scheduled event
🏷️ A label tag drops from the candle high so you spot events instantly on historical review
🖥️ Live Status Table — Dark Theme, Bottom Right
A persistent HUD shows all 4 events at a glance with label, date/time in chart timezone, and live status:
✅ CLEAR — no news window active
🔴 BLOCKED — inside a news block window
🟡 WAITING — event scheduled, not yet triggered
⚫ OFF — event disabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Use
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
Supports up to 4 simultaneous events
Alert fires once per bar on state transition — no alert spam
All times render in chart timezone — no manual UTC conversion needed
Compatible with all asset classes: Forex, Futures, Crypto, Indices
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who take news risk seriously.
Block trading during high-impact news events automatically. Get real-time alerts to any webhook, Telegram bot, or automation service the moment a news window opens or clears.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 What This Indicator Does
Pre-schedule up to 4 economic news events (NFP, CPI, FOMC, PCE or any custom label) directly on your chart. Around each event, a configurable block window fires structured JSON alerts and shades your chart red so you never accidentally enter a trade into a volatile news spike.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🗓️ Pre-Scheduled Events
Enter the exact date and time of any economic release. Each event has its own enable/disable toggle, custom label, and timestamp. Times display in your chart's local timezone with no UTC confusion.
⏱️ Configurable Block Window
Set a symmetric buffer (5–120 minutes, default 18 min) applied both before and after each event. Covers the pre-release positioning freeze and the post-release volatility tail in one setting.
🔔 Structured JSON Alerts — Webhook Ready
- Two alert types fire automatically on state transitions:
- Block entered: {"action":"NEWS_BLOCK","mins":18,"event":"NFP"}
- Block cleared: {"action":"NEWS_CLEAR"}
These JSON payloads plug directly into 3Commas, Alertatron, WunderTrading, Telegram bots, n8n, Make, Zapier, or any custom webhook endpoint to pause and resume your bots automatically.
📊 Visual Chart Overlays
🔴 Red background shading covers the entire block window on the chart
📍 A dashed vertical line marks the exact moment of each scheduled event
🏷️ A label tag drops from the candle high so you spot events instantly on historical review
🖥️ Live Status Table — Dark Theme, Bottom Right
A persistent HUD shows all 4 events at a glance with label, date/time in chart timezone, and live status:
✅ CLEAR — no news window active
🔴 BLOCKED — inside a news block window
🟡 WAITING — event scheduled, not yet triggered
⚫ OFF — event disabled
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
- 🤖 Algo and bot traders — send NEWS_BLOCK to pause strategies, resume on NEWS_CLEAR
- 📈 Semi-manual traders — visual and alert reminder so you never trade blindly into NFP or CPI
- 📢 Telegram signal groups — auto-broadcast news warnings to your subscribers
- 🛡️ Risk managers — enforce a rule-based news blackout across a session
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Use
- Add the indicator to any chart and timeframe
- Set your block window (minutes before and after each event)
- Enter each upcoming news event's date, time, and label in the inputs
- Enable or disable individual events with the toggle
- Create a TradingView alert on this indicator and set your webhook URL
- The alert message is pre-filled as JSON — point it at your endpoint
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
Supports up to 4 simultaneous events
Alert fires once per bar on state transition — no alert spam
All times render in chart timezone — no manual UTC conversion needed
Compatible with all asset classes: Forex, Futures, Crypto, Indices
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who take news risk seriously.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
🌐 alphax.trading
Institutional Grade Signals --> Engineered for Retail
💎ᴠɪᴘ tradingview.com/v/TaXohZvb/
[ A L P H A X ] PRIME - Premium Signal Engine
🔢 alphax.trading/resources/calculators
AlphaX Calculators
Institutional Grade Signals --> Engineered for Retail
💎ᴠɪᴘ tradingview.com/v/TaXohZvb/
[ A L P H A X ] PRIME - Premium Signal Engine
🔢 alphax.trading/resources/calculators
AlphaX Calculators
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
🌐 alphax.trading
Institutional Grade Signals --> Engineered for Retail
💎ᴠɪᴘ tradingview.com/v/TaXohZvb/
[ A L P H A X ] PRIME - Premium Signal Engine
🔢 alphax.trading/resources/calculators
AlphaX Calculators
Institutional Grade Signals --> Engineered for Retail
💎ᴠɪᴘ tradingview.com/v/TaXohZvb/
[ A L P H A X ] PRIME - Premium Signal Engine
🔢 alphax.trading/resources/calculators
AlphaX Calculators
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.