Expert Advisor Setup Guide

Phiên bản tiếng Việt

To 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

  1. Extract the PineSignal_EA.zip file to a temporary folder
  2. Open the path to MetaTrader 5's Data Files:
    Menu File > Open Data Folder
  3. Navigate to the MQL5 > Experts folder
  4. 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

  1. Restart MetaTrader 5 (if it's open)
  2. Open Navigator in MT5 (Ctrl+N)
  3. Expand the "Expert Advisors" folder
  4. Find "PineSignal_EA_vx.x" and drag it onto a chart
  5. 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
  6. Switch to the "Common" tab and ensure:
    • Check "Allow ALgo trading"
  7. Click "OK" to activate the EA
  8. Navigate to Tools > Options > Expert Avisors and add https://pinesignal.com to The WebRequest URL
  9. Tick the box Allow Algorithmic Trading
  10. 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:

  1. In TradingView, create an alert for your strategy
  2. In the "Webhook URL" section, enter:
  3. 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"
    }
  4. Or simple format:
                API,BUY,SYMBOL,LOTS,TP,SL
  5. Adjust other parameters according to your strategy
  6. 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.