If you are selling an MQL5 Expert Advisor through the MQL5 Marketplace, your own website, or directly to clients, you need license protection. Without it, every customer can share your EA with anyone. This tutorial walks you through adding hardware-bound licensing in under 10 minutes.
Sign up at mtlicense.com in 30 seconds with no credit card. Once in, click New Product, name your EA, and copy the Product ID. You will also need your API Key from account settings.
Download LicenseManager5.mqh from your dashboard. Place it in your MQL5 includes folder:
Replace the placeholders with your real API key and product ID. Compile as normal. That is it.
The SDK handles the HTTPS request, sends the account number, parses the response, and returns true or false. Your EA stays clean.
Load the EA on a chart without adding your account to the dashboard. It should fail to initialize. Then add your account number as a test license and reload. It should run. This confirms everything works end to end.
When a customer pays, log into your dashboard and add their MT5 account number. They are live immediately with no recompile and no file redistribution needed. To revoke, delete their license. Done.
The MQL5 Marketplace takes 30% commission. Selling directly with MTLicense means you keep 100% of every sale.
Free to start. Takes 10 minutes. No server setup required.
Create Free Account →