Actively developed

StockSharp guide

StockSharp is one of the few full open-source trading platforms for the .NET ecosystem.

Last reviewed · Also known as S#, StockSharp Designer

Quick answer

StockSharp (S#) is an open-source C#/.NET platform for algorithmic trading. It includes libraries for strategies, backtesting and market data, a visual Designer for building strategies without code, and connectors to many brokers and venues, including Interactive Brokers, Rithmic, CQG, Tradovate and major crypto exchanges.

StockSharp at a glance

Category
C#, Java & C++ frameworks
Language
C#
License
Apache-2.0
Does
Backtesting, Live trading, Optimization, Market data
Markets
Stocks, Futures, Options, Forex, Crypto
Best for
.NET developers and futures traders who want broad connectivity.
In AlgoGP
Use the exported strategy object from your own code

Pick it if

.NET developers and futures traders who want broad connectivity.

Watch out for

Some connectors and products are commercial.

StockSharp strengths and limitations

Strengths

  • Native C#/.NET.
  • Many connectors, including futures gateways.
  • Visual Designer.

Limitations

  • Some connectors and products are commercial.
  • Smaller English-language community.

StockSharp example

dotnet add package StockSharp.Algo
Install
public class SmaStrategy : Strategy
{
    protected override void OnStarted(DateTimeOffset time)
    {
        base.OnStarted(time);
        // subscribe to candles and place orders with BuyMarket()/SellMarket()
    }
}
Strategy skeleton.

Use StockSharp with AlgoGP

AlgoGP does not add StockSharp to projects automatically yet, but nothing stops you using them together. Every AlgoGP project exports plain Python with a framework-neutral strategy object, so you can call it from StockSharp yourself.

  1. 1

    Design and backtest in AlgoGP

    Describe the idea to the copilot and backtest it on AlgoGP’s normalized history.

  2. 2

    Add any bridge to get the adapter core

    Adding a bridged framework (for example Backtrader) writes frameworks/algogp_bridge.py, whose StrategyBridge.on_bar() returns the orders the strategy wants.

  3. 3

    Call it from StockSharp

    Feed StockSharp’s bars to StrategyBridge, place the returned orders with StockSharp, and report fills back with sync().

StockSharp connects to Interactive Brokers, Binance, Bybit, OKX, Rithmic, CQG, Tradovate, OANDA. Each guide shows how to create the API key, which you can store in the project’s Keys & secrets.

StockSharp: frequently asked questions

Is StockSharp free?

The core is Apache-2.0; some connectors and tools require a license.

StockSharp alternatives

Independent guide. AlgoGP is not affiliated with StockSharp. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.

Build a strategy