OPEN-SOURCE SCRIPT
Watchlist Alert

This “Watchlist Alert” indicator is to help traders monitor multiple symbols and notify them whenever a specified target price is reached. Upon loading the script, you can define up to ten ticker symbols along with their individual price targets. The script stores these pairs in a persistent map so that, on each new bar, it retrieves the previous and current close prices for every symbol in your watchlist. If a symbol’s price crosses above or below its target, the script sends an alert (using your chosen alert frequency) and records the timestamp of that event.
Visually, the indicator displays a small table at the top center of your chart. For each watched symbol, it shows four columns: the symbol name, its latest close price (in the chart’s timeframe), the target price you set, and the last time an alert was emitted (formatted as MM.dd HH:mm:ss). By comparing the previous close to the current close and checking against the stored “lastAlertTime,” the script ensures that you receive exactly one alert per crossing event per bar.
In short, the key features are:
Input up to ten symbols with their corresponding float price targets.
Automatically check each symbol’s previous and current close values every bar.
Trigger a single alert when price crosses a target—either upward or downward.
Maintain a map of last alert timestamps to prevent duplicate notifications.
Display a real-time table listing each symbol’s current price, target, and last alert time.
Whenever you need to keep tabs on multiple instruments across different timeframes without manually tracking price levels, simply add this indicator to your chart. It runs in the background and pushes alerts as soon as any watched symbol touches its defined threshold.
Visually, the indicator displays a small table at the top center of your chart. For each watched symbol, it shows four columns: the symbol name, its latest close price (in the chart’s timeframe), the target price you set, and the last time an alert was emitted (formatted as MM.dd HH:mm:ss). By comparing the previous close to the current close and checking against the stored “lastAlertTime,” the script ensures that you receive exactly one alert per crossing event per bar.
In short, the key features are:
Input up to ten symbols with their corresponding float price targets.
Automatically check each symbol’s previous and current close values every bar.
Trigger a single alert when price crosses a target—either upward or downward.
Maintain a map of last alert timestamps to prevent duplicate notifications.
Display a real-time table listing each symbol’s current price, target, and last alert time.
Whenever you need to keep tabs on multiple instruments across different timeframes without manually tracking price levels, simply add this indicator to your chart. It runs in the background and pushes alerts as soon as any watched symbol touches its defined threshold.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.