Skip to content

chart namespace

The chart namespace exposes metadata about the current chart, such as symbol, resolution, timezone, and instrument properties. Use these helpers to adapt logic or UI based on the user’s chart configuration.

  • chart.symbol → Symbol string (EXCHANGE:TICKER).
  • chart.interval → Chart resolution ("1", "5", "60", "D", "1W", etc.).
  • chart.time_zone → IANA timezone string for the chart.
  • chart.pointvalue → Currency value of one price point for the instrument.
  • chart.is_secondstrue when the chart uses second-based resolution.
  • chart.is_nonalignedtrue when the chart is non-time-aligned (e.g., range, Renko).
//@version=5
indicator("Chart metadata", overlay=false)
label.new(bar_index, close,
text = "Symbol: " + chart.symbol +
"\nInterval: " + chart.interval +
"\nTimezone: " + chart.time_zone +
"\nPoint value: " + str.tostring(chart.pointvalue),
style=label.style_label_left,
textcolor=color.white,
bgcolor=color.new(color.blue, 70))
isRangeChart = chart.is_nonaligned
bgcolor(isRangeChart ? color.new(color.orange, 90) : na)