Summary: Your MT5 Expert Advisor requires DLL imports but the platform blocks them. This guide shows exactly where to enable DLL calls, add trusted URLs, and restart MT5 to make your EA work.




Step 1: Identify the DLL Error on MT5

Attach your EA to an MT5 chart. If you see a message like “DLL calls are not allowed” or “Expert Advisor stopped due to DLL import restriction”, proceed with this guide. Screenshot: MT5 error popup showing DLL restriction.

Step 2: Open MT5 Settings Menu

Click “Tools” on the top menu bar, then select “Options” from the dropdown. Alternatively, press Ctrl+O on your keyboard. Screenshot: Tools menu with Options highlighted in MT5.

Step 3: Go to Expert Advisors Tab

In the Options window, click the “Expert Advisors” tab. This tab controls all EA-related security settings for MT5. Screenshot: Expert Advisors tab inside Options window.

Step 4: Allow DLL Imports

Check the box labeled “Allow DLL imports”. This permission is required for any EA that calls external Windows DLL files. Do not check “Allow DLL imports for authenticated symbols only” unless your EA specifically needs it. Screenshot: Allow DLL imports checkbox highlighted.

Step 5: Configure WebRequest URL List (If Needed)

If your EA accesses online data (e.g., news, price feeds), check “Allow WebRequest for listed URLs”. Then click the URLs button. Add your EA’s required web addresses one by one. Click “Add” after each URL. Screenshot: WebRequest URL list window with sample addresses.

Step 6: Disable Confirmation Dialogs (Optional)

Uncheck “Confirm DLL function calls” only if you fully trust the EA source. For commercial or custom-coded EAs from reputable developers, this saves time. For unknown EAs, leave this checked for security. Screenshot: confirmation checkbox area.

Step 7: Restart MT5 Completely

Click “OK” to save settings. Close MT5 entirely (right-click the system tray icon and select “Exit”). Then reopen MT5. Attach your EA again. The DLL error should disappear. Screenshot: MT5 system tray exit menu.

Reference: MetaQuotes Help Desk – MT5 Expert Advisors Security Settings.