INVITE-ONLY SCRIPT

RunRox - Pairs Screener

106
๐Ÿ“Š Pairs Screener is part of our premium suite for pair trading.
This indicator is designed to scan and rank the most profitable and optimal pairs for the Pairs Strategy.syot kilatThe screener can backtest multiple metrics on deep historical data and display results for many pairs against one base asset at the same time.
This allows you to quickly detect market inefficiencies and select the most promising pairs for live trading.

HOW DOES THIS STRATEGY WORKโ‰๏ธ

The core idea of the strategy is described in detail in our main indicator Pairs Strategy from the same product line.
There you can find a full explanation of the concept, the math behind pair trading, and the internal logic of the engine.

The Pairs Screener is built on top of the same core technology as the main indicator and uses the same internal logic and calculations.
It is designed as a key companion tool to the main strategy: it helps you find tradeable pairs, evaluate current deviations, sort and filter lists of candidates, and much more. All of these features will be described in this post.

โœ… KEY FEATURES
  • More than 400+ assets available for scanning
  • Forex assets
  • Crypto assets
  • Lower Timeframe Backtester Strategy support
  • Invert signals mode
  • Hedge Coefficient (position size balancing between both legs)
  • 6 hedge modes
  • Stop Loss support
  • Take Profit support
  • Whitelist with your own custom asset list
  • Blacklist to exclude unwanted assets
  • Custom filters
  • 12 tracking metrics for pair evaluation
  • Customizable alerts
  • And many other tools for fine-tuning your search
The screener runs backtests simultaneously across a large number of assets and calculates metrics automatically.
This helps you very quickly find pairs with strong structural relationships or current inefficiencies that can be used as the basis for your pair trading strategies.

โš™๏ธ MAIN SETTINGS

The first section controls the core parameters of the screener: Score, correlation, asset groups for scanning, and other base settings.syot kilatAll major crypto and forex symbols are embedded directly into the screener.
Since there are more than 400 assets, it is technically impossible to analyze everything at once, so we grouped them into batches of 40 assets per group.

The workflow is simple:
  1. Open the chart of the asset you want to use as the base ticker.
  2. In the screener settings choose the market (Crypto or Forex).
  3. Select a Group (for example, Group 1) and the indicator will scan all assets inside that group against your base ticker.
  4. Then you switch to Group 2, Group 3, etc., and repeat the scan.
Embedded universe:
  • 400+ assets total
  • 350+ Crypto โ€“ split into 10 groups
  • 70+ Forex โ€“ split into 3 groups
Below is a description of each setting.

๐Ÿ”ธ Exclude Dates
Allows you to specify a period that should be excluded from analysis.
Useful for removing abnormal spikes, news events, or any non-typical segments that distort the statistics for your pairs.

๐Ÿ”ธ Market
Defines which universe will be used to build pairs with the current main asset:
  • Crypto โ€“ 350+ crypto symbols
  • Forex โ€“ 70+ FX symbols
  • Whitelist โ€“ your own custom list of assets
syot kilat๐Ÿ”ธ Group
Selects the asset group to scan.
As mentioned above, assets are split into groups of about 40 instruments:
  • 350+ Crypto โ†’ 10 groups
  • 70+ Forex โ†’ 3 groups
The screener will calculate all metrics only for the group you select.

๐Ÿ”ธ Lower Timeframe
This option enables deep history analysis.

Each TradingView plan has a limit on the number of visible bars (for example, 5,000 bars on the basic plan). In standard mode you would only get statistics for the last 5,000 bars of your current timeframe.

If you want a deeper backtest on a lower timeframe, you can do the following:
  • Suppose your target timeframe for analysis is 5 minutes.
  • Switch your chart to a 30-minute timeframe.
  • Enable Lower Timeframe in the indicator.
  • Select 5 minutes as the lower timeframe inside the screener.
In this mode the screener can reconstruct and analyze up to 99,000 bars of data for your assets.syot kilatThis allows you to evaluate pairs on a much deeper history and see whether the results are stable over a larger sample.

๐Ÿ”ธ Method
Here you choose the deviation model:
  • preferred Z-Score or S-Score for your analysis,
  • plus you can enable Invert to search for negatively correlated pairs and calculate their profit correctly.
๐Ÿ”ธ Period
This is the lookback period for Z/S Score.
It defines how many bars are used to calculate the deviation metric for each pair.

๐Ÿ”ธ Correlation Period
This is the number of bars used to calculate correlation between the base asset and each candidate in the group.
The resulting correlation value is also displayed in the results table.

๐Ÿ”€ HEDGE COEFFICIENT

The next block of settings is related to the hedge coefficient.
This defines how much margin is allocated to each leg of the pair.

The classic approach in pair trading is to split the position equally between both assets.
For example, if you allocate 100 USD to a trade, the standard model would open 50 USD long on one asset and 50 USD short on the other.

This works well for pairs with similar volatility, such as BTCUSDT / ETHUSDT

However, if you use a pair like BTCUSDT / DOGEUSDT, the volatility of these assets is very different.
They can still be correlated, but their amplitude is not the same. While Bitcoin might move 2%, Dogecoin can move 10% over the same period.

Because of that, for pairs with strongly different volatility, we can use a hedge coefficient and, for example, enter with 30 USD on one leg and 70 USD on the other, taking the volatility difference into account.

This is the main idea behind the Hedge Coefficient section and its primary use.

The indicator includes 6 methods of calculating the coefficient:
  1. Cumulative RMA
  2. Beta OLS
  3. Beta TLS
  4. Beta EMA
  5. RMA Range
  6. RMA Delta
Each method uses a different formula to compute the hedge coefficient and to size the position based on different metrics of the assets.
We leave it to the trader to decide which algorithm works best for their specific pair and style.

Below are the settings inside this section:
syot kilat
๐Ÿ”น Method
When Auto Hedge is enabled, you can select which method to use from the list above.
The chosen method will automatically calculate the hedge coefficient between the two legs.

๐Ÿ”น Hedge Coefficient
This is the manual hedge ratio per trade when Auto Hedge is disabled.
By default it is set to 1, which means the position is opened 50/50 between the two assets.

๐Ÿ”น Min Allowed Hedge Coef.
This is the minimum allowed hedge coefficient.
By default it is 0.2, which means the model will not go below a 20% / 80% split between the legs.

๐Ÿ”น MA Length
For methods that use moving averages (for example Beta EMA), this parameter sets the period used to calculate the hedge coefficient.

๐Ÿ’ฐ STRATEGY SETTINGS

This section defines the base backtesting settings for all assets in the screener.
Here you configure entries, exits, Stop Loss, and other parameters used to find the most optimal pairs for your strategy.syot kilat๐Ÿ”ธ Commission %
In this field you set your brokerโ€™s fee percentage per trade.
The indicator automatically calculates the correct commission for each leg of every trade. You only need to input the real commission rate that your broker charges for volume. No additional manual calculations are required.

๐Ÿ”ธ Qty $
The margin amount used for backtesting across all assets in the screener.
This margin is split between both legs of the pair either equally or according to the selected hedge coefficient.

๐Ÿ”ธ Entry
The Z/S Score deviation level at which the backtest opens a trade for each pair.

๐Ÿ”ธ Exit
The Z/S Score level at which the backtest closes trades for the tested assets.

๐Ÿ”ธ Stop Loss
PnL threshold at which a trade is force-closed during the historical test.

๐Ÿ”ธ Cooldown
Number of bars the strategy will wait after a Stop Loss before opening the next trade.

This block gives you flexible control over how your strategy is tested on 400+ assets, helping you standardize the rules and compare pairs under the exact same conditions.

๐Ÿ—’๏ธ WHITELIST

In this section you can define your own custom list of assets for monitoring and backtesting.
This is useful if you want to work with symbols that are not included in the built-in lists, such as exotic crypto from smaller exchanges, specific stocks, or any custom universesyot kilat๐Ÿ”น Exchange Prefix
Enter the exchange prefix used for your tickers.
Example: BINANCE, OANDA, etc.

๐Ÿ”น Ticker Postfix
Enable this option if the tickers require a postfix.
  • Example 1: .P for Binance Futures perpetual contracts.
  • Example 2: USDT if you only provide the base asset in the ticker list.
๐Ÿ”น Ticker List
Enter a comma-separated list of tickers to analyze.
  • Example 1: BTCUSDT, ETHUSDT, BNBUSDT (when the exchange prefix is set).
  • Example 2: BTC, ETH, BNB (when using postfix USDT).
  • Example 3: BINANCE:BTCUSDT.P, OANDA:EURUSD (when different exchanges are used and the prefix option is disabled).
This gives you full flexibility to build a screener universe that matches exactly the assets you trade.

โ›” BLACKLIST

In this section you can enable a blacklist of unwanted assets that should be skipped during analysis.syot kilatEnter a comma-separated list of tickers to exclude from the screener:
  • Example 1: BTCUSDT, ETHUSDT
  • Example 2: BTC, ETH (all tickers that contain these symbols will be excluded)
This helps you quickly remove illiquid, noisy, or unwanted instruments from the results without changing your main groups or whitelist.

๐Ÿ“ˆ DASHBOARD

This section controls the results dashboard: table position, style, and sorting logic.syot kilat
Here is what you can configure:
  • Result Table โ€“ position of the results table on the chart.
  • Background / Text โ€“ colors and opacity for the table background and text.
  • Table Size โ€“ overall size of the results table (from 0 to 30).
  • Show Results โ€“ how many rows (pairs) to display in the table.
  • Sort by (stat) โ€“ which metric to use for sorting the results.
    Available options: Profit Factor, Profit, Winrate, Correlation, Score.
This lets you quickly focus on the most interesting pairs according to the exact metric that matters most for your strategy.

๐Ÿ“Ž FILTER SETTINGS

This section lets you filter the results table by metric values.
For example, you can show only pairs with a minimum correlation of 0.8 to focus on more stable relationships.syot kilat๐Ÿ”ธ Min Correlation
Minimum allowed correlation between the two assets over the selected lookback period.

๐Ÿ”ธ Min Score
Minimum absolute Score (Z-Score or S-Score) required to include a pair in the results.
For example, 2.0 means only pairs with Score >= 2.0 or <= -2.0 will be displayed.

๐Ÿ”ธ Min Winrate
Minimum win rate percentage for a pair to be included in the table.

๐Ÿ”ธ Min Profit Factor
Minimum profit factor required for a pair to stay in the results.syot kilatThese filters help you quickly narrow the list down to pairs that meet your quality criteria and match your risk profile.

๐Ÿ“Œ COLUMN SELECTION

This section lets you fully customize which metrics are displayed in the results table.
You can enable or hide any column to focus only on the data you need to identify the best pairs for trading.syot kilatThe screener allows you to show up to 12 metrics at the same time, which gives a detailed view of pair quality.syot kilatAvailable columns:

๐Ÿ”น Exchange Prefix
Show the exchange prefix in the ticker.

๐Ÿ”น Correlation
Correlation between the two assetsโ€™ prices over the lookback period.

๐Ÿ”น Score
Current Score value (Z-Score or S-Score).
On lower timeframe research, Score is not displayed.

๐Ÿ”น Spread
Shows spread as % change since entry.
Positive value = profit on the main position.

๐Ÿ”น Unrealized PnL
Shows unrealized PnL as a $ value based on current prices.

๐Ÿ”น Profit
Total profit from all trades: Gross Profit โˆ’ Gross Loss.

๐Ÿ”น Winrate
Percentage of profitable trades out of all executed trades.

๐Ÿ”น Profit Factor
Gross Profit / Gross Loss.

๐Ÿ”น Trades
Total number of trades.

๐Ÿ”น Max Drawdown
Maximum observed loss from peak to trough before a new peak is made.

๐Ÿ”น Max Loss
Largest loss recorded on a single trade.

๐Ÿ”น Long/Short Profit
Separate profit/loss for long trades and short trades.

๐Ÿ”น Avg. Trade Time
Average duration of trades.

All these metrics are designed to help you quickly identify the strongest pairs for your strategy.
You can change colors, opacity, and hide any columns that are not relevant to your workflow.

๐Ÿ”” ALERT

The alert system in this screener works in a specific way.
Alerts are tied directly to the filters you set in the Filter Settings section:
  • Minimum Correlation
  • Minimum Score
  • Minimum Winrate
  • Minimum Profit Factor
You can configure alerts to trigger when a new pair appears that matches all your filter conditions.syot kilat๐Ÿ’ก Example

You set:
  • Minimum Score = 3
Then you create an alert based on the screener.
When any pair reaches a Score greater than +3 or less than โˆ’3, you will receive a notification.

This is how alerts work in this screener.
The idea is to deliver the most relevant information about the current market situation without forcing you to watch the screener all the time.

Supported placeholders for alert messages:
Pine Scriptยฎ
{{ticker_1}} โ€“ main ticker (the one on the chart). {{ticker_2}} โ€“ the paired ticker listed in the table. {{corr}} โ€“ correlation value. {{score}} โ€“ Score value (Z-Score or S-Score). {{time}} โ€“ bar open time (UTC). {{timenow}} โ€“ alert trigger time (UTC).
You can use these placeholders to build alert text or JSON payloads in any format required by your tools.

The screener is designed to significantly enhance your pair trading workflow: it helps you quickly identify working pairs and current market inefficiencies, and with the alert system you can react to opportunities without constantly sitting in front of the screen.

Always remember that past performance does not guarantee future results.
Use the screener data within a risk-controlled trading system and adjust position sizing according to your own risk management rules.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.