Projects
Shared Libraries
Create Libraries
Follow these steps to create a library:
- Open a project.
- In the left navigation menu, click the QuantConnect icon.
- In the Project panel, click .
- Click .
- In the Input Library Name field, enter a name for the library.
- Click .
- In the left navigation menu, click the Explorer icon.
- In Explorer panel, open the Library.pyLibrary.cs file and implement your library.
The template library files are added to a new project in the Library directory in your organization workspace.
Add Libraries
Follow these steps to add a library to your project:
- Open the project.
- In the left navigation menu, click the QuantConnect icon.
- In the Project panel, click .
- Click the Choose a library... field and then click a library from the drop-down menu.
- Click Calculators). (e.g.
- Import the library into your project to use the library.
The library files are added to your project. To view the files, in the right navigation menu, click the Explorer icon.
using Calculators; namespace QuantConnect.Algorithm.CSharp { public class AddLibraryAlgorithm : QCAlgorithm { private TaxesCalculator _taxesCalculator = new(); } }
from Calculators.TaxesCalculator import TaxesCalculator class AddLibraryAlgorithm(QCAlgorithm): taxes_calculator = TaxesCalculator()
Rename Libraries
To rename a library, open the library project file and then rename the project.
Remove Libraries
Follow these steps to remove a library from your project:
- Open the project that contains the library you want to remove.
- In the left navigation menu, click the QuantConnect icon.
- In the Project panel, hover over the library name and then click the trash can icon that appears.
The library files are removed from your project.
Delete Libraries
To delete a library, delete the library project file.