Pillinger Works

MetaTrader 5

Sync with the Pillinger Trading Journal

The Pillinger MT5 Sync Agent connects your MetaTrader 5 trading account to the Pillinger Trading Journal. Once configured, the Expert Advisor automatically synchronizes supported trading data with your journal, so you do not have to enter every trade manually.

This guide walks you through installation, connection key setup, and synchronization verification.

1. Download the Pillinger MT5 Sync Agent

  1. Sign in to Pillinger Works.
  2. Open Trading Journal → Settings.
  3. Locate the Data Import / Synchronization section.
  4. Select MetaTrader 5 — API as the data source, then select the appropriate Pillinger account.
  5. Under MT5 Settings → Download MT5 Expert Advisor, download Pillinger_MT5_Sync_Agent.mq5.

You will need this file for the installation steps below.

2. Install the Expert Advisor in MetaTrader 5

  1. Launch MetaTrader 5 and log in to the trading account you want to synchronize.
  2. In MetaTrader 5, select File → Open Data Folder. The menu wording may vary depending on your interface language.
  3. In the folder that opens, navigate to MQL5, then open the Experts folder.
  4. Copy the downloaded Pillinger_MT5_Sync_Agent.mq5 file into the Experts folder.
  5. Return to MetaTrader 5 and press F4 to open MetaEditor. If the keyboard shortcut does not work, use the corresponding menu option.
  6. In MetaEditor’s Navigator panel, locate MQL5 → Experts and open Pillinger_MT5_Sync_Agent.mq5.
  7. Press F7 to compile the file.
  8. Confirm that compilation completes without errors. Successful compilation creates the .ex5 file required to run the Expert Advisor.

Important: The .mq5 file contains the source code that MetaEditor compiles. Downloading or copying the file alone is not enough. You must compile it again after configuring the connection key.

On both Windows and macOS, use the data folder opened from within your own MetaTrader 5 installation. On macOS, MetaTrader 5 may run in a Wine-based environment, so its files may be stored in a location that differs from standard macOS folders. Always use the terminal’s own data directory rather than an arbitrary MQL5 folder.

If you’re using macOS and have trouble locating the required folder, follow these steps:

Open the correct folder

  1. Open Finder.
  2. Press the following keyboard shortcut:⌘ Command + ⇧ Shift + G
  3. The Go to Folder dialog will appear.
  4. Copy and paste the following path to open the MetaTrader 5 MQL5/Experts folder:~/Library/Application Support/net.metaquotes.wine.metatrader5/drive_c/Program Files/MetaTrader 5/MQL5/Experts/

This is a common MetaTrader 5 folder path on macOS, but it may vary depending on your installation method and your broker’s version of MetaTrader 5. Copy the .mq5 file into this folder.

3. Enable WebRequest access

The Expert Advisor needs permission to communicate with the Pillinger server.

  1. In MetaTrader 5, open Tools → Options → Expert Advisors.
  2. Enable Allow WebRequest for listed URL.
  3. Add the following URL to the permitted list:https://pillingerworks.com
  4. Click OK to save your settings.

Make sure the URL is entered exactly as shown. Without WebRequest permission, the Expert Advisor cannot communicate with the Pillinger server.

4. Generate your connection key

  1. Return to the Pillinger Trading Journal’s Settings → Data Import / Synchronization section.
  2. Confirm that the correct Pillinger account is selected.
  3. Click Generate MT5 Connection Key.
  4. Copy the generated connection key.

The key belongs to the selected Pillinger account. Generating a new key immediately invalidates the previous one.

5. Enter the connection key in the source code

This is one of the most important installation steps. The connection key is not imported as a separate file. You must enter it directly into the Expert Advisor’s source code in MetaEditor.

  1. Open Pillinger_MT5_Sync_Agent.mq5 in MetaEditor.
  2. Locate the following line:input string InpSyncKey = "Enter your key here";
  3. Delete the placeholder text between the quotation marks.
  4. Paste your generated Pillinger connection key between the quotation marks. The line should look like this:input string InpSyncKey = "YOUR_CONNECTION_KEY";
  5. Make sure the key remains inside the quotation marks. Do not remove the quotation marks or the semicolon at the end of the line.
  6. Save the file.
  7. Press F7 to compile the source code again.
  8. Confirm that compilation completes successfully.

Security: Treat your connection key as confidential. Do not share it with others or publish the source file containing your key. If you generate a new key in Pillinger, replace the old key in the source code and compile the file again.

6. Start the Expert Advisor

  1. Return to the main MetaTrader 5 window.
  2. Locate Expert Advisors in the Navigator panel.
  3. If the Pillinger MT5 Sync Agent is not visible, refresh the list or restart MetaTrader 5.
  4. Drag the Pillinger_MT5_Sync_Agent Expert Advisor onto a chart.
  5. Review the settings and confirm to start the Expert Advisor if prompted.
  6. Make sure Expert Advisor execution is enabled in MetaTrader 5.

You do not need to open a new trade to start synchronization. The Expert Advisor reads and transfers supported trading data. It is not a trading robot and is not designed to open or close orders.

7. Verify synchronization

Once the Expert Advisor is running:

  • Keep MetaTrader 5 open and maintain an active internet connection.
  • Check the Experts and Journal logs in MetaTrader 5 if you see an error or warning.
  • Open the Pillinger Trading Journal and check the timestamp of the last successful synchronization.
  • Confirm that the synchronized trading data appears in the appropriate journal.

Synchronization runs at the configured interval. The default interval is 300 seconds, or 5 minutes, so new data may not appear immediately.

8. Important notes

MetaTrader 5 must remain running. If you close the terminal or your computer goes to sleep, the locally running Expert Advisor cannot continue synchronizing.

Select the correct accounts. Verify the active trading account in MetaTrader 5 and the selected account in Pillinger.

WebRequest access is required. If the connection does not work, confirm that https://pillingerworks.com is included in the permitted URL list.

The connection key is account-specific. Generating a new key invalidates the previous one. Update the source code, save it, and compile it again.

Synchronization is not necessarily instantaneous. Allow time for the next synchronization cycle and check the last successful synchronization timestamp.

Synchronization is read-only. The Expert Advisor handles supported account data, deal history, and positions. It does not open or close trading orders.

9. Troubleshooting

The Expert Advisor does not appear in Navigator

  • Confirm that the file is in the correct MQL5/Experts folder.
  • Open the file in MetaEditor and check the compilation result.
  • Refresh the Expert Advisors list or restart the terminal.

Compilation reports an error

  • Confirm that you are editing the correct Pillinger_MT5_Sync_Agent.mq5 file.
  • Make sure the connection key is between the quotation marks.
  • Avoid changing other parts of the code unless necessary.

The Expert Advisor is running, but synchronization does not occur

  • Check your internet connection.
  • Verify WebRequest permissions.
  • Confirm that the connection key is valid and belongs to the correct Pillinger account.
  • Review the MT5 Experts and Journal logs.
  • Check the last successful synchronization timestamp in the Pillinger Trading Journal.

If the issue persists, record the error message and your MetaTrader 5 version, then contact Pillinger Works Support.

PLEASE DO NOT MODIFY ANYTHING ELSE IN THE .mq5 FILE. Only enter your generated connection key in the designated field. Otherwise, we cannot guarantee that the Expert Advisor will function correctly.