Code Protection

Uglify MQL Code

Obfuscate MQL4/MQL5 source by renaming variables and functions—reduce reverse-engineering risk while keeping EA/indicator behavior intact.

What this feature does

Uglify rewrites your .mq4, .mq5, or .mqh file so internal names are harder to read. #property lines and input parameters stay readable for MetaTrader. Compiled behavior should match the original after recompile in MetaEditor.

Best for vendors distributing source or developers sharing snippets who want basic protection—not a substitute for full IP legal protection.

MQL Code Uglifier upload and output

1 Upload .mq4, .mq5, or .mqh source file

2 Set output filename, then click Uglify Code

Step-by-step usage

  1. Go to MQL Tools → Uglify Code or /pages/code-enhancements/uglify.
  2. Drag-and-drop or browse for your .mq4, .mq5, or .mqh file (max 10MB).
  3. Set output filename (auto-filled from upload).
  4. Click Uglify Code and wait for processing.
  5. Download the uglified source and recompile in MetaEditor before distribution.
  • Tip: Keep an unobfuscated backup—uglified code is harder for you to maintain too.
  • Tip: Test compiled output in Strategy Tester after uglify; rare edge cases may need manual fixes.
  • Tip: Pair with Account Binding or Expiry for stronger distribution control.

What is preserved

The tool intentionally keeps #property directives and input() declarations intact so MetaTrader inputs panel still works. Core trading logic is obfuscated, not removed.