Type Alias IndicatorDrawing

IndicatorDrawing:
    | {
        color?: string;
        extendLeft?: boolean;
        extendRight?: boolean;
        from: DrawAnchor;
        kind: "line";
        lineStyle?: IndicatorLineStyle;
        lineWidth?: number;
        to: DrawAnchor;
    }
    | {
        color?: string;
        fillColor?: string;
        from: DrawAnchor;
        kind: "box";
        lineWidth?: number;
        opacity?: number;
        text?: string;
        textColor?: string;
        to: DrawAnchor;
    }
    | {
        align?: "left"
        | "center"
        | "right";
        at: DrawAnchor;
        color?: string;
        kind: "label";
        text: string;
        textColor?: string;
    }
    | {
        closed?: boolean;
        color?: string;
        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.

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
  • {
        color?: string;
        fillColor?: string;
        from: DrawAnchor;
        kind: "box";
        lineWidth?: number;
        opacity?: number;
        text?: string;
        textColor?: string;
        to: DrawAnchor;
    }
    • Optionalcolor?: string

      Border colour. Omit fillColor to draw an outline only.

    • OptionalfillColor?: string
    • from: DrawAnchor
    • 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.

    • OptionaltextColor?: string
    • to: DrawAnchor
  • {
        align?: "left" | "center" | "right";
        at: DrawAnchor;
        color?: string;
        kind: "label";
        text: string;
        textColor?: string;
    }
    • Optionalalign?: "left" | "center" | "right"

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

    • at: DrawAnchor
    • Optionalcolor?: string

      Plate fill.

    • kind: "label"
    • text: string

      \n splits lines.

    • OptionaltextColor?: string
  • {
        closed?: boolean;
        color?: string;
        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
    • OptionalfillColor?: string
    • kind: "polyline"
    • OptionallineWidth?: number
    • Optionalopacity?: number

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

    • points: readonly DrawAnchor[]