Panel placement

Indicators

Panel placement

Decide whether your indicator draws on top of the price candles or in its own subpanel below — a one-property hint the chart reads on first attach.

Why placement matters

Some indicators speak in price units — a moving average, Bollinger Bands, VWAP, a pivot level. They belong on the price candles, sharing the price axis. Others live on a completely different scale: RSI runs 0–100, MACD oscillates around zero, OBV climbs into the millions. Drawn on the price axis they would be invisible or would crush the candles. Those need their own panel with its own vertical scale.

The default: price overlay

If you do nothing, your plots overlay the price panel — PanelPlacement.PriceOverlay. That is the correct default for the majority of indicators and the reason the core IIndicator surface carries no placement member: most indicators don't need to express a preference.

Opening a subpanel

To request a fresh subpanel below the price panel, implement IIndicatorPanelHint and return PanelPlacement.NewSubpanel. The interface is deliberately separate from IIndicator so only the handful of types that need it take the dependency.

Rsi.cs (placement)using TradeStrike.Pipeline.Indicators;
using TradeStrike.Pipeline.Plots;
using TradeStrike.Pipeline.Series;

[IndicatorDescription("Relative Strength Index — a bounded 0–100 momentum oscillator.")]
[IndicatorCategory(IndicatorCategory.Momentum)]
[IndicatorInput(IndicatorInputKind.Scalar)]
public sealed class Rsi : IndicatorBase, IIndicatorPanelHint
{
    private readonly ChunkedSeries<double> _rsi = new();

    [IndicatorParameter(DisplayName = "Period", Group = "Parameters", MinValue = 2)]
    public int Period { get; set; } = 14;

    // RSI is on a 0–100 scale, so it gets its own panel.
    public PanelPlacement DefaultPanel => PanelPlacement.NewSubpanel;

    public Rsi(IIndicator? parent = null, ISeries<double>? input = null) : base(parent, input)
    {
        AddPlot(new Plot("RSI", _rsi, PlotStyle.Line, new ChartColor(156, 39, 176), 1.5));
    }

    // ... OnDataLoaded / OnBarUpdate compute the oscillator into _rsi ...
}
Placement Typical indicators
PriceOverlay (default; no interface needed) SMA, EMA, Bollinger Bands, VWAP, pivots — anything in price units.
NewSubpanel (implement IIndicatorPanelHint) RSI, Stochastic, MACD, OBV — oscillators and cumulative scales.
It's only the initial placement. The hint chooses the default panel on first attach; the user can still move plots between panels afterward through the chart UI. Threshold reference lines (RSI 30/70) pair naturally with a subpanel — see Threshold lines.

One instance per chart

A "host" or "tool" indicator that owns a chart-wide singleton surface (a designer host, an auto-builder) can mark itself [SingleInstancePerChart]. A chart that already carries an instance of the tagged type silently ignores any further add of the same type. The limit is per concrete type, so two different singleton tools can coexist. Ordinary indicators are never tagged — users may add as many as they like with different settings.