Vela, our next-generation charting platform, is live at vela.luxalgo.com.
LuxAlgo

Overview

Indicator types supported by Vela Pro, how each one executes, and how to add them to a chart.

View as Markdown

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

TypeWhat you authorExecution runtimeHow it is added
Pine Script® scriptA Pine Script® v5 or v6 source stringThe 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 indicatorA TypeScript descriptor registered with registerNativeIndicatorThe chart directly, with no scripting enginechart.addNativeIndicator(type), or the Basic and Order flow tabs in the indicator menu
Custom language scriptSource code in your language and a ScriptingEngine implementationYour custom engine, registered under a language keychart.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 pointWhat it addsDocumentation
chart.addIndicator(source, options?)A script running on the chart's default engine or on the engine matching languagePine Script® with PineTS
chart.addNativeIndicator(type, options?)A registered native indicator typeCustom indicators
Indicator menuBuilt-in studies, order-flow indicators, LuxAlgo library scripts, and custom catalog sectionsIndicator menu
Code editor Run buttonThe Pine Script® source open in the editorPine code editor
indicators workspace option (manifest)Default scripts attached to every new chartCustom 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

On this page