Drun30

Arbitrage Sniper (POC)

Drun30 Cập nhật   
Good Morning Traders!
Today I want to share with you the proof-of-concept of how you would be able to do arbitrage with crypto pairs.
THE INDICATOR MUST BE PLACED ON THE TRADING PAIR OF THE TWO CURRENCIES (i.e. ETH/BTC, EOS/ETH etc.)

This arbitrage method is based on the transitional decorrelation between the crypto treding pair and the price ratio of the involved currencies, of course computing commissions as well.
Whenever the non-arbitrage condition is not respected, there is an arbitrage oportunity.
This indicator won't consider the chance of shorting, so if the arbitrage oportunity occurs the indicator will suggest you just the chance of buying the relative-undervalued currency (but inside the code you will know how to do the alternative method as well, by shorting the relative-overvalued currency)

Let's take the trading pair ETH/BTC (as in the graph) → if we assume commissions for the 0.075% of the order, the non-arbitrage condition will be presented like this
This arbitrage method will need three orders, so n=3

So let's assume that P(ETH)/(P(BTC)*P(ETH/BTC))>(1-0.075)^(-3) → it means that the price of Ethereum is currently overreated enough (relatively to the trading pair) for doing arbitrage.

We have two alternatives:
• Buy BTC, change it into ETH (by "buying" ETH in the trading pair ETH/BTC) and then sell ETH
• Sell ETH, buy BTC, change it into ETH (by "buying" ETH in the trading pair ETH/BTC)

On the other hand, if P(ETH)/(P(BTC)*P(ETH/BTC))<(1-0.075)^(-3) → it means that the price of Ethereum is currently underrared enough (relatively to the trading pair) for doing arbitrage.

We have two alternatives:
• Buy ETH, change it into BTC (by "selling" ETH in the trading pair ETH/BTC) and then sell BTC
• Sell BTC, buy ETH, change it into BTC (by "selling" ETH in the trading pair ETH/BTC)

I'm saying that is nothing more than a proof-of-concept since:
- Arbitrage Oportunities will emerge frequently just nearly zero commissions
- Data of prices are retrieved using security() function and there can be some delay (so the arbitrage oportunity will be already extinguished by the time the signal is retrieved)
- In order to have the freshest data, repiainting will occurr
Phát hành các Ghi chú:
Small update in order to make it prevent-repainting compliant according to the recent changes made by script moderators

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?