- 🔧 Program Installation
- 🚪 First Launch
- 🏠 Main Window
- 🔌 Connecting an Exchange
- 📐 Creating a Spread
- 📊 Loading Data
- ⚖️ Spread Calculator
- 🧪 Backtester
- 💹 Spread Trading
- 🤖 Automated Trading
- 📋 Journals, Positions
- 💾 Saving and Loading
- ⚙️ Programm Settings
- 🛠️ Troubleshooting
- ❓ FAQ
- 🔐 Security Recommendations
- 📞 Contacts and Updates
- 🎓 Conclusion
📘 PairTrading PRO — User Guide
🔧 Program Installation
1.1 What you need before installation
Before starting, ensure you have a computer or VPS server ready.
System Requirements:
|
Parameter |
Requirements |
|---|---|
|
🖥 OS |
Windows 7/10/11 or Windows Server 2008+ |
|
💾 Disk |
~550 MB + extra space for history/logs (1 GB recommended) |
|
🧠 RAM |
2 GB minimum (4 GB+ is comfortable) |
|
⚙️ CPU |
2 cores minimum, 4+ comfortable (especially for backtests) |
|
🌐 Internet |
Stable connection |
|
☁️ For VPS |
24/7 uptime, sleep/hibernation must be disabled |
You will also need:
- License Public Key (available in your Personal Account on the website).
1.2 Step-by-step installation
- Download the PairTrading PRO installer from your Personal Account on the website.
- Run the file (right-click → "Run as administrator" is recommended).
- Read and accept the license agreement.
- Follow the installation wizard: click Next → Next → Install → Finish.
- A program shortcut will appear on your desktop 🎉
💡 Tip: Do not change the default installation folder unless you know why — it makes finding files easier later.
📸 [SCREENSHOT S01 — installation wizard: window with Next / Install / Finish buttons]
🚪 First Launch
2.1 Launch
- Double-click the PairTrading Pro shortcut.
- If Windows asks for network access permission (Firewall) — make sure to allow it, otherwise the program will not be able to connect to exchanges.
2.2 Login Window
The login window will open. It’s simple:
- Enter your license key in the Public Key field.
- Check the Remember me box (so you don't have to enter it every time).
- Click the Log in button ✅
🔑 IMPORTANT:
- Enter the key without extra spaces at the beginning or end — otherwise, it may not work.
- One activation key can be used for two simultaneous platform launches on different computers. Upon the first login, the key is bound to the computer. If you need to change the computer to use the terminal later, you must reset the PC binding on the website in the "My Subscription" section by clicking the corresponding button.
2.3 Connection Check
After logging in, the program checks existing connections to exchanges ("Check connections"):
- Wait for the message "Check connections completed".
- Click OK.
⚠️ If this window does not appear — do not panic. This means that connections to exchanges are not configured yet. Simply proceed to the next section.
🏠 Main Window
After logging in, you are taken to the main window of the program. Let's figure out what is what.
3.1 Top Menu (Most Important)
|
Menu Item |
What it does |
|---|---|
|
Spread |
Creating, loading, saving spreads |
|
Connections |
Exchange connections (API keys) |
|
Settings |
General program settings |
|
Help |
Help, program version, updates |
3.2 Work Tabs (Tables at the bottom)
|
Tab |
What it shows |
|---|---|
|
Connections Status |
Connection status to exchanges (Connected / Disconnected) |
|
Account Balances |
Balances for each account |
|
Opened Positions |
Currently open positions |
|
Closed Positions |
History of closed positions |
|
Total Profit |
Total profit across all spreads |
🧠 Golden Rule for Beginners:
First connection → then spread → then historical test → then trading with minimum volume. Do not skip steps!
🔌 Connecting an Exchange
This is a key stage. Without connecting to an exchange, the program cannot receive quotes or trade.
4.1 Open connection settings
- In the top menu, click Connections.
- Select Edit.
4.2 Creating and setting up crypto exchange connections
4.2.1. Preparing API keys on the crypto exchange (IMPORTANT! ⚠️)
Before adding a connection to the program, you need to create an API key on the exchange itself (ByBit, OKX, Binance, etc.). Here are the security rules:
|
Permission |
Enable? |
|---|---|
|
✅ Read |
Yes |
|
✅ Trade |
Yes |
|
❌ Withdraw |
NO! Never! |
🔒 Security Tip: If the exchange allows it — enable IP whitelist and enter the IP of your computer or VPS. This way, even if the key leaks somehow, an attacker cannot use it from another IP.
💡 Where to get the keys? The key creation process is individual for each platform. Usually, this section is located in the profile settings ("API Management"). We recommend reading the official instructions of your exchange on creating API keys.
4.2.2. Crypto exchange connection setup
- In the Connection Settings window, click the Add button.
- Select the required crypto exchange from the list.
- Fill in the fields:
- Account name — create a clear name (e.g.,
bybit_test). - Exchange — select the exchange and market (e.g.,
ByBit_spot). - Enable — check the box ✅.
- api_key — paste your API Key (copy from the exchange).
- api_secret — paste your API Secret (copy from the exchange).
- If the exchange requires additional fields —
passphrase,uid— fill them in as well.
- Account name — create a clear name (e.g.,
- Click OK.
4.4 Setting up a connection to MetaTrader 5 (MT5)
Working with the MT5 terminal differs from connecting to crypto exchanges because the program interacts directly with the terminal installed on your computer.
- In the Connection Settings window, click the Add button.
- Select MT5_NETTING or MT5_HEDGING.
- MT5_NETTING — one consolidated position per instrument. New trades average or close the current one.
- MT5_HEDGING — separate independent positions. You can open multiple trades for a single instrument.
- Account name: Create a name (e.g.,
Just2Trade_MT5). - login: Enter your trading account number (digits only).
- password: Enter your trading account password.
- Server (Important!) ❗ Here you must specify the exact server name as provided by the broker. Even a single-character error will prevent connection.
- 💡 Where to get the server name? In the MT5 terminal, click File → Open an Account or Login. Copy the server name from the list (e.g.,
Just2Trade-MT5orAlpari-Pro).
- 💡 Where to get the server name? In the MT5 terminal, click File → Open an Account or Login. Copy the server name from the list (e.g.,
- path_to_file: Click the Find file "terminal64.exe" button. In the opened window, find the folder where your MT5 is installed and select the
terminal64.exefile. This is necessary for the program to launch the terminal and send commands to it. - Commission type: Select the order execution type. Usually, FOK (Fill or Kill), IOC, or Return is used.
- time_zone (Important!) ❗ Specify the broker's server time zone (offset relative to GMT/UTC). If the time zone is specified incorrectly, historical data from the MT5 terminal will overlap incorrectly with data from other exchanges. This will lead to errors in calculating and plotting the spread chart.
- 💡 How to determine time_zone? Open the "Market Watch" window in MT5 and look at its current time. Compare this time with Greenwich Mean Time (GMT). Example: If the time in London (GMT) is 12:00, and in the terminal it is 15:00, the offset is +3. Enter the number
3in the field.
- 💡 How to determine time_zone? Open the "Market Watch" window in MT5 and look at its current time. Compare this time with Greenwich Mean Time (GMT). Example: If the time in London (GMT) is 12:00, and in the terminal it is 15:00, the offset is +3. Enter the number
- Check the Enable box ✅ and click OK.
4.5 Checking the connection
- Return to the Connections Status tab in the main window.
- Make sure your account status is Connected ✅.
- If the status is Disconnected or an error — see section 14 "Troubleshooting".
📐 Creating a Spread
5.1 What is a spread in simple terms?
A spread is a "bundle" of two or more instruments. You are not betting on the rise or fall of a single asset. Instead, you are betting that the difference between the assets will return to its mean value. This is the essence of pair/basket trading! 🎯
Example: BTCUSDT and ETHUSDT usually move similarly. If one "runs ahead" — you bet that the second will "catch up" (or the first will "return").
5.2 Open Spread Builder
- In the top menu, click Spread.
- Select New Spread.
5.3 Adding the first instrument
- Click Add instrument.
- In the New instrument window:
- Exchange — select your account (e.g.,
bybit_test). - Instrument Name — enter the ticker of the first instrument (e.g.,
XRPUSDT).
- Exchange — select your account (e.g.,
- Click Apply.
5.4 Adding the second instrument
- Repeat the same for the second ticker (e.g.,
XLMUSDT). - Click Apply.
5.5 Moving forward
- Make sure both instruments are visible in the list.
- Click Next.
📊 Loading Data
6.1 Why is history needed?
So the program can:
- Calculate the correct spread weights;
- Build a spread chart;
- Test the strategy on past data (backtest).
Without history — no calculations, no tests. So this step is mandatory! 📈
6.2 Upload Settings
- Timeframe — select the timeframe (candle size):
- For the first time, we recommend
1h(one hour). - The smaller the timeframe, the more data loads (and the longer the wait).
- For the first time, we recommend
- Period — select the period:
last week— the last week.last 3 month— the last 3 months.last 6 month— the last 6 months.custom dates— your own range (specify First date and Second date).
- Click Next.
⏳ Wait for the download to finish (may take from a few seconds to several minutes depending on the data volume).
💡 Tip: Start with last 6 month. If everything loads without errors — then load a larger period for a serious backtest.
⚖️ Spread Calculator
7.1 What happens here?
The program calculates the proportions in which to buy/sell each leg of the spread so that the position is balanced (market-neutral). This is the "heart" of pair trading.
7.2 Weighting Model Selection
The following models are available in the dropdown list:
|
Model |
How it works (Description) |
Best suited for |
|---|---|---|
|
OLS Regression (Hedge Ratio) |
Classical linear regression. Calculates the hedge ratio (beta) between two assets. |
Classical pair trading. Ideal for simple pairs (e.g., GOOG vs GOOGL or KO vs PEP). |
|
TLS Regression (Orthogonal) |
Total least squares method. Accounts for errors (noise) in both assets, not just the dependent one. |
Volatile pairs. When both assets have large price swings, TLS gives a more accurate Hedge Ratio than OLS. |
|
Johansen (Cointegration) |
Johansen test. Finds cointegration vectors (stable relationships) in a group of assets. |
Basket trading. If you trade not a pair, but a group of 3+ assets (triplets, quads). |
|
PCA (Eigen Portfolio) |
Principal Component Analysis. Builds a "synthetic" index (principal component) explaining the group's movement. |
ETFs and sectors. Trading a single stock against a synthetic index of a sector or the whole market. |
|
Market Neutral (Markowitz) |
Markowitz optimization. Selects asset weights to minimize portfolio variance (risk). |
Portfolio management. Creating a basket with minimal volatility, independent of the market. |
|
Sparse Regression (Lasso) |
Regression with regularization. "Zeroes out" the weights of weak assets, leaving only the most significant ones. |
Asset selection. When you have a list of 100 stocks and need to select the best 3-5 to hedge a single target asset. |
💡 Tip: If you are just starting, use OLS. It is the gold standard. Move on to TLS or PCA only if you understand why OLS is not handling your specific pair.
7.3 Capital Settings
Allocated Capital per Spread, USD — how many dollars you allocate for this spread.
The program will automatically calculate:
- Weight — the weight of each leg;
- Lot — recommended volume (e.g., 0.154253 for BTCUSDT);
- Estimated Margin — estimated required margin.
7.4 Verify and Proceed
- Click Refresh Graphic — the spread chart will update.
- Look at the table with weights/lots — make sure the values are reasonable.
- Click Next.
🧪 Backtester
8.1 Why do a backtest?
To see how the strategy would have performed on historical data before investing real money. This is not a guarantee of future profit, but a great way to filter out obviously bad ideas and adjust parameters. 🔬
8.2 Fast Backtest
After the Spread Calculator, the program will switch to Fast Backtest (quick backtesting):
- The program will start quick optimization of trading parameters and backtesting based on them.
- Wait for all calculations to complete or skip this step.
After completion, you will see two blocks:
"Backtest result" Block — Key Metrics:
- Total profit — Total profit for the entire period.
- Profit Factor — Ratio of profit to loss (the higher, the better).
- Winrate — Percentage of profitable trades.
- Sharpe Ratio — Sharpe ratio (return/risk, >1 is good).
- Drawdown — Maximum drawdown in %.
Action Buttons:
- Recalculate — recalculate the backtest with changed parameters.
- Back — return to Spread Calculator.
- Finish — complete setup and proceed to live trading.
8.4 Full Backtest
This is located in the Spread Trading window (see next section). Here you can conduct deeper parameter optimization and more extensive testing of both the entire spread and its individual legs to potentially identify leading and lagging instruments within the spread.
💹 Spread Trading
9.1 Transition to Trading
After the backtest, click Finish — the spread trading window will open.
9.2 Trading window elements
Main Control Panel:
|
Element |
What it does |
|---|---|
|
Position |
Shows current position (0 = nothing open) |
|
Max pos. limit |
Limit on the number of open spread positions |
|
Quantity |
Number of spreads for simultaneous buy/sell |
|
Sell Spread |
Button: sell spread |
|
Buy Spread |
Button: buy spread |
|
Close All |
Button: close all positions for this spread |
Bottom Tabs:
- Trading — Main control panel log.
- Messages — System messages.
- Script Messages — Auto-trading script messages.
- Quotes — Real-time quotes of individual trading instruments.
9.3 Manual trading (We recommend starting with this! 👆)
Step-by-step algorithm for the first trade:
- Check readiness:
- ✅ Connection — Connected.
- ✅ There are funds/margin on the account.
- ✅ Quotes are updating.
- Configure parameters:
- Position = 0 (shows current open position).
- Max pos. limit = 1 (means the program will not open more than one spread).
- Quantity = 1 (number of spreads the program will buy/sell when clicking Buy Spread or Sell Spread).
- Open a position:
- Click Buy Spread or Sell Spread.
- Check execution:
- Ensure all spread legs (trading positions for all instruments in the spread) have opened.
- Close the position:
- Click Close All — the program will close both legs simultaneously.
🛡️ Protection: Max pos. limit = 1 means the program will not open more than one spread. This acts as insurance against accidental "double clicks" and serves as a limit for the script's position sizing.
9.4 Edit Spread Window
This is your synthetic position management window located in the Settings menu. It divides all selected instruments into two major groups:
- Short Block (Short / Sell): A list of instruments that will be sold when the spread is bought. In our example,
BCHUSDT,AVAXUSDT, andLTCUSDTare added here. - Long Block (Long / Buy): A list of instruments that will be bought when the spread is bought. In our example, this is
ADAUSDT,BNBUSDT,ETHUSDT. - Add / Edit / Delete buttons: Allow you to manage the list in each column. You can flexibly build any combinations (e.g., 3 assets against 3, or 1 asset against 5).
9.4.1 "New Short/Long Instrument" Window (Settings for a specific instrument in the basket)
This window opens when you click the Add or Edit button. Here, exact parameters are set for each individual "leg" (trading instrument) within your basket:
- Exchange: Connection selection for a specific coin (you can gather instruments from different exchanges into one basket, e.g., long on Binance and short on Bybit).
- Instrument Name: Instrument ticker (example —
BCHUSDT). - Weight: Mathematical weight of the instrument in the overall spread formula. For short positions, it is usually negative (
-1.21), for longs — positive. The program uses these weights to plot a unified spread chart. - Trade Lots: Physical volume (trade lot) that the script will buy or sell when entering a trade for this specific asset (in our example — 4.1874 BCH).
- Commission per trade: Allows embedding a percentage or fixed exchange commission directly into the instrument settings. This makes the backtest and PnL (profit/loss) calculation as accurate and realistic as possible.
🤖 Automated Trading
10.1 What does the script do?
The script automatically opens and closes positions on the spread based on the strategy (the one you configured in the backtest).
10.2 Running the script
- In the spread trading window, open the Script menu.
- Click Edit Script.
- Double-check the script parameters before launch; if necessary, save the parameters to a separate file, then you can close the window.
- In the spread trading window, open the Script menu again and click Run Script.
- In the bottom left, the status will change to:
"Script is running"✅ - the script has started. - The script's actions will be logged in the Script Messages tab.
10.3 Stopping the script
- Menu Script → Stop Script.
- The status will change to
"Script stopped".
⚠️ Important: Stopping the script DOES NOT close open positions! If you have an open position when the script is stopped — close it manually using the Close All button or via the exchange.
📋 Journals, Positions
11.1 In the main program window
- Opened Positions — What is currently open.
- Closed Positions — The entire history of closed trades.
- Total Profit — Grand total (total profit/loss earned).
💾 Saving and Loading
12.1 Saving a spread
- In the spread trading window, go to the menu Spread → Save Spread.
- Choose a folder to save.
- Enter a file name and click Save.
12.2 Saving script parameters
If you need to save your trading algorithm settings, the steps are similar:
- In the menu, select Script → Edit → Save Script.
- Set a file name and click Save.
12.3 Loading a spread or settings
In the main or trading window:
- For a spread: Spread → Load Spread.
- For script settings: Script → Edit → Load Script.
- Select the required file (e.g.,
.sprd) and click Open.
12.4 Autosave
In Settings → Common Settings, you can enable Autosave.
💡 Tip: Always save the spread after configuration. If the program or VPS reboots — you won't lose your work.
⚙️ Programm Settings
13.1 Main Settings
This is the window for the global base settings of the platform, where you define performance parameters, language, and the visual style of the interface. It is located in the Settings top menu of the program's main window.
-
Reconnect count: The number of times the program will automatically attempt to reconnect to the exchange (or broker's server) in the event of a sudden connection loss.
-
Language: Selection of the platform's interface language.
-
Cores count: Specifies how many of your CPU cores the program is allowed to use for the parallel sending of orders to exchanges. Allocating more cores allows the platform to send execution commands for all spread "legs" simultaneously, minimizing network latency. This is crucial for synchronous trade entries and minimizing slippage when opening orders. Keep in mind: the more cores utilized, the heavier the overall load on your PC or VPS.
-
Theme: Visual style selection for the program.
Dark Themeis selected in the screenshot — the perfect choice to prevent eye strain during long trading sessions.
13.2 Common Settings Window
Located in Settings in the top menu of the spread trading window. Here, base parameters for charting, spread schedules, and data saving are defined.
1. Chart settings
- Timeframe: Default timeframe for plotting charts (Important: Changing the timeframe will delete all current historical data).
- Max Ticks On Chart: Limit of displayed ticks (data) on the chart. This limitation prevents overloading your computer's RAM if the spread is open for a very long time.
- Max Ticks On History: Maximum amount of historical data loaded into memory for backtests and calculations.
- Day Separator: Checking this box displays vertical lines on the chart, visually separating trading days.
- Show Open/Close lvls: Toggles the display of opening and closing levels directly on the spread chart.
2. Trading time
This block controls the operating schedule of the spread window:
- Start time / Stop time: The time interval during which the spread operates (according to the local time of your PC/VPS).
- Edit break time: A button to configure operating breaks within the trading day (for example, to pause during clearing sessions on traditional exchanges or during the release of important news).
- Days of the week (Mn, Tu, We, Th, Fr, Sa, Su): Checkboxes indicate the days when automated trading is active. For crypto, all checkboxes are usually left checked, while for classic markets (MT5), Saturday (Sa) and Sunday (Su) are unchecked.
3. Data settings
- Autosave spread data: Activates the function to automatically save the spread to a previously saved file.
- Autosave period(min): Autosave interval in minutes. For example, a value of
1means the program will save your progress every minute, protecting you from data loss during crashes. - Clear spread data: Button to clear the cache and saved data for the current spread (useful if you need to completely wipe accumulated history and start fresh).
4. Trading settings
Protection block against network failures and exchange errors:
- Max tries open/close order: Number of attempts to reopen a failed order when opening/closing a spread, if the previous one was rejected by the exchange (e.g., due to a sharp price spike).
- Max tries reopen order: How many times the program will attempt to reopen/close a spread if a position imbalance occurs within the spread.
🛠️ Troubleshooting
14.1 🐞 Automatic Error Reporting
In the event of an unexpected crash, the program will automatically display a popup window offering to send a technical report (bug report) to the developers.
The choice is yours:
✅ Agree — send the report. This helps us quickly find the cause of the failure and fix it in a new update.
❌ Decline — close the window without sending data.
*No personal data is transmitted; only technical information regarding the specific error is sent.
14.2 ❌ Cannot log in (Login)
- Key entry error: Copy the key again, remove any spaces at the beginning/end.
- Time error: Enable automatic time synchronization in Windows.
14.3 ❌ Exchange not connecting (Disconnected)
This is the most common issue. Check in this order:
- API Key / Secret (copied without spaces?).
- Key permissions (Read + Trade — Yes, Withdraw — NO).
- IP whitelist (is your PC/VPS IP added?).
- Windows time (synchronized?).
- Error text in Messages (read it).
14.4 ❌ History not loading
- Loading error: Check the exact spelling of the ticker.
- Empty chart: Check if the correct market is selected (spot vs futures).
- Timeout: Reduce the period or increase the timeframe (5m instead of 1m).
14.5 ❌ Order rejected (Invalid quantity)
- Invalid quantity: Volume is below the exchange minimum — increase Quantity.
- Insufficient margin: Not enough funds — deposit to the account.
14.6 ⚠️ Only one leg of the spread opened
This is a dangerous situation — you are left with a directional position.
Emergency protocol:
- 🛑 Immediately stop the script (Script → Stop Script).
- If the script couldn't close the already open leg, close it manually on the exchange itself.
- Investigate the cause in the Messages tab.
❓ FAQ
15.1 Can I trade between different connections?
Yes, absolutely! The platform allows flexible trade routing.
You can select different connections for each side of the spread (Leg 1 and Leg 2). This opens up opportunities for:
- Cross-exchange arbitrage (e.g., buy on Binance, sell on Bybit).
- Trading between different terminal types (e.g., a combination of MetaTrader 5 and a crypto exchange).
Simply specify the required source (Connection) for each instrument when configuring the spread.
15.2 Is it mandatory to run the script?
No. You can trade manually using the Buy/Sell Spread buttons. Beginners are advised to start this way to understand the logic.
15.3 Can I run multiple spreads simultaneously?
Yes, you can. But keep in mind that each spread consumes resources (CPU, RAM) and margin.
15.4 The program closed / VPS rebooted — what happens to positions?
If the program was closed or the server (VPS) rebooted, your open positions will remain active on the exchange. They will not close automatically.
⚠️ Important: Currently, our platform cannot restore management over previously opened positions after a restart. The program will "forget" about them.
You need to:
- Log in to the exchange via the web interface/mobile app or broker's terminal.
- Find those positions.
- Close them yourself manually.
🔐 Security Recommendations
16.1 API Keys
- ❌ Never enable Withdraw — even if the key leaks, money cannot be withdrawn.
- ✅ Use IP whitelist — the key will only work from your IP.
16.2 VPS / Server
- Use a complex password for the VPS.
- Enable Windows auto-updates.
- Configure program auto-start via Task Scheduler.
📞 Contacts and Updates
17.1 Technical Support
If you have questions, suggestions, or face difficulties working with the program, you can always write to us.
Please use the feedback form on our website.
17.2 Program Updates
You do not need to check for updates manually.
When a new version is released, the program will automatically notify you with a pop-up window.
🎓 Conclusion
Congratulations! If you have read this far, you already know more than 90% of people who download the program and try blindly 😄
Key takeaways:
- 🔌 Connection is the foundation. If the exchange is not Connected — nothing else works.
- 📐 Spread — first create, load history, calculate weights.
- 🧪 Backtest — mandatory before real trading.
- 💹 Trading — start manually, with minimum volume.
- 💾 Save spreads into
.sprdfiles. - 🛡️ Security — Withdraw OFF, IP whitelist ON.
English
Русский
Deutsch
Français
Português
Español
Bahasa Indonesia
Tiếng Việt
日本語
한국어
中文
ภาษาไทย
العربية