Pine Script Trading Alerts: Complete 2026 Guide for TradingView
π π May 9, 2026β± β± 8 min read
By Gold Scalpers Research Team Β· Reviewed for accuracy 2026-07-07
Pine Script trading alerts are notifications triggered by custom logic in TradingView indicators. Pine Script provides two alert mechanisms: the modern alert() function for dynamic messages, and the legacy alertcondition() for static boolean triggers.
Test history vs real-time behavior β they should match
Webhook Integration
Build alert message as JSON or HTML in Pine Script
Click β° β Create Alert in TradingView
Set Condition to "Any alert() function call"
Enable Notifications β Webhook URL
Paste your endpoint URL
Pine Script Alert Limits by Plan
Plan
Active Alerts
Webhooks
Free / Basic
1
β No
Essential
20
β No
Plus
100
β No
Premium
400
β Yes
Pro+
800
β Yes
Common Patterns
Pattern 1: Multi-filter signal (Gold Scalpers style)
signal = isOversold and isVolumeSpike and isRangeFilter and twoGreens
if signal
msg = '{"action":"buy","entry":' + str.tostring(close) + '}'
alert(msg, alert.freq_once_per_bar_close)