Installation
Get up and running with PineHook in 5 minutes.
Follow these steps to connect TradingView alerts to your MT5 terminal.
System Requirements#
- MetaTrader 5 build 2000+ on Windows 8.1/10/11
- TradingView Essential or higher (webhooks require a paid plan)
- Stable internet connection
Step 1: Create Your Account#
- Go to pinehook.io and click Get Started.
- Choose a plan.
- Enter your email and create a password.
- Verify your email address.
- Log in to your dashboard.
Step 2: Get Your License Key#
- Navigate to Licenses in your dashboard sidebar.
- Click + New License.
- Give it a name (e.g., "My Trading PC", "VPS Server", "Demo Account").
- Click Create License and copy your license key.
- (Optional) Set a Secret Key by opening the three-dot menu and clicking Set Secret Key.
Secret Key Protection
A Secret Key prevents anyone who sees your License ID from connecting their own EA to your PineHook subscription. Keep it secure and never include it in webhook messages. It belongs only in your EA settings.
Step 3: Download and Install the Bundle#
-
Open your Downloads page in the PineHook dashboard and click Download bundle. You'll get a single ZIP file (e.g.
PineHook-0.0.5.zip) that contains the Expert Advisor (PineHook.ex5) and the WebSocket library (PineHook.dll) inside anMQL5/folder structure. -
In MetaTrader, go to File → Open Data Folder. This opens your terminal's data folder in your system's file explorer.
-
Install the bundle using one of these two options:
Option A: drag the
MQL5folder (fastest). Open the ZIP, then drag theMQL5folder from inside the ZIP into the data folder window that opened in step 2. When Windows asks whether to merge folders, choose Yes / Replace / Merge. Both files land in the correct places at once.Option B: place each file by hand. Extract the ZIP anywhere, then copy the two files individually:
File Destination PineHook.ex5MQL5/Experts/PineHook.dllMQL5/Libraries/Both files are inside the ZIP at the matching path (
MQL5/Experts/PineHook.ex5andMQL5/Libraries/PineHook.dll), so the option-A drag is just option B done in one motion. -
Restart MetaTrader or right-click the Navigator panel and select Refresh.
Installation Directory Structure
Main EA executable - copy this file here
Secure WebSocket library - copy this file here
How to find your MT5 Data Folder:
- Open MetaTrader 5
- Go to File → Open Data Folder
- This will open the directory in your file explorer
After copying the files, restart MT5 or refresh the Navigator panel (right-click → Refresh) to see the EA.
Installation Directory Structure
Copy the following two files into your MT5 Data Folder:
- PineHook.ex5 (REQUIRED) →
MT5 Data Folder / MQL5 / Experts /– Main EA executable - PineHook.dll (REQUIRED) →
MT5 Data Folder / MQL5 / Libraries /– Secure WebSocket library
How to find your MT5 Data Folder:
- Open MetaTrader 5
- Go to File → Open Data Folder
- This will open the directory in your file explorer
After copying the files, restart MT5 or refresh the Navigator panel (right-click → Refresh) to see the EA.
Don't rename PineHook.dll
The EA imports the WebSocket library by the exact filename PineHook.dll. If you rename it (for example by adding a version number), the EA will fail to load with error 126 at startup. The ZIP always contains the file with the correct name, so just leave it alone.
Finding the EA
After restarting MT5, look for PineHook in the Navigator panel under Expert Advisors.
Anti-Virus Blocking?
Some anti-virus software may flag EA files. If the download is blocked, add an exception for the file, or temporarily disable the anti-virus during installation.
Multiple Terminals
To run PineHook on multiple MT5 terminals, install a copy of the bundle in each terminal and use a separate license key for each.
Step 4: Configure MT5#
Enable the required permissions in Tools → Options → Expert Advisors:
- Allow algorithmic trading — required for trade execution.
- Allow DLL imports — required for WebSocket connectivity.

Click OK, then click the Algo Trading button in the toolbar until it turns green.
Critical Settings
Without both settings enabled and Algo Trading active, the EA cannot connect or execute trades.
Behind a Firewall?
If you're on a restricted network, ensure MT5 (terminal64.exe) has outbound access to relay.pinehook.io on port 443.
Step 5: Configure the EA#
- Open any chart in MT5.
- Drag PineHook from Navigator → Expert Advisors onto a chart. The EA only needs to be on one chart to receive signals for all symbols.
- In the Inputs tab:
- License Key — paste the key from Step 2 (required).
- Secret Key — paste it here if you set one; otherwise leave blank.
- Review the remaining settings and configure them to your preferences.

- Switch to the Common tab and enable Allow live trading.
- Switch to the Dependencies tab and enable Allow DLL Imports.
- Click OK.
The EA icon should appear in blue in the chart's top-right corner when connected. To reopen the Inputs window later, double-click the blue EA icon (the small "hat") in the chart's top-right corner (the icon next to the name, not the name text), or right-click the chart → Expert List, select PineHook, and click Properties.
One chart per account — not one chart per symbol
A single chart handles every symbol for your broker, so attach PineHook to one chart only. Don't add it to a second chart on the same MT5 account: a license allows one live connection per account, so the newest chart takes over and the older one disconnects. When that happens, the disconnected instance prints a note in the Experts tab explaining that the license is already connected and that one chart covers all symbols.
Signal Parameters Take Priority
Signal parameters always override EA defaults. If the EA has a default lot size of 0.1 but the signal specifies size_lots=0.05, the trade uses 0.05 lots. See the EA configuration reference for all available settings.
Step 6: Set Up a TradingView Alert#
- Open TradingView and create an alert (right-click chart → Add Alert, or Alt+A).
- Set your trigger conditions.
- In the Notifications section, check Webhook URL and enter:
https://relay.pinehook.io/webhook - In the Message field, use one of these formats:
Simple comma-separated format
YOUR_LICENSE_KEY,buy,EURUSD,size_lots=0.1,sl_pips=50,tp_pips=100CSV Format
Simple comma-separated format
YOUR_LICENSE_KEY,buy,EURUSD,size_lots=0.1,sl_pips=50,tp_pips=100JSON (Minified)
Compact JSON format - saves space in TradingView alerts
{"license":"YOUR_LICENSE_KEY","action":"buy","symbol":"{{ticker}}","size_lots":0.1,"sl_pips":50,"tp_pips":100}JSON (Formatted)
Formatted JSON for readability
{
"license": "YOUR_LICENSE_KEY",
"action": "buy",
"symbol": "{{ticker}}",
"size_lots": 0.1,
"sl_pips": 50,
"tp_pips": 100
}Paid Plan Required
Webhooks require a TradingView Essential plan or higher. Free accounts cannot send webhooks.
Dynamic Alert Messages
You can use {{strategy.order.alert_message}} in the Message field instead of hardcoding the signal. This lets you define signals directly in Pine Script, enabling dynamic lot sizes, ATR-based stops, and more. Learn how →
Step 7: Test Your Setup#
Before going live, verify each part works:
Check EA Connection#
- Dashboard shows CONNECTED status.
- EA chart icon is blue.
- Experts tab logs "Connected successfully".
Send a Test Signal#
- Trigger your TradingView alert manually.
- Signal appears in your dashboard Signal Logs within seconds.
- EA Experts tab confirms receipt.
- Detailed testing guide →
Test Before Going Live
The Signal Logs page in your dashboard has two tools: a signal format validator where you can paste and check your message, and an EA connection test that sends a signal through the full pipeline without executing a trade.
Verify Trade Execution#
- Trade appears in the MT5 Trade tab.
- Lot size, SL, and TP match your signal.
- Close the test position manually.
Test on Demo First
Always verify your setup on a demo account before trading real funds.
Troubleshooting#
Connection issues:
- Verify your license key and secret key are entered correctly.
- Confirm "Allow DLL imports" is enabled in MT5 settings.
- Check that MT5 has internet access.
- Review error messages in the Experts tab.
Signals not arriving:
- Check that your TradingView alert is active and not paused.
- Review TradingView's Alert Log and confirm it's sending to the correct license ID.
- Verify the webhook URL:
https://relay.pinehook.io/webhook - Check your signal logs in the PineHook dashboard.
- Confirm your TradingView plan supports webhooks.
Trades not executing:
- Enable "Allow algorithmic trading" in MT5.
- Check that the Algo Trading toolbar button is green.
- Verify sufficient margin is available.
- Confirm the symbol exists on your broker.
Next Steps#
- EA configuration reference — all available settings
- Signal commands — full command and parameter reference
- Stop loss and take profit — configuring SL/TP in signals