OPEN-SOURCE SCRIPT
Arbitrage Detector [LuxAlgo]

The Arbitrage Detector unveils hidden spreads in the crypto and forex markets. It compares the same asset on the main crypto exchanges and forex brokers and displays both prices and volumes on a dashboard, as well as the maximum spread detected on a histogram divided by four user-selected percentiles. This allows traders to detect unusual, high, typical, or low spreads.
This highly customizable tool features automatic source selection (crypto or forex) based on the asset in the chart, as well as current and historical spread detection. It also features a dashboard with sortable columns and a historical histogram with percentiles and different smoothing options.
🔶 USAGE

Arbitrage is the practice of taking advantage of price differences for the same asset across different markets. Arbitrage traders look for these discrepancies to profit from buying where it’s cheaper and selling where it’s more expensive to capture the spread.
For begginers this tool is an easy way to understand how prices can vary between markets, helping you avoid trading at a disadvantage.
For advanced traders it is a fast tool to spot arbitrage opportunities or inefficiencies that can be exploited for profit.
Arbitrage opportunities are often short‑lived, but they can be highly profitable. By showing you where spreads exist, this tool helps traders:
As we can see in the image, the tool consists of two main graphics: a dashboard on the main chart and a histogram in the pane below.
Both are useful for understanding the behavior of the same asset on different crypto exchanges or forex brokers.
The tool's main goal is to detect and categorize spread activity across the major crypto and forex sources. The comparison uses data from up to 19 crypto exchanges and 13 forex brokers.
🔹 Forex or Crypto

The tool selects the appropriate sources (crypto exchanges or forex brokers) based on the asset in the chart. Traders can choose which one to use.
The image shows the prices and volumes for Bitcoin and the euro across the main sources, sorted by descending average price over the last 20 days.
🔹 Dashboard

The dashboard displays a list of all sources with four main columns: last price, average price, volume, and total volume.
All four columns can be sorted in ascending or descending order, or left unsorted. A background gradient color is displayed for the sorted column.
Price and volume delta information between the chart asset and each exchange can be enabled or disabled from the settings panel.
🔹 Histogram

The histogram is excellent for visualizing historical values and comparing them with the asset price.
In this case, we have the Euro/U.S. Dollar daily chart. As we can see, the unusual spread activity detected since 2016, with values at or above 98%, is usually a good indication of increased trader activity, which may result in a key price area where the market could turn around.

By default, the histogram has the gradient and smoothing auto features enabled.
The differences are visible in the chart above. On top is an adaptive moving average with higher values for unusual activity. At the bottom is an exponential moving average with a length of 9.
The differences between the gradient and solid colors are evident. In the first case, the colors are in sync with the data values, becoming more yellow with higher values and more green with lower values. In the second case, the colors are solid and only distinguish data above or below the defined percentiles.
🔶 SETTINGS
🔹 Percentiles
🔹 Dashboard
🔹 Style
This highly customizable tool features automatic source selection (crypto or forex) based on the asset in the chart, as well as current and historical spread detection. It also features a dashboard with sortable columns and a historical histogram with percentiles and different smoothing options.
🔶 USAGE
Arbitrage is the practice of taking advantage of price differences for the same asset across different markets. Arbitrage traders look for these discrepancies to profit from buying where it’s cheaper and selling where it’s more expensive to capture the spread.
For begginers this tool is an easy way to understand how prices can vary between markets, helping you avoid trading at a disadvantage.
For advanced traders it is a fast tool to spot arbitrage opportunities or inefficiencies that can be exploited for profit.
Arbitrage opportunities are often short‑lived, but they can be highly profitable. By showing you where spreads exist, this tool helps traders:
- Understand market inefficiencies
- Avoid trading at unfavorable prices
- Identify potential profit opportunities across exchanges
As we can see in the image, the tool consists of two main graphics: a dashboard on the main chart and a histogram in the pane below.
Both are useful for understanding the behavior of the same asset on different crypto exchanges or forex brokers.
The tool's main goal is to detect and categorize spread activity across the major crypto and forex sources. The comparison uses data from up to 19 crypto exchanges and 13 forex brokers.
🔹 Forex or Crypto
The tool selects the appropriate sources (crypto exchanges or forex brokers) based on the asset in the chart. Traders can choose which one to use.
The image shows the prices and volumes for Bitcoin and the euro across the main sources, sorted by descending average price over the last 20 days.
🔹 Dashboard
The dashboard displays a list of all sources with four main columns: last price, average price, volume, and total volume.
All four columns can be sorted in ascending or descending order, or left unsorted. A background gradient color is displayed for the sorted column.
Price and volume delta information between the chart asset and each exchange can be enabled or disabled from the settings panel.
🔹 Histogram
The histogram is excellent for visualizing historical values and comparing them with the asset price.
In this case, we have the Euro/U.S. Dollar daily chart. As we can see, the unusual spread activity detected since 2016, with values at or above 98%, is usually a good indication of increased trader activity, which may result in a key price area where the market could turn around.
By default, the histogram has the gradient and smoothing auto features enabled.
The differences are visible in the chart above. On top is an adaptive moving average with higher values for unusual activity. At the bottom is an exponential moving average with a length of 9.
The differences between the gradient and solid colors are evident. In the first case, the colors are in sync with the data values, becoming more yellow with higher values and more green with lower values. In the second case, the colors are solid and only distinguish data above or below the defined percentiles.
🔶 SETTINGS
- Sources: Choose between crypto exchanges, forex brokers, or automatic selection based on the asset in the chart.
- Average Length: Select the length for the price and volume averages.
🔹 Percentiles
- Percentile Length: Select the length for the percentile calculation, or enable the use of the full dataset. Enabling this option may result in runtime errors due to exceeding the allotted resources.
- Unusual % >: Select the unusual percentile.
- High % >: Select the high percentile.
- Typical % >: Select the typical percentile.
🔹 Dashboard
- Dashboard: Enable or disable the dashboard.
- Sorting: Select the sorting column and direction.
- Position: Select the dashboard location.
- Size: Select the dashboard size.
- Price Delta: Show the price difference between each exchange and the asset on the chart.
- Volume Delta: Show the volume difference between each exchange and the asset on the chart.
🔹 Style
- Unusual: Enable the plot of the unusual percentile and select its color.
- High: Enable the plot of the high percentile and select its color.
- Typical: Enable the plot of the typical percentile and select its color.
- Low: Select the color for the low percentile.
- Percentiles Auto Color: Enable auto color for all plotted percentiles.
- Histogram Gradient: Enable the gradient color for the histogram.
- Histogram Smoothing: Select the length of the EMA smoothing for the histogram or enable the Auto feature. The Auto feature uses an adaptive moving average with the data percent rank as the efficiency ratio.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Get exclusive indicators & AI trading strategies: luxalgo.com
Free 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Free 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Get exclusive indicators & AI trading strategies: luxalgo.com
Free 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Free 150k+ community: discord.gg/lux
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.