📢 Alert Function – Lipi Script (GoCharting)
GoCharting has introduced the alert()
function in Lipi Script, allowing users to generate real-time alerts directly from their custom indicators. This makes it easier to act on critical trading conditions without manually watching the charts.
🚀 What is the alert()
Function?
The alert()
function enables users to trigger an alert from within a Lipi Script when a specific condition is met — such as RSI crossing a level, price breaking a resistance zone, or any custom logic.
This is especially useful for algorithmic and discretionary traders who want to be notified instantly when their conditions are fulfilled.
✍️ Basic Usage Example
Here’s an example where we create an alert when RSI crosses above 70:
indicator("RSI Alert", overlay=false)
rsi = talib.rsi(close, 14)
if talib.crossover(rsi, 70) {
alert("RSI crossed above 70!")
}
📌 How to Use Alerts in GoCharting
🖊️ Write Your Script
- Open the Lipi Script editor and define your conditions using the
alert()
function. - Save and add the script to your chart.
🧭 Open the Alert Widget
- On the GoCharting platform, open the Alert Widget from the right panel or right click on the chart and click on alert.
⚙️ Set Up the Alert
- Choose your script from the list of available indicators.
- Select the alert message (defined in your script).
- Configure notification preferences (sound, popup, webhook, etc.).
- Set it live.
🚨 Receive Alerts Instantly
- Whenever your script’s condition is met, the alert will trigger automatically.
✅ Key Notes
alert()
runs every bar and triggers when the condition inside it is met.- You can use multiple
alert()
calls for different scenarios within one script. - Works with real-time data for immediate notifications.
- Supports both overlay and non-overlay indicators.
🔔 Use Case Ideas
- RSI or MACD crossovers
- Price breaking support/resistance
- Custom strategy confirmation signals
- Candle pattern detection