# Arbitrage Sniper (POC)

Aggiornato
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
Note di rilascio:
Small update in order to make it prevent-repainting compliant according to the recent changes made by script moderators

Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?