Skip to content
AlertaChartAlertaScript / docs
AlertaScript / AlertaScript
On this pageExampleFrom an idea to a working scriptDesigned for the way you analyze.Writing with AI

ALERTA SCRIPT

Your analysis. Your rules.

Build indicators, test strategies, and turn your ideas into chart signals with AlertaScript. Start with a few lines, then explore the language and its reference.

Your first indicator in five lines

indicator("My first EMA", overlay=true)length = input.int(20, "Length", minval=1)average = alerta.ta.ema(close, length)plot(average, "EMA", color=color.blue, linewidth=2)plot(close, "Close", color=color.new(color.gray, 80))
01Declare an indicator and display it on the price chart.
02Add an adjustable length input, starting at 20 bars.
03Calculate the exponential moving average of the closing price.
04Draw the EMA as a blue line, two pixels wide.
05Draw the closing price with a transparent gray line for comparison.

From an idea to a working script

01

Indicators and alerts

Build your own calculations, draw them on the chart, and define conditions for alerts.

Read the guide ↗
02

Strategies and backtesting

Express entries and exits in code, then examine the strategy on historical bars.

Read the guide ↗
03

Multiple symbols and timeframes

Bring other symbols and timeframes into your analysis with supported data requests.

Read the guide ↗
04

Order flow data

Work with available volume and order flow data, with each function’s data requirements explained in the reference.

Read the guide ↗

Designed for the way you analyze.

AlertaScript brings code, chart visuals, and familiar technical analysis tools into one workspace. It is an independent language with supported Pine-style syntax and aliases. Consult each reference entry for its actual behavior and limitations.

A clear reference for you and your AI.

Give your AI assistant the documentation links or the machine-readable reference. Ask it to use documented functions and signatures, then review the code and test the result in the editor.

AlertaScript

No results found.

Search by name, alias, or keyword.