Lipi Reference
Lipi

Functions

alert()

Raises an alert from inside your own logic, with a message you build. It is the one output-shaped function with no top-level rule, so it may be called inside a branch — which is what makes "alert me when this happens" expressible. It fires at most once per bar, only on realtime bars, and only when the script is running as an alert; on historical bars it does nothing.

Syntax

                alert(series string message) → void
              

Arguments

message required series string The custom text message shown in the alert notification

Return Type

void

Example


          //@lipi=2
indicator("RSI Alert", overlay=false)

rsi = talib.rsi(close, 14)

if talib.crossover(rsi, 70) {
    alert("RSI crossed above 70!")
}