Interface IndicatorOutputTarget

Where one returned drawing, marker or shading column goes, when the study's own layer is the wrong place for it. A study in its own pane still has things to say about the candles (a supply zone, a buy signal, a regime), and a study whose plots sit on two axes has shapes and marks measured on each. Naming no target keeps the output in the study's own layer, exactly as before.

Each distinct target gets a layer of its own, owned by the instance: it hides with the study, is released with it, and is released as soon as a calculation returns nothing for that target. Marks sent to the series the study's own marks already anchor to join that layer instead, so marks at one bar stack rather than overlap, unless that series is an overlay plot of a study in its own pane (see plot). A study's layers stack in a fixed order: its own marks, its marker targets, its own shapes, its drawing targets, its own shading, then its shading targets, each kind's targets taking the price pane first and then the plots in declaration order. Shading paints behind every series on its pane, so on any one pane it sits under the candles, the plots, the marks and the shapes whatever its slot; the order decides which study's shading covers another's. A targeted layer created after the study was added is put back in that order among the targeted layers on its pane, below those of the studies added after it. No other layer moves for it, so an output that names no target stacks exactly as before.

interface IndicatorOutputTarget {
    overlay?: boolean;
    plot?: string;
}

Hierarchy (View Summary)

Properties

Properties

overlay?: boolean

The price pane, in the instrument's own units, staying there when the study moves. A shape is measured on the scale that pane quotes prices on (its crosshair readout, which is the candles' own scale on whichever axis they sit) and holds no axis itself, so the price axis stays free to move. A marker is anchored to the instrument's candles, so belowBar sits under the low; it is drawn once the chart has a primary series. A shading column fills the price pane's full height and binds no axis. Naming a plot as well is rejected: a plot already decides its pane.

plot?: string

A declared plot key. A shape is drawn on that plot's pane and measured on its effective price scale; a marker is anchored to that plot's series, so aboveBar and belowBar read its values, and where it has none, the candle's whenever that plot is on the price pane and on the candles' scale, first plot or not. A shading column fills that plot's pane and is bound to its effective scale, which has no price to measure but keeps the layer on the axis the plot uses, so a reassignment never leaves a column held for nothing. Each follows the plot through a scale reassignment or a study move. An overlay plot takes it to the price pane.