ArbyTrade

Arbitrage Spread v2 : 3 pairs + 3 charts [Arby.Trade]

ArbyTrade Aktualisiert   
This indicator allows you to track in real time the change in the spread (the difference in the exchange rate) between two assets for three trading pairs at the same time.

How does the indicator work?
In the indicator settings menu, the user selects two trading pairs, for example BTCUSDT on the Binance exchange and BTCUSDT on the Bybit exchange, after which the script will receive prices from both exchanges and compare them with each other, calculating the percentage deviation between prices (spread). This setting can be made for three trading pairs. Keep in mind that the script can only work with those assets and exchanges that are on board TradingView, and this is quite a lot.
According to the calculated value of spreads, the spread lines for three trading pairs are displayed on the screen. The spread lines move between values above zero and below. When the spread line is below zero, it means that the price of the asset on the first exchange is less than on the second. That is, by buying an asset on the first exchange and selling it on the second one, you can earn money (of course, it is important to take into account the commissions of the exchanges for these transactions). When the spread line is above zero, the opposite is true. When the spread is zero, the prices on both exchanges are the same and there is no arbitrage situation.

Indicator settings.
For a better visual representation of the current spread value, the indicator has the ability to set two threshold spread levels. The first threshold level is the level below which the spread is not interesting to the trader and he will not consider arbitrage deals. The second threshold level is the level of a particularly high spread. When the spread value exceeds the second threshold level, the spread values will be signed above the spread line, and the extreme values for the user-defined period of bars back will be additionally highlighted in a brighter color. Both threshold levels are displayed on the chart and the user can change their values in the indicator settings menu.
The script allows you to leave only one spread line on the chart for one of the three trading pairs, while maintaining the display of indicator tables for three trading pairs. The script also allows you to completely disable the display of unnecessary trading pairs.
If the volatility of the spread lines is too high and the spread lines from different trading pairs overlap each other, use the "Distance between charts" setting and increase its value until the display of all three charts becomes comfortable.

Alerts.
Additionally, you can set the threshold value of the spread, at which the script will send notifications from TradingView. We called it the Spread Signal Threshold. This threshold level has nothing to do with the visual thresholds described above. You can set a signal level exceeding the second visual threshold or make it lower, but it is important to understand that TradingView alerts will only be triggered if the Spread Signal Threshold is exceeded. This threshold level is common to all trading pairs, so notifications will be sent when this spread level is reached for any of the three trading pairs.
To set up alerts, open the "Alerts" tab in the TradingView menu on the right. Click the "Create Alert" button. Then, in the window that opens, select this indicator in the "Condition" line. After that, you can set a name for this alert and complete the notification setup by clicking the "Create" button.

We, the authors of this script, have been engaged in cryptocurrency arbitrage for a long time and, first of all, created it for ourselves and our daily arbitrage trading, but this does not prevent you from using it at your discretion for any types of assets and in any markets.

We have a lighter version of the indicator that allows you to track the spread for only one trading pair. If this indicator seems too heavy for you and your device, you can use a lighter version.
If, on the contrary, the capabilities of your hardware allow, do not forget that you can always add several copies of this indicator to your screen and simultaneously track not 3, but 6-9-12 and so on arbitrage pairs at the same time. ;)

--
Данный индикатор позволяет отслеживать в реальном времени изменение спреда (разницы в курсе) между двумя активами по трем торговым парам.

Как устроен индикатор?
В меню настроек индикатора пользователь выбирает две торговые пары, например BTCUSDT на бирже Binance и BTCUSDT на бирже Bybit, после чего скрипт получит цены с обеих бирж и сравнит их между собой, рассчитав процентное отклонение между ценами (спред). Такую настройку можно произвести для трех торговых пар. Учитывайте, что скрипт может работать только с теми активами и биржами, которые есть на борту TradingView, и это не мало.
По рассчитанному значению спредов на экран выводится линии спредов по трем торговым парам. Линии спредов двигаются между значениями то выше нуля, то ниже. Когда линия спреда ниже нуля это значит что цена на актив на первой бирже меньше, чем на второй. То есть, купив актив на первой бирже и продав его на второй можно заработать (конечно при этом важно учитывать комиссии бирж на совершение данных сделок). Когда линия спреда выше нуля - наоборот. Когда спред равен нулю - цены на обеих биржах одинаковы и арбитражная ситуация отсутствует.

Настройки индикатора.
Для лучшего визуального представления о текущем значении спреда индикатор имеет возможность задать два пороговых уровня спреда. Первый пороговый уровень – это уровень, ниже которого спред не интересен трейдеру и он не будет рассматривать арбитражные сделки. Второй пороговый уровень – это уровень особенно повышенного спреда. Когда значение спреда превышает второй пороговый уровень над линией спреда будут подписаны значения спреда, а экстремальные значения за заданный пользователем период баров назад будут дополнительно выделены более ярким цветом. Оба пороговых уровня отображаются на графике и пользователь может менять их значения в меню настроек индикатора.
Скрипт позволяет оставить на графике только одну линию спреда по одной из трех торговых пар, при этом сохранив отображение индикаторных таблиц по трем торговым парам. Также скрипт позволяет полностью отключить отображение ненужных торговых пар.
Если волатильность линий спреда слишком высока и линии спреда от разных торговых пар накладываются друг на друга воспользуйтесь настройкой «Distance between charts» и увеличивайте ее значение до тех пор пока отображение всех трех графиков не станет комфортным.

Уведомления.
Дополнительно можно настроить пороговое значение спреда, при достижении которого скрипт будет отправлять уведомления от TradingView. Мы назвали это Spread Signal Threshold. Этот пороговый уровень никак не связан с визуальными пороговыми уровнями, описанными выше. Вы можете задать сигнальный уровень превышающий второй визуальный пороговый уровень или сделать его ниже, но важно понимать, что оповещения TradingView будут срабатывать только от превышения именно Spread Signal Threshold. Этот пороговый уровень является общим для всех торговых пар, поэтому уведомления будут приходить при достижении этого уровня спреда по любой из трех торговых пар.
Для настройки оповещений откройте вкладку «Оповещения» в меню TradingView справа. Нажмите кнопку «Создать оповещение». Затем в открывшемся окне в строке «Условие» выберете данный индикатор. После чего вы можете задать название данному оповещению и завершить настройку оповещения, нажав кнопку «Создать».

Мы, авторы данного скрипта, давно занимаемся арбитражем криптовалюты и, в первую очередь, создавали его для себя и своей каждодневной арбитражной торговли, но это не мешает вам использовать его по своему усмотрению для любых видов активов и на любых рынках.

У нас есть более легкая версия индикатора, позволяющая отслеживать спред только по одной торговой паре. Если данный индикатор покажется для вас и вашего устройства слишком тяжелым вы можете воспользоваться более легкой версией.
Если, наоборот, возможности вашего железа позволяют, не забывайте, что вы всегда можете добавить себе на экран несколько копий этого индикатора и отслеживать одновременно не 3, а 6-9-12 и тд арбитражных пар одновременно. ;)
Versionshinweise:
A counter for the number of arbitrage situations on the selected trading pair for three time periods has been added to the indicator. Each time the spread value of the Signal Threshold Level is exceeded the counter will add one. The counter takes into account only those arbitrage situations that were on the market during the time period back from the current moment. For example, for a 1-hour counter period, it will show the number of arbitration situations in the last 1 hour.

This counter will allow you to evaluate the prospects of arbitrage of selected trading pairs. For example, if the number of arbitrage situations on the selected trading pair was 1-2 within an hour, then it is obvious that it is better not to waste time waiting for another such situation on this pair and look for the next one.

For the most effective use of the indicator, we recommend using the following approach: in order to pre-evaluate the nature of the spread movement and the frequency of arbitrage situations on the selected trading pairs, choose the senior timeframe of the main chart (5m or 1H), so the results will be rough, but will give a general idea of the potential of the selected pairs for arbitration. For a more accurate analysis and the work itself, use the minimum timeframe available for your TradingView subscription – minute or second – so the results of calculations of the spread and the number of arbitrage situations on the selected pairs will be the most accurate.

This feature is due to the fact that calculations and plotting are based on the results of closing bars. Therefore, the higher the timeframe, the fewer closed bars (confirmed data) – the chart and data are rougher. But the lower the timeframe, the more data, the higher the update frequency – the more accurate the charts and calculations. However, this does not affect the display of current prices and the current spread value – they are always up-to-date and displayed as quickly as possible as soon as the performance of TradingView and incoming data from exchanges allows.

In this version of the indicator you can track arbitrage situations for three trading pairs simultaneously. If this is too much and loads your system, we have a similar indicator for one trading pair only. But if, on the contrary, it is not enough, look at the version of this indicator for simultaneous tracking of 12 trading pairs on our TradingView page.

-

В индикатор добавлен счетчик количества арбитражных ситуаций на выбранной торговой паре по трем временным периодам. При каждом превышении значения спреда уровня Signal Threshold Level счетчик будет прибавлять единицу. Счетчик учитывает только те арбитражные ситуации, которые были на рынке в течение временного периода назад от текущего момента. К примеру, для 1-часового периода (1h) счетчика он будет показывать количество арбитражных ситуаций за последний час.

Этот счетчик позволит оценить перспективность арбитража выбранных торговых пар. К примеру, если количество арбитражных ситуаций на торговой паре в течение часа было 1-2, то очевидно, что лучше не тратить время на ожидание очередной такой ситуации на данной паре и поискать следующую.

Для наиболее эффективного использования индикатора мы рекомендуем применять следующий подход: для того чтобы предварительно оценить характер движения спреда и частоту возникновения арбитражных ситуаций на выбранных торговых парах, выбирайте старший таймфрем основного графика (5м или 1Н), так результаты будут грубыми, но дадут общее представление о потенциале выбранных пар для арбитража. Для более точного анализа и непосредственно самой работы используйте минимально доступный для вашей подписки TradingView таймфрейм – минутный или секундный – так результаты расчетов спреда и количества возникновения арбитражных ситуаций будут наиболее точными.

Такая особенность связана с тем, что расчеты и построение графика строятся по результатам закрытия баров. Поэтому чем выше таймфрейм тем меньше закрытых баров (подтвержденных данных) – график и данные более грубые. А чем ниже таймфрейм, тем больше данных, выше частота обновления – точнее график и расчеты. Тем не менее, на отображение текущих цен и текущего значения спреда это не влияет – они всегда актуальные и отображаются максимально быстро как только позволяет производительность TradingView и поступающих данных с бирж.

В этой версии индикатора можно отслеживать арбитражные ситуации одновременно по трем торговым парам. Если это слишком много и нагружает вашу систему – у нас есть аналогичный индикатор под одну торговую пару. А если, наоборот, недостаточно - посмотрите версию данного индикатора для одновременного отслеживания 12 торговых пар на нашей странице TradingView.

Geschütztes Skript
Dieses Skript wird als Closed-Source veröffentlicht und Sie können es frei verwenden. Sie können es favorisieren, um es auf dem Chart zu verwenden. Sie können den Quellcode nicht einsehen oder verändern.
Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?