Skip to main content

types.RuntimeHistogram#

Describes a histogram series in RuntimeOutput.histograms.

SYNTAX#

interface RuntimeHistogram { kind: 'histogram'; name: string; values: (number | null)[]; color: string; negativeColor?: string; baseValue: number; }

ARGUMENTS#

  • kind ('histogram') — Discriminator — always the string histogram.
  • name (string) — Series identifier; unique within the indicator's histograms array.
  • values ((number | null)[]) — Per-bar values. Length equals candles.length; null for gap bars.
  • color (string) — Bar color when value >= baseValue.
  • negativeColor (string) — Optional. Bar color when value < baseValue. Falls back to color when unset.
  • baseValue (number) — Reference baseline. Default 0.

RETURNS#

Type definition.

EXAMPLE#

{ kind: 'histogram', name: 'macd-hist', values: histValues, color: '#26a69a', negativeColor: '#ef5350', baseValue: 0 }

SEE ALSO#

types.RuntimeOutput, indicator.plot.histogram