Reference .NET libraries and packages
.NET libraries
cTrader allows for referencing .NET libraries inside the code of cBots and custom indicators. To do so, open the Reference manager window by clicking the Manage references button at the top of the code editor.

In the newly opened window, select the Browse tab.

Click Browse, select a locally stored .dll file, then click Open. Afterwards, click Apply to save your changes.
To use your newly imported library, reference the related namespace in your code.
1 2 3 | |
This will enable you to use classes from your library directly in your code.
1 2 3 4 5 | |
NuGet packages
You can also reference custom NuGet packages in your cTrader algos. For a detailed example of how to use and install NuGet packages, check out the article on working with external IDEs.
Remember that to install NuGet packages you can use the following tools:
- The
Install-Packagecommand available in the NuGet package manager console. - The Visual Studio NuGet package manager GUI.
- The .NET CLI.