SuperTrend - Custom Screener and Dynamic Alerts
Jul 1, 2021

The SuperTrend - Custom Screener and Dynamic Alerts tool provides a comprehensive multi-asset monitoring system designed to track SuperTrend signals across up to 20 different symbols simultaneously. It aims to streamline day trading workflows by combining visual dashboard data with dynamic, information-rich alerts that include price action context and daily performance metrics.
Usage
The script functions as both an on-chart indicator and a multi-symbol scanner. Users can monitor a primary chart while the background screener tracks signals across the user-defined symbol list.
- Dashboards: Two tables are displayed on the chart. The top table lists symbols currently triggering a "Buy" (crossover) signal, while the bottom table lists symbols triggering a "Sell" (crossunder) signal.
- Alerts: When a SuperTrend crossover or crossunder occurs on any tracked symbol, a summary alert is triggered. These alerts include the symbol ticker, current closing price, the percentage change from the previous day's close, and the previous day's high and low prices.
- Active Monitoring: The dashboard provides real-time OHLC data and percentage changes for tracked assets, allowing traders to assess volatility and range without switching timeframes or charts.
Details
The script utilizes the ta.supertrend function to identify trend shifts. It leverages request.security to fetch data for external symbols and daily timeframe metrics (High, Low, Close) to calculate the percentage change relative to the previous day's close.
Key implementation details:
- Concatenated Alerts: To reduce alert fatigue, signals are batched. If multiple assets trigger a signal on the same bar, they are sent in a single consolidated notification.
- Global Scope Logic: The screening logic is handled within a function designed to prevent mutable variable errors, ensuring stable execution even with many monitored assets.
- Data Accuracy: The screener uses
lookahead = barmerge.lookahead_onfor daily reference prices to ensure the previous day's High and Low are correctly referenced for current trading sessions.
Settings
SuperTrend Configuration
- Multiplier: The factor used to calculate the ATR-based offset for the SuperTrend line. Higher values result in fewer, more significant signals.
- Period: The ATR length used for the SuperTrend calculation.
Symbol Selection
- Symbol 1 - 13: Input fields to specify the tickers for the screener to monitor. The script also automatically monitors the current chart symbol.
FAQ
How do I access SuperTrend - Custom Screener and Dynamic Alerts?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
How many stocks can I monitor at once?
The current implementation supports up to 13 custom symbols in the inputs, plus the ticker of the chart the indicator is loaded on.
Why do I only receive alerts on bar close?
To ensure signal validity and prevent "repainting" or false triggers during volatile price movement, alerts are configured to trigger only once the candle has confirmed its close.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.