VOOZH about

URL: https://www.nuget.org/packages/StockSharp.Algo.Compilation/

⇱ NuGet Gallery | StockSharp.Algo.Compilation 5.0.11




👁 Image
StockSharp.Algo.Compilation 5.0.11

Prefix Reserved
dotnet add package StockSharp.Algo.Compilation --version 5.0.11
 
 
NuGet\Install-Package StockSharp.Algo.Compilation -Version 5.0.11
 
 
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.Compilation" Version="5.0.11" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Algo.Compilation" Version="5.0.11" />
 
Directory.Packages.props
<PackageReference Include="StockSharp.Algo.Compilation" />
 
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.Compilation --version 5.0.11
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StockSharp.Algo.Compilation, 5.0.11"
 
 
#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.Compilation@5.0.11
 
 
#: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.Compilation&version=5.0.11
 
Install as a Cake Addin
#tool nuget:?package=StockSharp.Algo.Compilation&version=5.0.11
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

StockSharp Algo.Compilation

Algo.Compilation provides runtime code compilation services for the StockSharp trading platform. It enables you to compile trading algorithms and analytics scripts written in different languages, including C#, Visual Basic, F#, and Python, directly from your application.

Features

  • Multi-language support – Uses Roslyn for C# and Visual Basic, the F# compiler for F# scripts, and IronPython for Python integration.
  • Dynamic script execution – Compile and execute code snippets or whole modules at runtime. This allows building strategies and analytics that can be modified without recompiling the entire application.
  • Python utilities – On initialization, common Python helper scripts are extracted to Paths.PythonUtilsPath so they can be imported from your own Python code.
  • Compiler registry – Registers available compilers with ConfigManager so that other StockSharp components can obtain the correct compiler based on file extension.
  • Custom type descriptors for Python objects – Allows Python classes to expose properties in .NET components such as property grids.
  • Caching support – Integrates with CompilerCache to reuse previously built assemblies when possible.

Initialization

Before compiling any code you must call CompilationExtensions.Init once during application startup:

await CompilationExtensions.Init(logs, extraPythonCommon, cancellationToken);
  • logs – implementation of ILogReceiver that collects output from the compilers and the Python engine.
  • extraPythonCommon – optional additional Python files to copy into the utilities folder.
  • cancellationToken – allows cancelling the initialization.

This method configures the IronPython engine, writes common Python scripts to Paths.PythonUtilsPath, and registers the compilers.

Compiling Code

The CodeInfo class represents a source file and contains helper methods to compile it. The basic workflow is:

var code = new CodeInfo
{
 Name = "MyScript",
 Text = sourceCode, // your script text
 Language = FileExts.CSharp, // or FileExts.FSharp, FileExts.Python, ...
};

var errors = await code.CompileAsync(type => typeof(IMyInterface).IsAssignableFrom(type), null, CancellationToken.None);

if (!errors.Any())
{
 var instance = Activator.CreateInstance(code.ObjectType!);
 // use the compiled object
}

CodeInfo manages assembly, project, and NuGet references. It also caches compiled assemblies when the compiler supports it.

Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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 (3)

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

Package Downloads
StockSharp.Apps.Designer

Designer: A Free App for Creating Algorithmic Trading Strategies Without Coding

StockSharp.Apps.Hydra

Hydra free market data downloader and database

StockSharp.Studio.Runner

Runner - cross platform application to run any types of strategies

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.11 1,566 9/11/2025
5.0.10 382 9/1/2025
5.0.9 280 8/30/2025
5.0.8 369 8/10/2025
5.0.7 763 7/23/2025
5.0.6 403 7/20/2025
5.0.5 263 7/14/2025
5.0.4 252 7/8/2025
5.0.3 238 7/4/2025
5.0.2 277 6/30/2025
5.0.1 314 6/20/2025
5.0.0 260 6/18/2025