Trading7 min read
MT5 Expert Advisor setup for Hyperliquid, step by step
Install the HyprBridge Expert Advisor in MetaTrader 5 and trade your own Hyperliquid account from a chart panel: approvals, WebRequest, inputs and fixes.
Dylan Shilts, Founder of Hypr Markets
Published
On this page
This MT5 Expert Advisor setup guide for Hyperliquid takes you from nothing to a first order placed from MetaTrader 5 on your own Hyperliquid account. It uses the HYPR Bridge EA: our HyprBridge Expert Advisor, which runs on any desktop MetaTrader 5 terminal and sends orders through the Hypr Markets bridge to Hyperliquid. No MetaTrader 5 server licence is involved, and a free demo account from any MetaTrader 5 provider is enough to host the EA.
The guide is for traders on a Hypr Markets terminal whose operator has switched on MetaTrader 5. It assumes you have a wallet with some USDC on Hyperliquid, or can add money during setup. Expect about ten minutes, most of it in MetaTrader's settings. Nothing here is financial advice, and the first order should be small.
What you need before you start
| Item | Detail |
|---|---|
| MetaTrader 5 for desktop | From the official MetaQuotes download page. The EA runs in the desktop terminal. |
| An MT5 account to attach the EA to | Any provider's free demo account works. Its balance is not used. |
| A wallet on the operator's terminal | With USDC on Hyperliquid, or use Add money during setup. |
| At least $10 | The bridge refuses an opening order worth less. |
If you have not traded on Hyperliquid before, read how to trade on Hyperliquid first. MT5 changes where you click, not how perpetual futures, margin and funding work.
Step 1: Install MetaTrader 5 and open a demo account
Download MetaTrader 5 for your computer from MetaQuotes and install it. Do not use installers from other sites. When MetaTrader 5 starts, it usually offers to open an account: pick any provider in the list and choose a demo account. The EA needs a chart to sit on, and a demo account gives you one. Your Hyperliquid account is what gets traded.
Step 2: Open the MetaTrader 5 page on the terminal
On your operator's terminal, open the account menu and choose MetaTrader 5. The page explains the option your operator offers and has the downloads. Sign in with your wallet. If the page says MetaTrader 5 is not available, the operator has not switched it on.
Step 3: Approve the trading key and the fee
Click to create a trading key and pick how long it lasts: 30, 90 or 180 days. Your wallet asks you to sign approveAgent for an agent named hypr-mt5. This is a Hyperliquid API wallet: it can place and cancel orders and change leverage, but it cannot withdraw or transfer. Check the name in the wallet prompt before you sign.
If you have not approved this operator's builder fee before, your wallet then asks for approveBuilderFee. It lets the operator earn its fee, at the rate shown, on your orders. How builder codes work explains it. Neither signature costs gas or moves money.
If the account is empty, use Add money now, or fund it later.
Step 4: Save the EA token and the bridge URL
The account becomes active straight away. The page shows, once:
- your MT5 login, for example
5000001; - the EA token, the credential the EA signs in with;
- the bridge URL, an
https://address; - the downloads:
HyprBridge.ex5and the sources zip.
Copy the token into a password manager, then click I saved it to hide it. It is not stored in your browser. There is no MT5 password with this option: the token is the credential. If you lose it, Replace token makes a new one.
Step 5: Install HyprBridge.ex5
- Download
HyprBridge.ex5from the page. - In MetaTrader 5, choose File > Open Data Folder.
- Copy
HyprBridge.ex5intoMQL5/Experts. - In the Navigator, right-click Expert Advisors and choose Refresh. HyprBridge appears in the list.
Prefer to build it yourself? The sources zip has HyprBridge.mq5 and the five include files. Copy them to MQL5/Experts and MQL5/Include/Hypr, open HyprBridge.mq5 in MetaEditor (F4) and compile (F7).
Step 6: Allow WebRequest for the bridge URL
MetaTrader 5 blocks web calls from Expert Advisors unless you allow the address. MetaQuotes' WebRequest documentation describes the list of allowed URLs.
- Open Tools > Options > Expert Advisors.
- Tick Allow algorithmic trading.
- Tick Allow WebRequest for listed URL and add the bridge URL exactly as the page shows it: the scheme and host, no path.
- Click OK.
This list can only be set in that dialog. Until the URL is on it, every call from the EA fails with error 4014.
Step 7: Attach the EA and paste the inputs
- Open any chart.
- Drag HyprBridge from the Navigator onto it.
- On the Inputs tab, paste the bridge URL into
InpBridgeUrland the token intoInpEaToken. - Leave
InpSelfTestoff. The self-test places orders on its own, so the EA refuses to start with it on against a real bridge. - Click OK, then turn on Algo Trading in the toolbar.
The status line shows connected: HYPR login with your login and the number of symbols; the panel also shows the symbol's price and Bal, Eq, Mrg and Free. On the first sync, your Hyperliquid balance arrives as a deposit and any open positions appear.
Other inputs you may want: InpSymbol (the panel's market, for example ETH), InpVolume (default size), InpDeviationPoints (the worst slippage you accept on market orders) and InpConfirmOrders (a confirmation before each order, on by default).
Step 8: Place a small first order
- Type a coin in the Symbol box, for example
BTC, and press Enter. The terminal's suffix is added for you, so it readsBTC.hpor similar. - Set Volume in coins. One lot is one coin. At a BTC price of $90,000, a volume of 0.00013 is about $11.70, just over the $10 minimum.
- Press BUY. The status line shows the answer, for example
BUY DONE. - Open the Hyperliquid app or your web terminal: the same position is there.
- Use SET SL/TP to add a stop loss and take profit (
0removes one). They are placed on Hyperliquid as reduce-only triggers. - Press CLOSE to close the whole position.
The panel's numbers follow Hyperliquid: Bal is cash, Eq is equity including open profit and loss, Mrg is margin used and Free is what new positions can use. Leverage is set per market in the terminal's account panel, up to the operator's maximum. Know your liquidation price before sizing up.
Optional: chart Hyperliquid markets in MT5
Set InpCustomSymbols to true and the EA creates custom symbols for the operator's markets and feeds them live bridge prices. You can then chart them with MT5's indicators. MT5 has no trade server behind a custom symbol, so the order window does nothing on them: keep trading from the panel.
Troubleshooting
| What you see | What to do |
|---|---|
WebRequest is not allowed for this URL or error 4014 | Step 6: add the bridge URL, scheme and host only |
HTTP 401 or unknown token | Paste the latest token. A replaced or revoked token stops working |
the bridge URL must start with https:// | Copy the URL from the page again |
LIMIT_VOLUME | The order is above the operator's per-order limit. Use a smaller volume |
INVALID_VOLUME or below $10 | Increase the volume |
TRADE_DISABLED | The account is paused (operator pause, panic halt, drift or an outage). Closing still works |
| Account line turns orange | A pause is active. Wait a few seconds for drift to clear, or check the terminal |
When the trading key expires, approve a new one on the MetaTrader 5 page. You get a new login and token; positions on Hyperliquid are not affected. Non-custodial MT5 explains what each credential can do and how to switch everything off.
Frequently asked questions
Does the HYPR Bridge EA work on a demo account?
Yes. The EA uses the demo account's chart as a screen and ignores its balance. Orders go through the bridge to your Hyperliquid account, so they are real orders with real money.
Why does the EA fail with error 4014?
MetaTrader 5 blocks web calls from Expert Advisors to addresses that are not on its allowed list. Add the bridge URL in Tools, Options, Expert Advisors, under Allow WebRequest for listed URL, using the scheme and host only.
Can I run the HyprBridge EA on the MetaTrader 5 mobile app?
No. The EA runs in the desktop terminal. Traders who want MT5's mobile apps need an operator that runs the HYPR Server Bridge for MetaTrader 5 on its own licensed MT5 server.
Can I use other Expert Advisors with it?
Other Expert Advisors send orders to the MT5 account they run on, not to Hyperliquid. The HyprBridge panel is how orders reach your Hyperliquid account with this option.
What happens to my positions if I remove the EA?
Nothing. Positions live on Hyperliquid. Removing the EA, closing MetaTrader 5 or revoking the token stops MT5 access, and you can manage the positions in the web terminal or the Hyperliquid app.