Skip to main content

Resolution

The resolution surface is the interval control in the top toolbar: favorite intervals stay inline, and a chevron opens the full picker. Users see it whenever the widget renders the top toolbar; what it offers is derived entirely from the datafeed and the active symbol, never hard-coded in the UI.

Where it lives

TradeScript top toolbar with the interval region highlighted between the symbol box and the compare control, showing a favorite one-minute entry, the active fifteen-minute entry, and the picker chevron

BTCUSDT · 15m · dark theme — the interval favorites (1m, active 15m) and picker chevron sit between the symbol box and the compare control.

The picker

TradeScript interval picker menu opened from the top toolbar interval control above the BTCUSDT fifteen-minute candlestick chart

Interval menu open · BTCUSDT · 15m · dark theme — captured from the live playground. The picker shows only intervals the current symbol and datafeed can support; favorites stay visible in the toolbar.

UI states

StateBehaviorWhy it happens
AvailableSelectable; switching triggers a reload at that intervalThe interval is in the resolved supported list — served natively (providedIntervals) or via the configured rebuild policy
DisabledVisible for product consistency but not selectable; include the reason in accessible help textValid grammar, but the interval is not in the resolved supported list for this symbol or feed
CustomA typed entry is accepted and appliedfeatures.customIntervals is on (default) and the entry matches the interval grammar and the resolved supported list
UnsupportedRejected before changing the chart; the current interval stays selectedThe typed entry fails the grammar, or is valid grammar outside the supported list

Set features.customIntervals: false for a fixed-list selector without the typed custom-interval entry. features.intervalFamilies applies the native interval-family policy before datafeed/symbol capability narrowing.

How the picker is derived from the datafeed

Two narrowing rules apply before anything renders:

  • The selector is the intersection of feed-level MarketDataFeedConfig.supportedIntervals and SymbolInfo.supportedIntervals for the active symbol.
  • providedIntervals marks what loadBars returns natively; the gap up to supportedIntervals is closed by resolutionRebuildPolicy: 'exact' | 'aggregate' (aggregation requires the caching datafeed wrapper).

See Resolutions for the full decision matrix, defaults, and synthetic-aggregation rules.

TradeScript interval grammar

UnitExample
Ticks1T, 10T
Seconds1s, 5s
Minutes1m, 15m
Hours1H, 4H
Days1D
Weeks1W
Months1M
Years1Y

TradeScript interval strings always use explicit units.

Configuration mapping

NeedTradeScript surface
Feed-wide intervalsMarketDataFeedConfig.supportedIntervals
Vendor-native intervalsMarketDataFeedConfig.providedIntervals
Symbol-specific intervalsSymbolInfo.supportedIntervals
Capability grammarResolutionCapabilities
Rebuild policyresolutionRebuildPolicy ('exact' or 'aggregate')
Session-aware empty barsemptyBars
Typed custom entriesfeatures.customIntervals
Interval-family policyfeatures.intervalFamilies
Programmatic changechart.setInterval(interval) / chart.getInterval()