Certainly! You're looking to leverage the second PC (PC2) to help you optimize your trading strategy on MetaTrader 5 (MT5) by distributing optimization workload across both machines.
MT5 supports a feature called Strategy Tester Agent, which allows you to use multiple computers on the same network to speed up optimization by distributing tasks.
Here’s a step-by-step guide to set up distributed optimization between PC1 (Windows 11) and PC2 (Windows 10):
Step 1: Prepare Both PCs
-
Ensure both PCs have the same MT5 Build Version
- Open MT5 on both PCs
- Click on
Help → About and verify the build number is exactly the same.
- If not, update MT5 on the PC with the older version.
-
Make sure both PCs are connected on the same local network
- Since both PCs are connected via Wi-Fi to the same router, they should be on the same subnet.
Step 2: Enable "Allow WebRequest for listed URL" on Both PCs
Some features require this option to be enabled, though for local testing it might not be mandatory. Still, it can prevent connectivity issues.
- In MT5, go to:
Tools → Options → Expert Advisors tab
- Check Allow automated trading and Allow DLL imports if you use DLLs.
- Check Allow WebRequest for listed URL, and add the local IP addresses (optional).
Step 3: Configure Strategy Tester Agents on Both PCs
On PC2 (the secondary machine, will act as a Tester Agent):
- Run MT5 on PC2.
- Go to the menu:
View → Strategy Tester.
- In Strategy Tester panel, click on
Tester Agents tab (usually a tab or icon—this tab may only be visible if you click on “Strategy Tester” and then look at the bottom or side for “Tester Agents” or click the “...” next to the Agent list).
- In the Tester Agents window, click on Add →
Local Network and/or Add → Internet modes (for LAN usage, choose Local Network).
- Give your PC2 a name if requested. Note or keep track of its local IP address (can be found by running
ipconfig in Command Prompt).
- Make sure the "Agent" (Tester Agent) on PC2 is running and online. It should appear in the Agents list if connectivity is OK.
On PC1 (the main machine where you want to start optimization):
- Open MT5.
- Open
Strategy Tester.
- Go to the
Test tab, select your EA and symbol, then choose Optimization mode and set parameters as normal.
- Before starting optimization, click on
Agents (or Tester Agents) button/icon in Strategy Tester window.
- You should see your PC2 appear as an available agent (showing IP address and status connected).
- If PC2 agent does not appear automatically, click
Add → Local network, and enter PC2’s IP address manually.
Step 4: Start Distributed Optimization
- On PC1, after confirming the Tester Agents list shows at least two agents (usually your own PC counts as one, plus PC2).
- Click Start to run the optimization.
- MT5 will distribute the optimization tasks among PC1 and PC2, speeding up the process.
Step 5: Troubleshooting Connectivity (if necessary)
- Make sure firewall on both PCs allows MT5 connections (Ports used by MT5 are usually dynamic for agents, but generally it works if the MT5 application is allowed).
- You can temporarily disable Windows Firewall to test connectivity. If it works, configure rules to allow MT5 traffic.
- If you have antivirus software with a firewall module, ensure it does not block MT5 traffic.
Additional Tips:
- For best performance, connect both PCs via Ethernet cable rather than Wi-Fi.
- Keep both PCs running MT5 agents at all times when you want to optimize strategy simultaneously.
- MT5 allows adding more Agent PCs to further increase optimization speed.
If you want, I can provide detailed instructions on firewall setup, or how to verify IP addresses for your PCs. Let me know!