Glossary
Alphabetical reference for terms used throughout the OpenAlgo Charts documentation. Each entry links to the page where the concept is covered in depth.
Data model
Bar
The fundamental price unit. A Bar has a time (UTC seconds integer), open, high,
low, close, and an optional volume. Every series type — candlestick, line, area,
histogram, and all transform types — is built on this same shape; line and area series
simply read the close field.
See also: Core Concepts, Data Loading
Whitespace
A data point with only a time field and no OHLC or value. It reserves a logical index
on the shared time axis, causing the renderer to break the line at that position instead
of interpolating across the gap.
See also: Core Concepts, Series and Styling
UTC seconds
The library’s universal time unit: a plain integer counting seconds since the Unix epoch. Feed adapters convert IST strings and epoch-millisecond timestamps to UTC seconds at the boundary so application code never handles timezones internally.
See also: Core Concepts, Data Feeds
Line point
A single-value data point for line, area, baseline, and step series: { time, value }.
The value maps to the close coordinate. Internally the engine stores it as a Bar with
open, high, low, and close all equal to value.
See also: Series and Styling
Time axis
Gapless time axis
Instead of placing bars at x positions proportional to their timestamps, the engine
assigns each bar the next sequential integer index and places it at index * barSpacing.
Non-trading periods (weekends, holidays, overnight breaks) have no index, so they produce
no blank space on screen. All panes share this one logical index space and stay aligned
bar-for-bar.
See also: Core Concepts, Scales and Panes
Logical index
The integer position assigned to each distinct timestamp across all series by the
DataLayer. Index 0 is the oldest bar; baseIndex (length - 1) is the newest. The
TimeScale maps logical index to x pixel using index * barSpacing, not the wall-clock
distance between timestamps.
See also: Core Concepts
Bar spacing
The width in CSS pixels allocated to each bar on the time axis. Configurable via
TimeScaleOptions.barSpacing (default 8 px, range 1..80 px). Zooming changes bar
spacing; panning changes the right offset without affecting spacing.
See also: Scales and Panes
Right offset
The number of empty bar-widths kept to the right of the newest bar. A positive right
offset leaves breathing room at the right edge; a negative value scrolls the chart past
the newest bar. Configured via TimeScaleOptions.rightOffset (default 4).
See also: Scales and Panes
Visible range / logical range
The range of logical indices currently visible on screen, expressed as { from, to }
where both values are fractional. The TimeScale.visibleRange() method returns this;
pan and zoom events carry both the logical range and the corresponding UTC-second
timestamps.
See also: Scales and Panes, Events
Time scale
The shared x-axis object (TimeScale) that owns bar spacing, right offset, and the
index-to-pixel mapping. One instance is shared across every pane so they all pan and
zoom together. Accessible as chart.timeScale.
See also: Scales and Panes
Series
Series
A named dataset attached to a pane. Created with chart.addSeries(type, options) and
returned as a SeriesApi handle with setData, update, prependData, and getData
methods. Every series is registered in the chart-type registry under a SeriesType
string.
See also: Core Concepts, Chart Types, Series and Styling
Chart type registry
A map from SeriesType string to a RendererEntry descriptor. Each descriptor carries
a draw function, an extents function (min/max price for autoscale), a default style, and
an isPriceSeries flag. The base bundle registers all time-indexed types
(candlestick, bar, line, area, etc.). Transform-tier types (point-figure,
kagi) are registered when openalgo-charts/transform is imported. You can add custom
types with registerChartType.
See also: Chart Types, Primitives and Plugins
Series style
A SeriesStyle object that overrides a series type’s default visual properties: colors
(upColor, downColor, color, areaTopColor, etc.), line width, border and wick
visibility, and baseline value. Passed as options.style to addSeries. Unspecified
fields fall back to the chart type’s defaults or the active theme.
See also: Series and Styling
Layout
Pane
A horizontally-stacked chart area that owns one price scale and a set of series and
primitives. Pane 0 is the main price pane; pane 1, 2, and so on are created automatically
when you pass paneIndex: 1 (or higher) to addSeries. All panes share the same time
axis and scroll together. The price pane takes full weight; sub-panes default to 32% of
the chart height.
See also: Core Concepts, Scales and Panes
Price scale
The y-axis object (PriceScale) for one pane. Maps price to a y pixel coordinate in
linear or logarithmic mode. Supports auto-scale (tracks the visible data range) and
manual scale (fixed after a drag or programmatic call). Accessible as
pane.priceScale on each pane returned by chart.panes().
See also: Scales and Panes
Auto scale
The default price-scale mode. On every render the engine calls autoscale(low, high) to
fit the visible bars within the pane, with configurable top and bottom margin fractions
(default 10% each). Dragging the price axis or calling priceScale.setPriceRange
switches to manual scale; double-clicking the chart restores auto scale on all panes.
See also: Scales and Panes
Manual scale
Price-scale mode entered when the user drags the price axis or drags the plot area
vertically. The visible price range is fixed until auto scale is restored. Programmatically
toggle with priceScale.setAutoScale(false).
See also: Scales and Panes
Log scale
A price-scale mode (PriceScaleMode = 'logarithmic') that applies a log10 coordinate
transform before mapping price to y. Equal vertical distances represent equal percentage
moves rather than equal point moves. Set via PriceScaleOptions.mode.
See also: Scales and Panes
Data layer
DataLayer
The chart’s internal shared data store (one per chart). Merges all series onto a single sorted time axis, assigns each distinct timestamp a unique logical index, and provides per-series access by index. Handles deduplication (same time -> replace) and keeps rows time-sorted after every insert or prepend.
See also: Core Concepts, Data Loading
Conflation
An optional OHLC-preserving downsampling step activated when bars become sub-pixel wide
at high zoom-out. Groups of consecutive bars are merged into one: open = first open,
close = last close, high = max high, low = min low, volume = sum. This is strictly
lossless for candle shape and never averages prices. Enabled via ChartOptions.conflate.
See also: Core Concepts
Primitives
Primitive
Any drawable object that is not a series renderer. Primitives implement the IPrimitive
interface: a required draw method, a required zOrder method, and optional
autoscaleInfo, hitTest, attached, and detached hooks. Attach one to a pane with
chart.addPrimitive(primitive, paneIndex). All built-in overlays (price lines, markers,
watermarks, profiles, the trade layer) are primitives.
See also: Primitives and Plugins
Price line
A PriceLine primitive that draws a horizontal line across a pane at a fixed price, with
an optional label and configurable color, line width, and line style. Used for alert
levels, open positions, stop-loss, and take-profit markers. Added with
chart.addPriceLine(options, paneIndex).
See also: Primitives and Plugins, Trading API
Series markers
A SeriesMarkers primitive that places small geometric shapes (triangle, circle, square,
arrow) above or below bars at specified logical times. Created via
series.createMarkers(). Each marker carries a time, position (above or below),
shape, optional color, size, and text for tooltips.
See also: Primitives and Plugins
Event markers
An EventMarkers primitive for corporate events such as earnings, dividends, and splits.
Added with chart.addEventMarkers(paneIndex). Each ChartEvent has a time, type
label, and optional color. Events render as small badge icons below the time axis of
the target pane and are hit-testable for click callbacks.
See also: Primitives and Plugins
Watermark (LogoWatermark)
A LogoWatermark primitive that draws a semi-transparent brand or product logo in a
corner (or center) of a pane. Accepts a URL, data URI, or a preloaded CanvasImageSource.
Supports opacity, a tint color to recolor the logo’s opaque pixels, and a zOrder to
place it behind or above the series. The library ships no logo of its own; you supply the
image.
See also: Primitives and Plugins
Live data and aggregation
CandleBuilder
A stateful class that converts a stream of price ticks into OHLC bars aligned to a fixed
time interval. Handles session-anchored bucket alignment (e.g., 5-minute bars starting at
09:15 IST), two volume modes (ltq-sum for last-traded-quantity streams and day-delta
for cumulative-day-volume streams), and configurable late-tick policy. Returns a
CandleUpdate with an isNew flag so the chart can append versus mutate the current bar.
See also: Live Data, Timeframes and Tick Charts
Tick aggregator (TickBarAggregator)
A class that aggregates classified trade ticks into bars by one of three modes: interval
(clock-based, same logic as CandleBuilder), ticks (a new bar every N trades), or
volume (a new bar every N units of traded volume). The foundation for non-time-indexed
bars and for the footprint aggregator. Requires real per-trade tick data; OHLCV history
alone cannot produce tick or volume bars.
See also: Timeframes and Tick Charts, Live Data
History loading
History paging / lazy load
A pattern for loading historical bars incrementally. Register a callback with
chart.setHistoryLoader(fn): the chart fires the callback (and emits a lazy-load
event) when the user pans near the left edge. Your handler fetches older bars and calls
series.prependData(bars) to merge them, then calls chart.historyLoadComplete() to
re-enable the trigger. The viewport stays fixed while older data is inserted.
See also: Data Loading
Transform tier
The transforms below live in the openalgo-charts/transform entry point. Import that
module before using them — it also registers the point-figure and kagi series types
with the chart-type registry.
Renko
A RenkoTransform that converts OHLCV bars into fixed-size bricks. A new brick is drawn
only when price moves at least one brick size in either direction; time is irrelevant.
The output is plotted as a candlestick series.
See also: Transforms
Range bars
A RangeBarsTransform that opens a new bar only when the intra-bar high-low range
reaches a specified number of ticks, producing equal-range bars regardless of time. The
output is plotted as a candlestick series.
See also: Transforms
Kagi
A KagiTransform that tracks price reversals of a configurable amount. The line thickens
on new highs (Yang) and thins on new lows (Yin). Rendered by the dedicated kagi series
type registered by the transform tier.
See also: Transforms
Line break
A LineBreakTransform that draws a new candle only when price breaks the high or low of
the previous N candles (typically 3). Time advances only on a genuine break. The output
is plotted as a candlestick series.
See also: Transforms
Point and Figure
A PointFigureTransform that plots X columns on rising price and O columns on falling
price by a specified box size, ignoring time entirely. Rendered by the dedicated
point-figure series type registered by the transform tier.
See also: Transforms
Heikin Ashi
A HeikinAshiTransform that smooths OHLC bars by averaging prices across bars:
open = (prev open + prev close) / 2, close = (O+H+L+C) / 4. The output is plotted as a
candlestick series. Unlike the other transforms, Heikin Ashi preserves the time axis.
See also: Transforms
Profile tier
The profiles below live in the openalgo-charts/profile entry point. Import that module
to access the computation functions and primitive classes.
Volume Profile
A VolumeProfile primitive that computes a horizontal histogram of volume at each price
level across a session or a selected bar range. Overlays directly on the price pane. A
family variant (computeVolumeProfileSessions) produces one profile per session. Requires
OHLCV bars.
See also: Volume Profile, Profiles and Orderflow
Market Profile / TPO
A MarketProfile primitive based on Time Price Opportunity (TPO) letters. Each 30-minute
period (by default) is assigned a letter; price levels that traded in that period receive
that letter. The resulting distribution shows where the market spent the most time. Uses
computeTpo internally and requires OHLCV bars.
See also: Market Profile, Profiles and Orderflow
Footprint
A Footprint primitive that renders bid and ask volume at each price level inside each
bar, revealing the auction at micro-level. Computed by computeFootprint from a stream
of classified trades (each trade tagged as a buyer- or seller-initiated aggressor). Also
exposes diagonalImbalances, stackedImbalances, and cumulativeDelta analysis
functions. Requires classified trade data, not OHLCV alone.
See also: Profiles and Orderflow
Order flow
The broader analysis of trade classification within a bar: who was the aggressor on each
trade, cumulative delta (net buying minus selling pressure), and imbalance detection
between adjacent bid/ask levels. The profile tier exposes cumulativeDelta,
diagonalImbalances, and stackedImbalances as standalone functions on footprint data.
See also: Profiles and Orderflow
Trading layer
Trading layer (chart.trading)
A TradingController accessed via chart.trading. Accepts positions, orders, and trades
via its sync method and renders them as labelled, draggable price-line pills and
trade-fill markers. User interactions (drag to modify, click to cancel) emit
trading:* events on the chart event bus. Created lazily on first access.
See also: Trading API
Position
A TradingPosition pushed to the trading layer: an open directional position with an
entry price, size, P&L text, and a side of long or short. Rendered as a
price-line pill in the configured long/short color.
See also: Trading API
Order
A TradingOrder pushed to the trading layer: a pending limit, stop, or stop-limit order
at a specific price. Orders with a bracketRole of tp or sl are automatically linked
to their parent via parentId and rendered in take-profit/stop-loss colors. Draggable
orders emit order_drag and order_drag_end events.
See also: Trading API
Bracket (TP/SL)
A pair of TradingOrder objects attached to a parent order via parentId, each with a
bracketRole of tp (take profit) or sl (stop loss). The trading layer renders them
in distinct colors defined by TradingColors.tp and TradingColors.sl.
See also: Trading API
Trade marker
A TradingTrade pushed to the trading layer: a completed fill with a price, size,
timestamp (epoch milliseconds), and a side. Rendered by TradeMarkersPrimitive as a
shape on the price axis at the fill price. Supports three variants: chevron, bubble,
and count.
See also: Trading API
Input and events
Shortcut manager (ShortcutManager)
Handles keyboard control of the chart. Maintains a keymap of command IDs to key combos,
supports rebinding, disabling, and custom commands, and fires a ShortcutTriggerEvent
on each activation. Combos use physical key codes for layout independence (e.g., ArrowLeft
rather than the character produced). Scope can be hover (active when the pointer is
over the chart or the chart is focused) or global (always active). Accessible as
chart.shortcuts.
See also: Keyboard Shortcuts
Event bus (chart.on)
A unified pub/sub interface on the Chart object. chart.on(event, cb) subscribes to
named events; chart.off(event, cb) unsubscribes; chart.once(event, cb)
auto-unsubscribes after one firing; chart.emit(event, payload) dispatches. Core events:
ready, crosshair:move, click, pan, zoom, resize, lazy-load. The trading
layer routes its own trading:* events through the same bus.
See also: Events
Crosshair
A pair of lines (vertical across all panes, horizontal on the hovered pane) drawn on the
top canvas layer, updated on every pointer move without touching the base layer. Two
modes: normal (the horizontal line follows the pointer exactly) and magnet (the
horizontal line snaps to the nearest O/H/L/C of the bar under the cursor, restricted to
the price pane). Subscribe to movement via chart.subscribeCrosshairMove or
chart.on('crosshair:move').
See also: Crosshair and Legend
Feeds
DataFeed
The broker-agnostic interface a chart consumer implements (or uses the built-in
implementations for). Requires a getBars(req) method that returns historical bars and
optionally a subscribeBars method for live streaming. The chart and the consumer are
decoupled: the feed is not held by the chart internally; your code calls setData or
update on the series after receiving data from the feed.
See also: Data Feeds
TradeFeed
A broker-agnostic interface for order management: placeOrder, modifyOrder,
cancelOrder, subscribeOrders, and subscribePositions. The trading layer does not
call a TradeFeed directly; your app bridges the two by listening to trading:* events
and forwarding them to the feed, then pushing the resulting state back via
chart.trading.sync.
See also: Trading API, Data Feeds
Live feed (OpenAlgoLiveDataFeed)
A combined historical + live implementation. Fetches history via the OpenAlgo REST API
and streams live bar updates via the OpenAlgo WebSocket feed, managing the handoff point
where historical data ends and live ticks begin. Internally delegates to
OpenAlgoDataFeed and OpenAlgoWsFeed.
See also: Live Data, Data Feeds
OpenAlgo REST feed (OpenAlgoDataFeed)
A DataFeed implementation that fetches historical OHLCV bars from the OpenAlgo REST
API. Converts IST-formatted row timestamps (rowTimeToUtcSeconds) and maps the response
columns to Bar objects. Configured via OpenAlgoConfig.
See also: Data Feeds
OpenAlgo WebSocket feed (OpenAlgoWsFeed)
A WebSocket adapter that connects to the OpenAlgo WebSocket server, parses LTP and Quote
messages, and delivers ticks to a CandleBuilder. Manages reconnection, subscribe/
unsubscribe framing, and socket lifecycle. Configurable socket factory (SocketFactory)
for testability. The WsMode controls whether the feed subscribes in LTP mode or Quote
mode, which determines which VolumeMode the builder uses.
See also: Live Data, Data Feeds
OpenAlgo trade feed (OpenAlgoTradeFeed)
A TradeFeed implementation that calls the OpenAlgo REST order-management endpoints and
subscribes to live order and position updates via the API. Maps broker order objects to
TradingOrder and TradingPosition records via mapOrder and mapPosition.
See also: Trading API, Data Feeds
IST offset
IST_OFFSET_SECONDS is a named constant (19800, i.e., +05:30 in seconds) exported from
the time-utilities module. The feed adapters add it when converting an IST timestamp to
UTC seconds and subtract it when formatting axis labels back to IST. Application code
using the built-in adapters never needs to reference it directly.
See also: Data Feeds, Core Concepts