StockSharp.Algo 5.0.223

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package StockSharp.Algo --version 5.0.223
                    
NuGet\Install-Package StockSharp.Algo -Version 5.0.223
                    
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.223" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Algo" Version="5.0.223" />
                    
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.223
                    
#r "nuget: StockSharp.Algo, 5.0.223"
                    
#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.223
                    
#: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.223
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Algo&version=5.0.223
                    
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.CSV

CSV connector. 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.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 129 9/11/2025
5.0.228 354 9/1/2025
5.0.227 268 8/30/2025
5.0.226 476 8/10/2025
5.0.225 846 7/23/2025
5.0.224 609 7/22/2025
5.0.223 434 7/20/2025
5.0.222 423 7/14/2025
5.0.221 334 7/8/2025
5.0.220 268 7/4/2025
5.0.219 334 6/30/2025
5.0.218 475 6/24/2025
5.0.217 284 6/20/2025
5.0.216 309 6/18/2025
5.0.215 438 6/2/2025
5.0.214 547 5/14/2025
5.0.213 914 4/1/2025
5.0.212 270 3/29/2025
5.0.211 274 3/27/2025
5.0.210 644 2/28/2025
5.0.209 364 2/26/2025
5.0.208 300 2/24/2025
5.0.207 539 2/15/2025
5.0.206 363 2/14/2025
5.0.205 863 1/7/2025
5.0.204 485 12/30/2024
5.0.203 1,008 11/18/2024
5.0.202 317 11/16/2024
5.0.201 804 10/14/2024
5.0.200 352 10/9/2024
5.0.199 299 10/7/2024
5.0.198 318 10/3/2024
5.0.197 428 9/23/2024
5.0.196 342 9/18/2024
5.0.195 346 9/16/2024
5.0.194 452 9/8/2024
5.0.193 652 8/24/2024
5.0.192 594 8/9/2024
5.0.191 570 8/1/2024
5.0.190 270 7/28/2024
5.0.189 603 7/4/2024
5.0.188 516 6/23/2024
5.0.187 459 6/13/2024
5.0.186 513 5/30/2024
5.0.185 293 5/22/2024
5.0.184 487 5/13/2024
5.0.183 512 5/5/2024
5.0.182 432 4/26/2024
5.0.181 374 4/25/2024
5.0.180 440 4/12/2024
5.0.179 545 4/4/2024
5.0.178 719 3/12/2024
5.0.177 739 2/23/2024
5.0.176 543 2/22/2024
5.0.175 693 2/21/2024
5.0.174 804 2/14/2024
5.0.173 725 2/12/2024
5.0.172 944 2/6/2024
5.0.171 992 1/31/2024
5.0.170 977 1/14/2024
5.0.169 1,112 1/10/2024
5.0.168 1,419 12/15/2023
5.0.167 1,203 12/8/2023
5.0.166 1,297 11/28/2023
5.0.165 1,091 11/28/2023
5.0.164 1,701 10/8/2023
5.0.163 1,402 9/29/2023
5.0.162 1,447 9/19/2023
5.0.161 1,125 9/18/2023
5.0.160 2,051 7/30/2023
5.0.159 1,664 7/10/2023
5.0.158 1,408 7/8/2023
5.0.157 1,522 7/5/2023
5.0.156 1,554 6/22/2023
5.0.155 1,507 6/19/2023
5.0.154 1,926 5/14/2023
5.0.153 1,522 5/8/2023
5.0.152 1,737 4/21/2023
5.0.151 1,889 4/17/2023
5.0.150 1,854 4/7/2023
5.0.149 1,737 4/3/2023
5.0.148 2,241 3/6/2023
5.0.147 2,573 2/23/2023
5.0.146 1,925 2/13/2023
5.0.145 1,922 2/9/2023
5.0.144 1,909 2/8/2023
5.0.143 2,038 2/2/2023
5.0.142 2,055 1/30/2023
5.0.141 2,989 1/3/2023
5.0.140 2,150 12/30/2022
5.0.139 2,592 12/12/2022
5.0.138 2,288 12/8/2022
5.0.137 2,939 11/11/2022
5.0.136 18,014 11/1/2022
5.0.135 20,211 10/16/2022
5.0.134 40,262 9/8/2022
5.0.133 40,130 8/29/2022
5.0.132 40,328 8/24/2022
5.0.131 41,152 7/26/2022
5.0.130 40,643 7/19/2022
5.0.129 41,744 5/13/2022
5.0.128 40,599 4/30/2022
5.0.127 7,016 3/29/2022
5.0.126 42,497 3/25/2022
5.0.125 40,865 3/17/2022
5.0.124 40,368 2/15/2022
5.0.123 42,454 2/11/2022
5.0.122 6,850 2/2/2022
5.0.121 6,818 1/28/2022
5.0.120 42,029 1/26/2022
5.0.119 39,606 1/21/2022
5.0.118 39,416 1/21/2022
5.0.117 38,006 1/13/2022
5.0.116 25,089 12/29/2021
5.0.115 24,960 12/20/2021
5.0.114 24,828 12/11/2021
5.0.113 24,804 12/6/2021
5.0.112 26,597 11/29/2021
5.0.111 24,656 11/22/2021
5.0.110 25,502 11/13/2021
5.0.109 27,461 11/8/2021
5.0.108 1,507 11/8/2021
5.0.107 27,299 11/5/2021
5.0.106 28,228 10/21/2021
5.0.105 28,076 10/14/2021
5.0.104 27,997 10/14/2021
5.0.103 1,482 10/13/2021
5.0.102 3,637 10/13/2021
5.0.101 28,743 10/11/2021
5.0.100 32,097 10/8/2021
5.0.99 3,304 10/7/2021
5.0.98 28,675 10/7/2021
5.0.97 29,066 9/23/2021
5.0.96 27,712 9/7/2021
5.0.95 28,618 7/31/2021
5.0.94 27,209 7/30/2021
5.0.93 26,819 7/30/2021
5.0.92 26,702 7/19/2021
5.0.91 27,463 7/13/2021
5.0.90 27,308 7/5/2021
5.0.89 28,725 6/16/2021
5.0.88 27,966 6/4/2021
5.0.87 27,459 5/15/2021
5.0.86 27,574 4/30/2021
5.0.85 27,498 4/26/2021
5.0.84 27,943 4/19/2021
5.0.83 27,240 4/16/2021
5.0.82 27,099 4/13/2021
5.0.81 26,946 4/12/2021
5.0.80 27,486 4/8/2021
5.0.79 26,888 4/7/2021
5.0.78 26,971 4/6/2021
5.0.77 27,121 3/29/2021
5.0.76 27,217 3/28/2021
5.0.75 27,347 3/26/2021
5.0.74 26,837 3/26/2021
5.0.73 28,128 3/24/2021
5.0.72 28,183 3/23/2021
5.0.71 25,436 3/18/2021
5.0.70 25,264 3/17/2021
5.0.69 25,727 3/12/2021
5.0.68 25,641 3/4/2021
5.0.67 2,502 3/4/2021
5.0.66 25,675 2/26/2021
5.0.65 25,829 2/17/2021
5.0.64 25,371 2/15/2021
5.0.63 25,010 2/13/2021
5.0.62 25,343 2/12/2021
5.0.61 25,875 2/7/2021
5.0.60 25,303 2/2/2021
5.0.59 25,299 2/2/2021
5.0.58 25,964 1/26/2021
5.0.57 25,486 1/25/2021
5.0.56 25,171 1/25/2021
5.0.55 25,659 1/21/2021
5.0.54 25,142 1/20/2021
5.0.53 25,119 1/19/2021
5.0.52 24,123 1/16/2021
5.0.51 25,563 1/14/2021
5.0.50 26,163 12/29/2020
5.0.49 26,399 12/23/2020
5.0.48 25,713 12/18/2020
5.0.47 26,963 12/15/2020
5.0.46 24,869 12/14/2020
5.0.45 28,332 12/10/2020
5.0.45-preview1 2,092 12/3/2020
5.0.44 25,627 12/1/2020
5.0.44-a3 1,843 11/30/2020
5.0.44-a2 1,829 11/30/2020
5.0.43 2,667 11/30/2020
5.0.43-a1 1,776 11/30/2020
5.0.42 27,294 11/29/2020
5.0.41 25,453 11/22/2020
5.0.40 25,129 11/22/2020
5.0.40-a7 18,999 11/22/2020
5.0.40-a6 19,401 11/22/2020
5.0.40-a5 1,694 11/20/2020
5.0.40-a2 2,045 11/17/2020
5.0.40-a1 1,584 11/17/2020
5.0.39 26,386 11/13/2020
5.0.38 26,370 10/11/2020
5.0.37 26,579 9/20/2020
5.0.36 25,002 9/18/2020
5.0.35 26,098 9/15/2020
5.0.34 25,138 9/9/2020
5.0.33 25,201 9/3/2020
5.0.32 25,720 8/21/2020
5.0.31 25,799 8/11/2020
5.0.30 25,291 8/10/2020
5.0.29 25,877 8/10/2020
5.0.28 25,221 7/28/2020
5.0.27 25,065 7/19/2020
5.0.26 24,934 7/9/2020
5.0.25 24,782 7/7/2020
5.0.24 25,953 6/10/2020
5.0.23 25,579 6/9/2020
5.0.22 25,620 6/9/2020
5.0.21 25,823 6/4/2020
5.0.20 25,850 6/2/2020
5.0.19 25,600 5/29/2020
5.0.18 25,743 5/25/2020
5.0.17 25,757 5/21/2020
5.0.16 25,782 5/14/2020
5.0.15 25,743 5/12/2020
5.0.14 26,232 5/11/2020
5.0.13 26,053 5/9/2020
5.0.12 25,953 5/5/2020
5.0.11 25,977 5/4/2020
5.0.10 2,445 4/24/2020
5.0.9 2,344 4/22/2020
5.0.8 27,270 4/18/2020
5.0.7 25,335 4/16/2020
5.0.6 21,483 4/15/2020
5.0.5 1,954 4/14/2020
5.0.4 22,250 4/12/2020
5.0.3 2,038 4/6/2020
5.0.2 21,947 4/4/2020
5.0.1 9,804 3/27/2020
5.0.0 8,780 3/26/2020

Clarify Hydra analytics usage
Merge branch 'master' of https://github.com/StockSharp/stocksharp
Strategy. Fix invoke OrderRegisterFailReceived
Remove license references from READMEs
Remove cross-project references
Add detailed README for Algo.Analytics
Add detailed README for Algo library
Add README for Algo.Export
Add detailed README for Algo.Compilation
Add detailed README for Algo.Analytics.CSharp
Add detailed README for Python analytics scripts
Add detailed README for Algo.Analytics.FSharp
Strategy. OnOrderReceived, OnOwnTradeReceived, OnPositionReceived methods.
datatype_extensions.py