Exciting Update: Version 1.0.1 is now available, introducing high-performance technical indicators and custom drawing tools. Read more
Version: 1.0.0

Custom interval

The CustomInterval module allows developers to register custom timeframe intervals that appear in the chart's resolution dropdown.

Overview

Intervals are registered via window.ChartingAPI.registerCustomInterval(intervalString). The chart toolbar will automatically group them by unit (seconds, minutes, hours, days, weeks, months).

Interval Format

SuffixUnitExamples
SSeconds'10S', '30S'
mMinutes'1m', '5m', '45m'
HHours'1H', '4H', '12H'
DDays'1D', '3D'
WWeeks'1W', '2W'
MMonths'1M', '3M'

Registering Intervals

// Register custom intervals in custom-interval.js
window.ChartingAPI.registerCustomInterval('1m');
window.ChartingAPI.registerCustomInterval('5m');
window.ChartingAPI.registerCustomInterval('30m');
window.ChartingAPI.registerCustomInterval('1D');