# Arbitrage Sniper (POC)

1797 lượt xem
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 của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

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

## Bình luận

Thank you will take a. look tonight
Phản hồi
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Xu Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Tin nhắn riêng Trò chuyện Đăng xuất