Expert Advisor Setup Guide
Phiên bản tiếng ViệtTo use the PineSignal webhook service with MetaTrader 5, you need to install the Expert Advisor (EA) on your MetaTrader 5 software. The guide below will help you install and configure the EA correctly.
Step 1: Download the EA
Download the EA from our repository:
Note: The EA is provided as a zip file containing all necessary files. The Standalone version does not require any external libraries.
Step 2: Extract & Install
- Extract the PineSignal_EA.zip file to a temporary folder
- Open the path to MetaTrader 5's Data Files:
Menu File > Open Data Folder
- Navigate to the MQL5 > Experts folder
- Copy all files from the extracted folder to Experts folder
Important: You'll see the PineSignal_EA_xx.ex5 file in the folder. This is the file that will be used in MT5.
Step 3: Configure the EA
- Restart MetaTrader 5 (if it's open)
- Open Navigator in MT5 (Ctrl+N)
- Expand the "Expert Advisors" folder
- Find "PineSignal_EA_vx.x" and drag it onto a chart
- In the configuration window that appears, enter parameters:
- API_Key: Enter your API key from the API keys management page
- Lots: 0.01 by default
- Check Interval: Leave as 1
- Switch to the "Common" tab and ensure:
- Check "Allow ALgo trading"
- Click "OK" to activate the EA
- Navigate to Tools > Options > Expert Avisors and add https://pinesignal.com to The WebRequest URL
- Tick the box Allow Algorithmic Trading
- Click "OK" to finish.
Confirmation: If configured correctly, you should see the message "PineSignal EA: Running successfully" in the "Experts" tab of the "Toolbox" window (Ctrl+T).
Step 4: Connect to TradingView
Now that the EA is configured, you need to set up alerts in TradingView to send signals:
- In TradingView, create an alert for your strategy
- In the "Webhook URL" section, enter:
- In the "Message" field, enter the JSON payload with the format:
{ "api_key": "YOUR_API_KEY", "symbol": "EURUSD", "action": "BUY", "lots": 0.01, "sl": 1.08000, "tp": 1.09500, "magic_number": 12345, "comment": "PineSignal" }
- Or simple format:
API,BUY,SYMBOL,LOTS,TP,SL
- Adjust other parameters according to your strategy
- Save the alert
Issues and Troubleshooting
EA does not receive signals
- Check if the EA is running by looking for messages in the "Experts" tab
- Ensure MT5 is allowed to connect to the internet and port 9876 is not blocked by a firewall
- Verify that API keys in both the EA and TradingView message match
Invalid Symbol Error
- Make sure the symbol in the webhook message matches the format in MT5
- Some brokers may use different symbol notations (e.g., EURUSD.m, EURUSD\, etc.)
Cannot Open Position Error
- Check if you have sufficient balance in your account
- Verify that Stop Loss and Take Profit values are valid
- Ensure that the "lots" value is within the allowed limits of your broker
Additional Support: If you're still experiencing issues after trying the steps above, please contact us via email at [email protected] for assistance.