Overview
The SabrTrader plugin SDK
Indicators, strategies, bar types, drawing tools, Market Analyzer columns, add-ons and venues (market-data feeds and brokers) are all plugins in SabrTrader. You compile a .NET class library against the public SDK, copy the DLL into the plugin folder, and the running platform loads it.
These pages cover every plugin kind, from a minimal first indicator to venue and broker integrations. Each subject has its own page; use the menu on the left to go straight to it. You reference one NuGet package and implement its contracts. You never need the platform's source.
Start here
Two pages take you from an empty folder to a plugin on a chart, and a third explains the model the rest of the documentation builds on. Read them in order if you are new to the SDK.
Install the SDK
Add the NuGet package every plugin compiles against, target net10.0, and turn on
auto-deploy.
Your first plugin
Write a minimal indicator, build it, deploy it and see it draw on a chart.
Core concepts
The plugin model, the contract assemblies, capability interfaces, series indexing, lifecycle phases and threading.
What you can build
Each plugin kind has its own chapter: an overview, a walkthrough of a first working example, then one page per feature. The chapters are independent, so start with the one you need.
Indicators
Plot lines, bands, histograms and candles. Custom chart rendering, order flow, per-tick or per-bar calculation, panel placement, threshold lines, child indicators, multiple timeframes and toolbar menus.
Strategies
Automated entries and exits with managed orders, ATM brackets (stop, target, breakeven, trailing, scale in and out), optimizable parameters, backtests and live execution.
Bar types
Custom bar aggregation, built from ticks or derived from another series: Renko, range, volume, Heikin-Ashi, or your own.
Drawing tools
Interactive chart annotations with anchors, hit-testing, editable properties and automatic persistence: lines, shapes, Fibonacci level sets and patterns.
Add-ons
Your own window with its own Control Center menu entry, such as a scanner, a risk dashboard or a journal. Add-ons read accounts, orders, live ticks and history, and their windows are restored with the user's workspace.
Venue plugins
Connect the platform to a new venue (data feed, broker or crypto exchange): backfill, live ticks, depth and instruments, behind one plugin, one manifest and one session.
Trading providers
Route orders to a venue: place, cancel, modify and flatten, stream order and account updates, report fills and commissions, and declare your capabilities.
Market Analyzer columns
Add columns to the Market Analyzer grid: a computed value per instrument, with its own parameters and data type.
Alerts
Raise user-facing alerts from a plugin. The platform routes each alert to the log, a sound and the remote channels the user has configured.
Trading hours & sessions
Session-aware logic: detect the session's opening bar, the first bar of a session, and whether a bar time falls inside a configured window.
Broker venues
A broker is a venue that also routes orders: one plugin, a trading port over your vendor client, and the components and contract test kit for the order lifecycle.
Trade history
Persist and query fills, and backfill historical executions from a broker into the platform's trade-history store.
Options data & trading
Venue-agnostic option chains with IV, open interest and greeks, bounded snapshots for exposure analytics (GEX, DEX, VEX), streaming contract quotes, and multi-leg orders from strategies.
Options levels
Read gamma and options-levels snapshots from a levels feed: named walls, HVL, expected-move bands and per-strike exposure profiles.
SDK reference
Every public type in the contract assemblies (interfaces, records, enums and attributes), grouped by namespace, with signatures.
How the SDK is structured
One meta-package, SabrTrader.Sdk, brings in the four contract assemblies you compile
against, plus an MSBuild target that can deploy your built DLL. The contract assemblies hold
interfaces, base classes, attributes, enums, data records and a small set of helpers. The platform
supplies the implementations at load time, so a deployed plugin consists of its own DLL.
-
SabrTrader.Pipeline.Contracts: indicators, plots, series, bars, ticks, market depth, drawing tools, Market Analyzer columns, alerts, data providers and the venue-agnostic options data model. -
SabrTrader.Pipeline.Venues.Contracts: the venue seam (plugin, descriptor, manifest, session) plus orders, positions, accounts, risk, ATM brackets, multi-leg option orders, the option chain SPI and trade history. -
SabrTrader.Pipeline.Strategies.Contracts: theStrategybase class, its runtime context, the strategy catalog and backtest analytics. -
SabrTrader.Pipeline.AddOns.Contracts: add-ons, meaning the plugin export and its manifest, window kinds, windows and their declared views, workspace state, and the host services an add-on reads the platform through.
Core concepts walks through how these fit together: the plugin model, the "base class plus optional capability interfaces" pattern, series and bars-ago indexing, ambient providers, and the shared lifecycle every plugin kind follows.
How a plugin works
The mechanism is the same for every plugin kind. There is no registration call and no platform configuration to edit: you implement a contract, build a DLL, and the platform finds your types by inspecting the assembly. The Building & deploying chapter covers each step in depth.
-
Reference the SDK. One NuGet package,
SabrTrader.Sdk, brings in every contract assembly. -
Implement a contract. Subclass
IndicatorBase,StrategyorDrawingToolBase, or implement a discovery interface such asIVenuePlugin(the export behind a market-data feed or a broker) orIAddOn. The platform creates your type through a public constructor it can call without arguments, then applies settings. -
Build & deploy. Build a
net10.0DLL and copy it intoDocuments\SabrTrader\Plugins. The MSBuild target in the SDK can do this on every build. - Use it. The platform watches the plugin folder. A new or rebuilt DLL is loaded while SabrTrader runs, its types are registered in the matching catalogs, and they appear in the UI next to the built-in ones.
The pipeline at a glance
Two value types carry market data through the platform, a bar and a tick, and every plugin kind produces or consumes them.
C#// One OHLCV bar, passed by value through the whole pipeline.
// StartUtc / EndUtc are true venue UTC. Start / End is the chart timeline
// (display-zone wall-clock when the host has stamped StartDisplay / EndDisplay).
public readonly record struct Bar(
DateTime StartUtc, DateTime EndUtc,
double Open, double High, double Low, double Close,
long Volume, long TickCount,
DateTime StartDisplay = default, DateTime EndDisplay = default);
Venues produce ticks, bar builders aggregate ticks into bars, indicators and strategies read the bar series and emit plots, signals and orders, and the chart renders plots and drawing tools. Each layer is a contract you can plug into, and the SDK reference maps the full surface.
Conventions used in this guide
| Marker | Meaning |
|---|---|
| SIMPLE | A minimal, get-it-working example. |
| ADVANCED | Production features: rendering, parameters, multi-timeframe, ATM, persistence. |
| INTERFACE | A contract type you implement or consume. |