Functions
alertcondition()
Declares a condition the platform can offer to the reader. It raises nothing by itself. Unlike `alert`, it must be called at the top level, and its title and message are const-form — fixed when the script is compiled. Left out, both read `na`.
Syntax
alertcondition(series bool condition, const string title, const string message) → void
Arguments
condition required series bool Represents a Boolean expression or logic that determines when the alert should fire. title const string Represents the name the alert condition. message const string Represents the text message that will be shown or sent when the alert is triggered. Return Type
void Example
//@lipi=2
indicator("Volume > 10 Alert", overlay=false)
// Condition
volAbove10 = volume > 10
// Plotting for visual reference
plot(volume, title="Volume", color=color.blue, style=plotStyle.bar)
// Alert condition
alertcondition(volAbove10, title="Volume Greater Than 10", message="Volume has crossed above 10")