Overview
Indicator types supported by Vela Pro, how each one executes, and how to add them to a chart.
Vela Pro charts run Pine Script® scripts, native indicators written in TypeScript, and scripts executed by a custom scripting engine. All three indicator types share the same legend, settings dialog, and pane layout.
import { VelaWorkspace } from '@luxalgo/vela/workspace';
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
import { enableVelaPro } from '@luxalgo/vela-pro';
enableVelaPro();
const workspace = new VelaWorkspace('#chart', {
layout: false,
symbol: 'BTCUSDT',
timeframe: '60',
live: true,
providers: { binance: () => new BinanceProvider() },
});
const chart = workspace.chart;
// A native indicator computed directly by the chart.
chart.addNativeIndicator('rsi', { inputs: { length: 21 } });
// A Pine Script® source executed by the default Pine engine.
const ema = chart.addIndicator(`//@version=6
indicator("EMA 50", overlay=true)
plot(ta.ema(close, 50), color=color.orange)`);
ema.on('error', ({ error }) => console.warn(error.message));Both methods return an IndicatorHandle immediately. Rendered values appear once the first computation finishes, at which point the handle emits its ready event.
Indicator types
| Type | What you author | Execution runtime | How it is added |
|---|---|---|---|
| Pine Script® script | A Pine Script® v5 or v6 source string | The Pine engine (@luxalgo/vela-pinets, built on PineTS), registered as each chart's default engine by enableVelaPro() | chart.addIndicator(source), the indicator menu, the code editor, or an indicator manifest entry |
| Native indicator | A TypeScript descriptor registered with registerNativeIndicator | The chart directly, with no scripting engine | chart.addNativeIndicator(type), or the Basic and Order flow tabs in the indicator menu |
| Custom language script | Source code in your language and a ScriptingEngine implementation | Your custom engine, registered under a language key | chart.addIndicator(source, { language }), a manifest entry, or a custom menu section |
Pine Script® suits user-authored indicators and strategies; see Pine Script® with PineTS for engine configuration. Native indicators run inside your application bundle. Both the built-in studies from Vela's open-source core and Vela Pro's order-flow indicators use this mechanism; see Built-in indicators for the full catalog. If your platform has an existing scripting language or remote calculation service, you can integrate it alongside Pine Script® as described in Custom runtimes.
Regardless of how an indicator is computed, its output is expressed in the same visual model of series, fills, lines, labels, boxes, and tables. See Charting adapters for details on the output model.
Adding indicators
| Entry point | What it adds | Documentation |
|---|---|---|
chart.addIndicator(source, options?) | A script running on the chart's default engine or on the engine matching language | Pine Script® with PineTS |
chart.addNativeIndicator(type, options?) | A registered native indicator type | Custom indicators |
| Indicator menu | Built-in studies, order-flow indicators, LuxAlgo library scripts, and custom catalog sections | Indicator menu |
| Code editor Run button | The Pine Script® source open in the editor | Pine code editor |
indicators workspace option (manifest) | Default scripts attached to every new chart | Custom indicators |
A workspace configured with persist: true automatically restores saved native indicators on reload. If your initialization code also calls addNativeIndicator on every page load, another duplicate instance is added on each reload for any type that allows multiple instances. Call addNativeIndicator in response to user actions, or check chart.indicators() before adding one. See Indicator persistence for details on what each indicator type saves.
Legend, settings, and panes
Every mounted indicator displays a row in the legend of its target pane. Hovering over the row reveals actions to toggle visibility, open settings, remove the indicator, or select Move to to move the indicator into another pane or merge it with an existing one. On native and Pine Script® legend rows, Vela Pro adds a star button to save the indicator in the menu's favorites. Pine Script® rows also include an Edit code button that loads the script into the code editor.
The settings dialog is generated automatically from the indicator's input schema, whether declared via input.* calls in a script or inputsSchema() on a native descriptor. Strategy scripts also receive a Properties tab for declaration parameters such as initial capital.
Overlay indicators render directly on the price pane, while non-overlay indicators open a separate pane below the price pane. Users can reorder, collapse, or maximize panes using the pane header controls, and resize panes by dragging the divider between them. You can perform the same actions programmatically through chart.panes and the IndicatorHandle methods (setVisible, moveTo, setInput, remove); see the core API reference.
In this section
Built-in indicators
Classic studies from the core, native order-flow indicators, and LuxAlgo library families.
Indicator menu
Menu layout, search, user favorites, and custom catalog tabs.
Pine Script® with PineTS
Engine configuration, library resolvers, footprint feeds, and programmatic script execution.
Custom indicators
Authoring Pine Script® studies, workspace manifests, and TypeScript native indicators.
Pine code editor
Editor configuration and the controller API for custom save, review, and history workflows.
Custom runtimes
Implementing and registering a custom scripting engine alongside Pine Script®.
Charting adapters
Mapping indicator calculations to series, drawings, custom canvas layers, and chart types.
Events and subscriptions
Access active charts and cells, update symbols, timeframes, and layouts programmatically, and subscribe to workspace, chart, and Vela Pro events.
Built-in indicators
Classic technical studies, native order-flow indicators, and LuxAlgo library families available on Vela Pro charts.