cTrader
Guide on how to integrate licensing library into indicators and cBots
Adding licensing to your indicator/cBot
After you have created an indicator or robot you will need to integrate Licensing Library to validate users' licenses and protect your product from unauthorized distribution.
Add PoshTrader.Licensing.dll as a reference using Reference Manager
Import namespace of the library by adding
using PoshTrader.Licensing;
Add Item Attributes to the main class
Grant Full Access rights so licensing can communicate with our server
Declare
ItemLicense
objectCreate the license on startup
Check license status during runtime
Tips: You can build an installation algo file by excluding Version in Item Attributes. This will allow you to publish installers of your indicators and cBots on the official cTrader website.
See an example here: https://ctrader.com/algos/indicators/show/2247
Creating a distribution file
To create the distribution file, please follow the steps below for creating an Algo file containing your indicators and/or robots.
Navigate to the Automate tab in the left sidebar
Select an indicator/robot you wish to export
Press
Build
(Do NOT useBuild with Source Code
which would make your code unprotected!)
After you finish building your indicator/cBot you will find the distribution file as a .algo file located in %UserProfile%\Documents\cAlgo\Sources\ in Indicators or Robots folder.
Last updated