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

Architecture

How Vela Pro composes features, domain modules, standalone widgets, and backend ports on top of Vela's open-source core.

View as Markdown

Vela Pro is an extension suite that registers chart types, renderer layers, panels, and scripting engines into Vela's open-source core through the core's public plugin SDK (@luxalgo/vela/plugin). Rather than forking or replacing the core, Vela Pro composes four architectural concepts on top of VelaWorkspace:

import { VelaWorkspace } from '@luxalgo/vela/workspace';
import { BinanceProvider } from '@luxalgo/vela/providers/binance';
import { enableVelaPro } from '@luxalgo/vela-pro';
import { trading, tradingController, type Broker } from '@luxalgo/vela-pro-trading';

declare const myBroker: Broker;

enableVelaPro({
    replay: { defaultSpeed: 2 },
    plugins: [trading({ broker: myBroker })],
});

const workspace = new VelaWorkspace('#chart', {
    layout: false,
    symbol: 'BTCUSDT',
    providers: { binance: () => new BinanceProvider() },
});

const account = tradingController();

In this example, replay configures a built-in feature, trading() registers an opt-in module connected to your brokerage via the Broker port, tradingController() returns your application's programmatic handle to that module, and VelaWorkspace and BinanceProvider come directly from the core.

Building blocks

ConceptRoleExamplesConfiguration surface
FeatureExtends every chart or workspace shellFootprint and TPO chart types, order-flow indicators, bar replay, Pine Script® engine and code editor, Strategy Tester, side rail, bottom dockOptions on enableVelaPro() or standalone enable* functions
ModuleDomain panel shipped in a dedicated workspace packageWatchlist, Alerts, and Order Book (enabled by default); Trading, Journal, and Calendar (opt-in)alerts, watchlist, and orderBook options or the plugins array on enableVelaPro()
WidgetStandalone UI component backing a module's panelcreateWatchlist, createOrderBook, createAlertsList, createOrderTicket, createTradingPanel, createJournalPanel, createCalendarMounted directly into custom DOM layouts inside or outside a workspace
PortTyped interface connecting a module to your backendBroker, AlertsBackend, JournalStore, WatchlistStorage, QuoteSource, CalendarSourcePassed inside the corresponding module's options object

In TypeScript APIs, modules use the plugin surface (plugins on enableVelaPro() and definePlugin from @luxalgo/vela-pro/plugin).

Modules communicate with one another through typed plugin APIs rather than direct package coupling, so each module operates independently and unlocks cross-module workflows when companion modules are installed. For example, installing Trading enables order placement and cancellation directly on the Order Book's DOM ladder and allows the Journal module to record fills automatically.

Each module package also exports a controller accessor (tradingController(), alertsController(), watchlistController(), journalController(), and calendarController()) for programmatic state reads and actions. Controller functions return null until enableVelaPro() has installed that module.

See Modules overview for module lifecycles, controllers, and ports, and Standalone widgets for mounting module UIs outside a workspace shell.

Composition over the plugin SDK

Vela Pro integrates with the core exclusively through @luxalgo/vela/plugin registries for chart types, renderer layers, native indicators, topbar and toolbar actions, side panels, and default scripting engines. That design has four direct consequences for your application:

  • Unchanged core APIs: VelaWorkspace, DataProvider, chart.drawings, and state serialization (getState(), applyState()) belong to the core without modification, so existing core integrations and documentation apply directly.
  • Shared extension registries: Your application can register custom chart types, indicators, actions, and panels into the same SDK registries alongside Vela Pro.
  • Single @luxalgo/vela instance: Vela Pro registers capabilities into the @luxalgo/vela instance it imports, and VelaWorkspace reads from the instance it was constructed from. See Installation to verify deduplication with npm ls @luxalgo/vela.
  • Pre-construction registration: VelaWorkspace reads SDK registries during construction, so enableVelaPro() (or individual enablers) must run once before creating the first workspace. See Quickstart for initialization rules.

Runtime model and service seams

All rendering, native indicators, Pine Script® execution (one Web Worker per chart by default), strategy backtesting, and module state machines execute client-side in the browser. Vela Pro includes no proprietary server component; when no external backends are supplied, state persists in localStorage and Trading runs against PaperBroker.

External services connect through either the core's DataProvider interface (plus optional order-flow and market-depth extensions) or a module's typed port:

External serviceInterface seamConsumed byFallback when omitted
Market dataDataProviderEvery chartBuilt-in public providers (BinanceProvider, CoinbaseProvider, HyperliquidProvider)
Order flowFootprintFeed on the providerFootprint chart type and order-flow indicatorsNo footprint cells rendered; order-flow indicators omitted from the indicator menu
Market depthDepthFeed on the providerOrder Book moduleEmpty Order Book panel
Live quotesQuoteSourceWatchlist moduleProviderQuotes reading from the chart's registered providers
BrokerageBrokerTrading modulePaperBroker simulated paper trading account
Alert persistenceAlertsBackendAlerts moduleLocalAlertsBackend backed by localStorage
Watchlist persistenceWatchlistStorageWatchlist moduleLocalWatchlistStorage backed by localStorage
Journal persistenceJournalStoreJournal moduleLocalJournalStore backed by localStorage
Economic and corporate eventsCalendarSourceCalendar moduleEmpty Calendar panel
Workspace layout storageCore storage optionVelaWorkspacelocalStorage when persist is enabled

The indicator menu is the only Vela Pro feature that queries a remote LuxAlgo endpoint by default, fetching public catalog metadata from https://app.luxalgo.com. See Indicator menu to configure proxy routing or disable remote catalog tabs.

Package overview

PackageContentspackage.json license field
@luxalgo/velaOpen-source core: chart engine, VelaWorkspace, public providers, and plugin SDKApache-2.0
@luxalgo/vela-uiOpen-source UI component kit used by the core shell and Vela Pro panelsApache-2.0
@luxalgo/vela-proVela Pro features and enableVelaPro()SEE LICENSE IN LICENSE.md
@luxalgo/vela-pro-alerts, -dom, -watchlistDefault domain modules (dom is the Order Book module)SEE LICENSE IN LICENSE.md
@luxalgo/vela-pro-trading, -journal, -calendarOpt-in domain modulesSEE LICENSE IN LICENSE.md
@luxalgo/vela-pinetsPine Script® ScriptingEngine adapter registered by Vela ProAGPL-3.0-only
pinetsPine Script® transpiler and execution runtime used by @luxalgo/vela-pinetsAGPL-3.0-only
monaco-editorCode editor bundled inside the Pine code editor panelMIT

The LICENSE.md file in @luxalgo/vela-pro and each @luxalgo/vela-pro-* module references the Developer License Agreement. Application code imports from @luxalgo/vela/* subpaths for workspace and core APIs, @luxalgo/vela-pro for feature enablers and types, @luxalgo/vela-pro-<module> for module factories, controllers, widgets, and ports, and @luxalgo/vela-pro/plugin when authoring Custom modules.

On this page