Skip to main content

types.EntityLine#

Persistent keyed line entity in data coordinates.

SYNTAX#

interface EntityLine { kind: 'line'; key: string; x1: number; y1: number; x2: number; y2: number; color: string; width?: number; style?: 'solid' | 'dashed' | 'dotted'; forceOverlay?: boolean; }

ARGUMENTS#

  • kind ('line') — Discriminator.
  • key (string) — Persistent identifier; same key replaces the previous emission in place.
  • x1 (number) — Start timestamp in unix seconds.
  • y1 (number) — Start price.
  • x2 (number) — End timestamp in unix seconds.
  • y2 (number) — End price.
  • color (string) — CSS color.
  • width (number) — Optional line width.
  • style (string) — Optional line style.
  • forceOverlay (boolean) — When true, render on the price pane regardless of indicator pane.

RETURNS#

Type definition.

EXAMPLE#

{ kind: 'line', key: 'support', x1: 1700000000, y1: 50000, x2: 1700100000, y2: 50000, color: '#26a69a', width: 2, style: 'dashed' }

SEE ALSO#

indicator.entity.line, types.EntityBox, types.EntityMarker