Type Alias IndicatorDrawing

IndicatorDrawing: IndicatorOutputTarget & (
    | {
        color?: string;
        extendLeft?: boolean;
        extendRight?: boolean;
        from: DrawAnchor;
        kind: "line";
        lineStyle?: IndicatorLineStyle;
        lineWidth?: number;
        to: DrawAnchor;
    }
    | {
        align?: "left"
        | "center"
        | "right";
        bold?: boolean;
        color?: string;
        fillColor?: string;
        fontFamily?: string;
        fontSize?: number;
        from: DrawAnchor;
        id?: string;
        italic?: boolean;
        kind: "box";
        lineWidth?: number;
        opacity?: number;
        text?: string;
        textAlign?: "left" | "center" | "right";
        textColor?: string;
        to: DrawAnchor;
        tooltip?: string;
        verticalAlign?: "top" | "middle" | "bottom";
    }
    | {
        align?: "left"
        | "center"
        | "right";
        at: DrawAnchor;
        bold?: boolean;
        color?: string;
        fontFamily?: string;
        fontSize?: number;
        id?: string;
        italic?: boolean;
        kind: "label";
        text: string;
        textAlign?: "left" | "center" | "right";
        textColor?: string;
        tooltip?: string;
        verticalAlign?: "top" | "middle" | "bottom";
    }
    | {
        closed?: boolean;
        color?: string;
        curve?: "linear"
        | "smooth";
        fillColor?: string;
        kind: "polyline";
        lineWidth?: number;
        opacity?: number;
        points: readonly DrawAnchor[];
    }
)

A free-standing shape an indicator paints in its own pane, anchored to time and price rather than to a bar index.

Plots, levels and markers each answer a different question and none of them answers this one: a pivot-to-pivot trendline, a supply zone, an order block, a measured-move projection are all geometry between two arbitrary points, and a column of one value per bar cannot express any of them. Anchors are times, so a shape stays put when history is paged in and every logical index shifts. Any shape can name an IndicatorOutputTarget to be drawn elsewhere.

Type declaration

  • {
        color?: string;
        extendLeft?: boolean;
        extendRight?: boolean;
        from: DrawAnchor;
        kind: "line";
        lineStyle?: IndicatorLineStyle;
        lineWidth?: number;
        to: DrawAnchor;
    }
    • Optionalcolor?: string
    • OptionalextendLeft?: boolean

      Continue the line past its anchor to the pane edge.

    • OptionalextendRight?: boolean
    • from: DrawAnchor
    • kind: "line"
    • OptionallineStyle?: IndicatorLineStyle
    • OptionallineWidth?: number
    • to: DrawAnchor
  • {
        align?: "left" | "center" | "right";
        bold?: boolean;
        color?: string;
        fillColor?: string;
        fontFamily?: string;
        fontSize?: number;
        from: DrawAnchor;
        id?: string;
        italic?: boolean;
        kind: "box";
        lineWidth?: number;
        opacity?: number;
        text?: string;
        textAlign?: "left" | "center" | "right";
        textColor?: string;
        to: DrawAnchor;
        tooltip?: string;
        verticalAlign?: "top" | "middle" | "bottom";
    }
    • Optionalalign?: "left" | "center" | "right"

      Plate placement inside the box. Defaults to center and middle.

    • Optionalbold?: boolean
    • Optionalcolor?: string

      Border colour. Omit fillColor to draw an outline only.

    • OptionalfillColor?: string
    • OptionalfontFamily?: string

      CSS font-family list. Defaults to ui-sans-serif, system-ui, sans-serif.

    • OptionalfontSize?: number

      Positive finite CSS pixels. Defaults to 11.

    • from: DrawAnchor
    • Optionalid?: string

      Hit id, for subscribeClick. Defaults to the tooltip text.

    • Optionalitalic?: boolean
    • kind: "box"
    • OptionallineWidth?: number
    • Optionalopacity?: number

      Fill alpha, 0..1. Defaults to 0.12.

    • Optionaltext?: string

      Caption drawn on a plate at the centre of the box; \n splits lines.

    • OptionaltextAlign?: "left" | "center" | "right"

      Multiline row alignment inside the plate. Defaults to left.

    • OptionaltextColor?: string
    • to: DrawAnchor
    • Optionaltooltip?: string

      Detail shown on a plate while the pointer rests on the box, and gone when it leaves; \n splits lines. A zone that carries its size, its age and what formed it cannot print all of that on the box without hiding the candles under it, so the caption names it and this explains it. The box becomes hit-testable, and id (or the tooltip text) is what subscribeClick reports for it.

    • OptionalverticalAlign?: "top" | "middle" | "bottom"
  • {
        align?: "left" | "center" | "right";
        at: DrawAnchor;
        bold?: boolean;
        color?: string;
        fontFamily?: string;
        fontSize?: number;
        id?: string;
        italic?: boolean;
        kind: "label";
        text: string;
        textAlign?: "left" | "center" | "right";
        textColor?: string;
        tooltip?: string;
        verticalAlign?: "top" | "middle" | "bottom";
    }
    • Optionalalign?: "left" | "center" | "right"

      Which edge of the plate sits on the anchor. Defaults to 'center'.

    • at: DrawAnchor
    • Optionalbold?: boolean
    • Optionalcolor?: string

      Plate fill.

    • OptionalfontFamily?: string

      CSS font-family list. Defaults to ui-sans-serif, system-ui, sans-serif.

    • OptionalfontSize?: number

      Positive finite CSS pixels. Defaults to 11.

    • Optionalid?: string

      Hit id, for subscribeClick. Defaults to the tooltip text.

    • Optionalitalic?: boolean
    • kind: "label"
    • text: string

      \n splits lines.

    • OptionaltextAlign?: "left" | "center" | "right"

      Multiline row alignment inside the plate. Defaults to left.

    • OptionaltextColor?: string
    • Optionaltooltip?: string

      Hover detail, as on a box.

    • OptionalverticalAlign?: "top" | "middle" | "bottom"

      Which vertical plate edge sits on the anchor. Defaults to middle.

  • {
        closed?: boolean;
        color?: string;
        curve?: "linear" | "smooth";
        fillColor?: string;
        kind: "polyline";
        lineWidth?: number;
        opacity?: number;
        points: readonly DrawAnchor[];
    }
    • Optionalclosed?: boolean

      Close the path back to the first point (a triangle, a wedge).

    • Optionalcolor?: string
    • Optionalcurve?: "linear" | "smooth"

      Straight segments by default. Smooth interpolates anchors in screen space with half-chord tangents and can overshoot their price range.

    • OptionalfillColor?: string
    • kind: "polyline"
    • OptionallineWidth?: number
    • Optionalopacity?: number

      Fill alpha, 0..1. Defaults to 0.12.

    • points: readonly DrawAnchor[]