Adding Licensing to an EA
Download your licensing file, add one include line, compile and test.
Adding licensing takes a few minutes. You add one line to your source code; nothing else changes.
1. Download your licensing file
- In your Vendor Dashboard open EA Licensing and choose the product.
- Answer the questions about your code – see Answering the download questions. Not sure? The page has an Ask an AI box: copy its prompt into Claude or ChatGPT with your source code and it tells you what to tick.
- Click Download licensing file.
- Extract the ZIP into the
MQL4/Include/orMQL5/Include/folder of your MetaTrader data folder, so the file ends up inInclude/FXNook/.
2. Add the include line
Make this the very first line of your source file, above everything else. Use the exact line shown on the download page:
#include <FXNook/FXNook_License_1234.mqh>3. Compile
Compile as normal in MetaEditor. The file renames your OnInit and OnTick as the compiler reads them and puts the licence check in front. If you see an error, see Compile errors and what they mean.
4. Test before uploading
- In MetaTrader add
https://fxnook.comunder Tools > Options > Expert Advisors > Allow WebRequest for listed URL. - Attach your compiled EA with an empty licence key.
- You must see a red LICENCE CHECK FAILED – NOT TRADING panel in the top-left, and a line starting
FXNook:in the Experts tab.
A smiley face and no FXNook badge means licensing is not active. Do not upload that build.
5. Upload
Upload the compiled .ex4 or .ex5 to your product. Keep the .mqh private – see Security rules.
Was this guide helpful?
Thank you - that helps us improve these guides.
Need help?
Most questions are answered by the guides above. If yours is not, our team will help.
Open Support Ticket