Documentation February 1, 2026 · 1 min read

Tutorial: Building a Custom Analytics Plugin

By Dev Team

VisualHFT is designed to be extensible. Whether you need a proprietary indicator or a connection to a custom execution venue, the Plugin architecture makes it easy.

The IPlugin Interface

Every plugin starts by implementing IPlugin.

public interface IPlugin : IDisposable
{
    string Name { get; }
    string Version { get; }
    string Author { get; }
    void Start();
    void Stop();
    event EventHandler<ErrorEventArgs> OnError;
}

Step 1: Project Setup

Create a new .NET 8 Class Library project. Add a reference to VisualHFT.Commons.dll.

Step 2: Implement the Logic

For a custom analytics plugin, you’ll want to subscribe to the OrderBook events.

public void Start()
{
    HelperOrderBook.Instance.Subscribe(OnOrderBookUpdate);
}

private void OnOrderBookUpdate(OrderBook ob)
{
    // Your custom logic here
    CalculateMyMetric(ob);
}

Step 3: Visualization (WPF)

Plugins can also provide their own UI. Create a WPF UserControl and expose it via the plugin interface. VisualHFT will automatically dock it into the dashboard.

Deployment

Simply drop your compiled .dll into the Plugins/ directory of your VisualHFT installation. The application will discover and load it on startup.

#tutorial #plugins #development