StockSharp.Algo 5.0.229

Prefix Reserved
dotnet add package StockSharp.Algo --version 5.0.229
                    
NuGet\Install-Package StockSharp.Algo -Version 5.0.229
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StockSharp.Algo" Version="5.0.229" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Algo" Version="5.0.229" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.Algo" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StockSharp.Algo --version 5.0.229
                    
#r "nuget: StockSharp.Algo, 5.0.229"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StockSharp.Algo@5.0.229
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StockSharp.Algo&version=5.0.229
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Algo&version=5.0.229
                    
Install as a Cake Tool

StockSharp Algo Library

Overview

StockSharp.Algo is the core algorithmic trading library used throughout the StockSharp platform. It provides the building blocks for creating trading bots, managing market data, handling order routing, and simulating strategies against historical data. The library targets .NET 6.0 and can be used in desktop, server, or cloud applications.

Features

  • Connectors and Message Adapters – unified infrastructure for connecting to exchanges and data feeds. Includes offline adapters for simulation and adapters for incremental order books, snapshots, and extended order information.
  • Strategy Framework – base classes for building algorithmic strategies with built‑in event model, parameter system, and rule management. Strategies can be composed and executed in parallel or as baskets.
  • Market Data Storages – tools for storing quotes, trades, candles, and order books in various formats (binary, CSV) with caching and synchronization support.
  • Risk and PnL – modules for risk management, slippage modeling, commission calculation, and real‑time profit‑and‑loss tracking.
  • Testing and Emulation – historical emulation connectors and market data generators for backtesting strategies under conditions close to real trading.
  • Services Registry – helper class to access common services (exchanges, securities, storages) across the application.

Getting Started

Prerequisites

  • .NET SDK 6.0 or later.
  • Visual Studio 2022 or any compatible IDE.

Basic Usage

The typical entry point for working with the library is the Connector class. Below is a very simplified example that demonstrates how to run a custom strategy using historical data:

using StockSharp.Algo;
using StockSharp.Algo.Strategies;
using StockSharp.Algo.Testing;

var connector = new HistoryEmulationConnector(securityProvider, portfolioProvider, storageRegistry);
var myStrategy = new MyStrategy { Connector = connector, Portfolio = myPortfolio, Security = mySecurity };

connector.NewStrategy += strategy => strategy.Start();
connector.Connect();

A full‑fledged application will include market data subscriptions, order registration, and more advanced strategy logic.

Documentation

Comprehensive documentation for the API and subsystems is available at the StockSharp documentation website.

Support

Questions and discussions are welcome in the community chat.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on StockSharp.Algo:

Package Downloads
StockSharp.Xaml

Misc graphical components. More info on web site https://stocksharp.com/store/

StockSharp.Studio.Core

Core types for UI applications. More info on web site https://stocksharp.com/store/

StockSharp.Xaml.Diagram

Visual designer to create trading strategies. More info on web site https://stocksharp.com/store/

StockSharp.CSV

CSV connector. More info on web site https://stocksharp.com/store/

StockSharp.QuikLua

Trading and algorithmic trading platform (stock markets, forex, bitcoins and options). .NET API for InteractiveBrokers, GainCapital, OANDA, FIX/FAST, Binance etc. More info on web site https://stocksharp.com/products/api/

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.229 2,767 9/11/2025
5.0.228 545 9/1/2025
5.0.227 493 8/30/2025
5.0.226 681 8/10/2025
5.0.225 1,077 7/23/2025
5.0.224 775 7/22/2025
5.0.223 636 7/20/2025
5.0.222 564 7/14/2025
5.0.221 484 7/8/2025
5.0.220 420 7/4/2025
5.0.219 480 6/30/2025
5.0.218 673 6/24/2025
5.0.217 431 6/20/2025
5.0.216 471 6/18/2025
5.0.215 594 6/2/2025
5.0.214 724 5/14/2025
5.0.213 1,093 4/1/2025
5.0.212 426 3/29/2025
5.0.211 439 3/27/2025
5.0.210 792 2/28/2025
5.0.209 521 2/26/2025
5.0.208 450 2/24/2025
5.0.207 707 2/15/2025
5.0.206 508 2/14/2025
5.0.205 1,031 1/7/2025
5.0.204 693 12/30/2024
5.0.203 1,167 11/18/2024
5.0.202 463 11/16/2024
5.0.201 960 10/14/2024
5.0.200 529 10/9/2024
5.0.199 464 10/7/2024
5.0.198 481 10/3/2024
5.0.197 561 9/23/2024
5.0.196 483 9/18/2024
5.0.195 506 9/16/2024
5.0.194 612 9/8/2024
5.0.193 857 8/24/2024
5.0.192 763 8/9/2024
5.0.191 872 8/1/2024
5.0.190 437 7/28/2024
5.0.189 742 7/4/2024
5.0.188 689 6/23/2024
5.0.187 623 6/13/2024
5.0.186 673 5/30/2024
5.0.185 402 5/22/2024
5.0.184 653 5/13/2024
5.0.183 720 5/5/2024
5.0.182 583 4/26/2024
5.0.181 551 4/25/2024
5.0.180 594 4/12/2024
5.0.179 687 4/4/2024
5.0.178 908 3/12/2024
5.0.177 871 2/23/2024
5.0.176 669 2/22/2024
5.0.175 853 2/21/2024
5.0.174 979 2/14/2024
5.0.173 882 2/12/2024
5.0.172 1,204 2/6/2024
5.0.171 1,133 1/31/2024
5.0.170 1,126 1/14/2024
5.0.169 1,265 1/10/2024
5.0.168 1,566 12/15/2023
5.0.167 1,354 12/8/2023
5.0.166 1,491 11/28/2023
5.0.165 1,233 11/28/2023
5.0.164 1,872 10/8/2023
5.0.163 1,540 9/29/2023
5.0.162 1,581 9/19/2023
5.0.161 1,220 9/18/2023
5.0.160 2,183 7/30/2023
5.0.159 1,779 7/10/2023
5.0.158 1,554 7/8/2023
5.0.157 1,678 7/5/2023
5.0.156 1,673 6/22/2023
5.0.155 1,649 6/19/2023
5.0.154 2,075 5/14/2023
5.0.153 1,650 5/8/2023
5.0.152 1,883 4/21/2023
5.0.151 2,031 4/17/2023
5.0.150 1,987 4/7/2023
5.0.149 1,900 4/3/2023
5.0.148 2,383 3/6/2023
5.0.147 2,729 2/23/2023
5.0.146 2,046 2/13/2023
5.0.145 2,060 2/9/2023
5.0.144 2,044 2/8/2023
5.0.143 2,195 2/2/2023
5.0.142 2,203 1/30/2023
5.0.141 3,152 1/3/2023
5.0.140 2,282 12/30/2022
5.0.139 2,745 12/12/2022
5.0.138 2,442 12/8/2022
5.0.137 3,097 11/11/2022
5.0.136 18,565 11/1/2022
5.0.135 20,751 10/16/2022
5.0.134 41,014 9/8/2022
5.0.133 40,872 8/29/2022
5.0.132 41,091 8/24/2022
5.0.131 41,892 7/26/2022
5.0.130 41,367 7/19/2022
5.0.129 42,479 5/13/2022
5.0.128 41,307 4/30/2022
5.0.127 7,313 3/29/2022
5.0.126 43,211 3/25/2022
5.0.125 41,586 3/17/2022
5.0.124 40,985 2/15/2022
5.0.123 43,566 2/11/2022
5.0.122 7,129 2/2/2022
5.0.121 7,109 1/28/2022
5.0.120 42,719 1/26/2022
5.0.119 40,231 1/21/2022
5.0.118 40,111 1/21/2022
5.0.117 38,717 1/13/2022
5.0.116 25,785 12/29/2021
5.0.115 25,651 12/20/2021
5.0.114 25,499 12/11/2021
5.0.113 25,481 12/6/2021
5.0.112 27,420 11/29/2021
5.0.111 25,350 11/22/2021
5.0.110 26,234 11/13/2021
5.0.109 28,127 11/8/2021
5.0.108 1,610 11/8/2021
5.0.107 28,058 11/5/2021
5.0.106 28,854 10/21/2021
5.0.105 28,764 10/14/2021
5.0.104 28,654 10/14/2021
5.0.103 1,580 10/13/2021
5.0.102 3,869 10/13/2021
5.0.101 29,476 10/11/2021
5.0.100 32,793 10/8/2021
5.0.99 3,560 10/7/2021
5.0.98 29,357 10/7/2021
5.0.97 29,867 9/23/2021
5.0.96 28,326 9/7/2021
5.0.95 29,298 7/31/2021
5.0.94 27,823 7/30/2021
5.0.93 27,426 7/30/2021
5.0.92 27,311 7/19/2021
5.0.91 28,095 7/13/2021
5.0.90 27,882 7/5/2021
5.0.89 29,300 6/16/2021
5.0.88 28,651 6/4/2021
5.0.87 28,023 5/15/2021
5.0.86 28,201 4/30/2021
5.0.85 28,116 4/26/2021
5.0.84 28,528 4/19/2021
5.0.83 27,837 4/16/2021
5.0.82 27,745 4/13/2021
5.0.81 27,552 4/12/2021
5.0.80 28,094 4/8/2021
5.0.79 27,533 4/7/2021
5.0.78 27,579 4/6/2021
5.0.77 27,755 3/29/2021
5.0.76 27,836 3/28/2021
5.0.75 27,936 3/26/2021
5.0.74 27,422 3/26/2021
5.0.73 28,727 3/24/2021
5.0.72 28,833 3/23/2021
5.0.71 26,066 3/18/2021
5.0.70 25,905 3/17/2021
5.0.69 26,291 3/12/2021
5.0.68 26,256 3/4/2021
5.0.67 2,665 3/4/2021
5.0.66 26,299 2/26/2021
5.0.65 26,414 2/17/2021
5.0.64 25,950 2/15/2021
5.0.63 25,595 2/13/2021
5.0.62 25,960 2/12/2021
5.0.61 26,406 2/7/2021
5.0.60 25,945 2/2/2021
5.0.59 25,901 2/2/2021
5.0.58 26,548 1/26/2021
5.0.57 26,076 1/25/2021
5.0.56 25,819 1/25/2021
5.0.55 26,297 1/21/2021
5.0.54 25,756 1/20/2021
5.0.53 25,708 1/19/2021
5.0.52 24,674 1/16/2021
5.0.51 26,247 1/14/2021
5.0.50 26,799 12/29/2020
5.0.49 27,126 12/23/2020
5.0.48 26,392 12/18/2020
5.0.47 27,797 12/15/2020
5.0.46 25,535 12/14/2020
5.0.45 29,274 12/10/2020
5.0.45-preview1 2,370 12/3/2020
5.0.44 26,265 12/1/2020
5.0.44-a3 2,028 11/30/2020
5.0.44-a2 2,000 11/30/2020
5.0.43 2,827 11/30/2020
5.0.43-a1 1,933 11/30/2020
5.0.42 28,191 11/29/2020
5.0.41 26,083 11/22/2020
5.0.40 25,749 11/22/2020
5.0.40-a7 19,656 11/22/2020
5.0.40-a6 20,036 11/22/2020
5.0.40-a5 1,826 11/20/2020
5.0.40-a2 2,302 11/17/2020
5.0.40-a1 1,690 11/17/2020
5.0.39 27,217 11/13/2020
5.0.38 26,982 10/11/2020
5.0.37 27,159 9/20/2020
5.0.36 25,628 9/18/2020
5.0.35 26,770 9/15/2020
5.0.34 25,704 9/9/2020
5.0.33 25,775 9/3/2020
5.0.32 26,328 8/21/2020
5.0.31 26,429 8/11/2020
5.0.30 25,906 8/10/2020
5.0.29 26,501 8/10/2020
5.0.28 25,828 7/28/2020
5.0.27 25,673 7/19/2020
5.0.26 25,512 7/9/2020
5.0.25 25,364 7/7/2020
5.0.24 26,510 6/10/2020
5.0.23 26,114 6/9/2020
5.0.22 26,212 6/9/2020
5.0.21 26,379 6/4/2020
5.0.20 26,415 6/2/2020
5.0.19 26,121 5/29/2020
5.0.18 26,316 5/25/2020
5.0.17 26,321 5/21/2020
5.0.16 26,405 5/14/2020
5.0.15 26,389 5/12/2020
5.0.14 26,808 5/11/2020
5.0.13 26,656 5/9/2020
5.0.12 26,617 5/5/2020
5.0.11 26,631 5/4/2020
5.0.10 2,602 4/24/2020
5.0.9 2,472 4/22/2020
5.0.8 27,967 4/18/2020
5.0.7 25,939 4/16/2020
5.0.6 22,019 4/15/2020
5.0.5 2,068 4/14/2020
5.0.4 22,818 4/12/2020
5.0.3 2,138 4/6/2020
5.0.2 22,531 4/4/2020
5.0.1 10,428 3/27/2020
5.0.0 9,460 3/26/2020

Level1BinarySerializer. Save last time for trades and quotes separately.