Your system already knows when it wants to trade. It might be a custom script, a trading bot, or a service you use for signals. If it can send an HTTP POST request with Hookmode's JSON message, it can connect. Your trading conditions stay in that system. Hookmode receives the instruction, checks your configured rules, and sends the trade command to MetaTrader 5 through the Hookmode desktop app on your Windows device.
Let's follow a buy signal from your system to a demo account, then through to its close.
Give your signals a destination
Start with a connected MetaTrader 5 demo account. Install the Hookmode desktop app on a Windows PC and keep the device on and online while your automation runs.
In Hookmode, create a webhook for your system. Give it a name and symbol, then choose whether it can open buy trades, sell trades, or both.
For each allowed side, set the quantity and stop-loss distance. Add a take-profit distance if you want a fixed target. The quantity is measured in units of the asset; the distances are price movements from the entry.
These settings give your signals a starting point. A message that says “open a buy” can use the buy settings you've already saved in Hookmode.
Connect your demo accountFollow the getting-started guide for device and account setup.Choose where the signal trades
A portfolio groups the rules that connect your webhook to your trading accounts. Create a portfolio and add a rule for your demo account. Select the webhook, the account, and the symbol offered by that account's broker.
The rule's risk factor scales the webhook's quantity. Hookmode converts that quantity into the broker's volume in lots. Check the preview and set the maximum number of open positions for the rule before continuing.
You can add another rule to send the same signal to another account, with its own symbol and risk factor. Your system still sends one instruction; Hookmode evaluates the matching rules for each account.
One webhook
Open buy
Portfolio rule A
- Broker symbol
- EURUSD
- Risk factor
- 1×
Portfolio rule B
- Broker symbol
- EURUSD.m
- Risk factor
- 0.5×
An account may open a trade while another is blocked by a configured limit. Each has its own execution result.
Send the instruction from your system
Open your webhook's Setup panel. Copy the Webhook URL, then choose how to build the message your system will send.
Terminal provides a ready-made cURL command for an allowed action. Raw gives you the webhook ID and signature to use in your own JSON message. Keep the signature private: it authorizes signals for that webhook.
The URL is shared across webhooks. The ID and signature identify yours, while the action and side tell Hookmode what to do. For our buy example, the message looks like this:
{
"webhook_id": "YOUR_WEBHOOK_ID",
"signature": "YOUR_SIGNATURE",
"action": "open",
"side": "buy"
}Replace the example values with those from Setup. Configure your system to POST the message to the copied URL with Content-Type: application/json when its entry condition occurs.
- action
- open
- side
- buy
- signature
- ••••••••
- Quantity
- Asset units
- Stop loss
- Required
- Take profit
- Optional
This message uses the quantity, stop loss, and optional take profit saved for the buy side. If your system needs to supply different values per signal, allow the relevant overrides in Hookmode first. An override that isn't allowed causes the signal to be rejected.
Send your first signal to the demo account. Running the generated Terminal command also sends a trading instruction, so use it with that same demo setup.
Choose how the trade closes
Your system can send the exit instruction too. Enable Allow closing via webhook for the relevant side, then send a closing message when your buy exit condition occurs.
{
"webhook_id": "YOUR_WEBHOOK_ID",
"signature": "YOUR_SIGNATURE",
"action": "close",
"side": "buy"
}That instruction asks Hookmode to close the open buy trades created by this webhook across its accounts. A sell closing signal does the same for its open sell trades.
Open buy trades
Created by this webhook
Exit signal
Closing via webhook allowed
Hookmode → Windows + MT5
Stop loss or take profit
Included when the trade opens
The broker handles the close
Stop loss applies to both paths. Take profit is optional.
You can also let the configured stop loss and take profit handle the exit. Hookmode includes those levels when opening the trade in MetaTrader 5, and the broker handles the close when a level is reached.
A stop loss is required; a take profit is optional. Those levels also apply when your system sends closing signals, so a trade may close at the broker before a later exit instruction arrives.
Follow the result
After your system sends the signal, check it in Hookmode. Open its outcomes and trace to see how it reached your account, whether a trade opened, or where execution was blocked or failed.
A received signal and an opened trade are separate events. Compare Hookmode's result with the position in MetaTrader 5: check the account, symbol, direction, volume, and stop-loss and take-profit levels. Then follow the close through the exit path you chose.
Keep the Windows device online for new trading instructions. If it is offline, dispatch fails; the instruction isn't saved to execute when the device reconnects.
Test the connection on demoUse the first-trade guide to send a manual test and read its trace, then observe a signal from your own system.Once you've followed the full journey on demo, you have a connection you can inspect: the decision in your system, the signal in Hookmode, and the trading result in MetaTrader 5.