HTTP error 1009: MetaTrader cannot reach ProTradingLabs (often on a Windows VPS)
Why the EA shows "HTTP 1009" even though the WebRequest addresses are set, and the command that fixes it in a minute.
Your EA panel shows for example « Le serveur ProTradingLabs a renvoyé une erreur (HTTP 1009) » (the ProTradingLabs server returned an error), with the support code API_SERVER_ERROR. On InfinitePass, the panel says the economic calendar is unavailable (« Le calendrier des annonces économiques est indisponible »), with the code CALENDRIER_HTTP:1009. Yet the WebRequest addresses are set and your browser opens the site without any problem.
Where the error comes from
Error 1009 does not come from our servers: your request never reaches us. MetaTrader itself refuses the secure connection.
Since build 6285, MetaTrader 5 checks the connection against the certificates installed in Windows. On a freshly installed Windows, especially a Windows Server VPS, a root certificate used by our connection can be missing. Windows only installs it when a program asks for it, and MetaTrader does not ask.
The browser has its own certificates, so testing the site in the VPS browser proves nothing.
The fix: one PowerShell command
- On the computer or VPS running MetaTrader, open the Start menu, type
PowerShelland open Windows PowerShell. Copy this command, paste it into the window, then press Enter:
Invoke-WebRequest https://api.protradinglabs.com/infinite-pass/calendar -UseBasicParsingWindows contacts ProTradingLabs and installs the missing certificate along the way. The command prints a result starting with
StatusCode : 200.- Close MetaTrader completely, then reopen it. The EA reconnects within a minute.
You only need to do this once per machine, for all your MetaTrader terminals and all your ProTradingLabs EAs.
If the command shows a certificate or secure connection error, automatic certificate updates are turned off on this machine. This is common on VPSs. Ask your VPS provider to turn them on or to install Microsoft's up-to-date root certificates, then run the command again. If the problem persists, contact support with a screenshot of the PowerShell window.
Check that this is the right problem
- The message contains 1009. Another code (500, 502, 503…) means an outage on our side: the EA retries on its own, there is nothing to do.
- MetaTrader is build 6285 or later: Help › About menu.
- The addresses
https://api.protradinglabs.comandhttp://ws.protradinglabs.comare listed in Tools › Options › Expert Advisors › Allow WebRequest for listed URL. If one is missing, the error is different: see MetaTrader error codes explained.
Nothing is lost during the outage: ProTradingData sends the trades made in the meantime to your journal as soon as the connection is back.