TradingView
Quicksilver80
Jun 2, 2016 1:15 AM

Arbitrage 

Bitcoin / Tether USDPoloniex

描述

Arbitrage v1.0
This is a simple tool to indicate arbitrage opportunities between TWO markets. Base currency must be the same for both markets. Arbitrage signal and minimum market spread uses percentage, base currency or both. Spread input accepts increments as small as 0.00000001. Works best with smaller time frames.

I will develop this further if enough people show an interest.
评论
jpeugster
Hello Quicksilver, I like your Arbitrage very much. Can you explain me what's the best settings for this script and how to use it. Is it possible for other pairs?
Quicksilver80
// This is an update to Arbitrage.
// Base currency must be the same for both markets.
// Arbitrage signal and minimum market spread uses percentage or base currency.
// Spread input accepts increments as small as 0.00000001 to support cryptocurrencies.
// Default Spread Values: 2.5% and 0.00025000 base currency points.

study(title= "Arbitrage", shorttitle= "Arb2.0", overlay= false)
source = close
spread = input(0.00025000, step=0.00000001, title= "Spread")
zzz = input(true, title= "Calculate Spread By % ?")
spreadp = input(2.50000000,step= 0.00000001, title= "Spread %")
spreadpct = spreadp/100
m1 = input("POLONIEX:BTCUSDT" ,title= "Market 1")
m2 = input("COINBASE:BTCUSD", title= "Market 2")
res1 = period
res2 = period
s1 = security(m1, res1, source)
s2 = security(m2, res2, source)
aaa = s2-s1
bbb = (s2/s1)-1
ccc = bbb*100
buy = min(s1,s2)
sell = max(s1,s2)
x1 = (sell/buy)-1
plot(zzz==0? aaa :na, color= aaa>0 ? green : red, style = columns, title= "$", transp= 60)
plot(zzz==1? bbb : na, color= ccc>0 ? green : red, style = columns, title= "%", transp= 60)
bgcolor(zzz==1? na : abs(aaa) >= spread? fuchsia : na, transp=80, title= "$ Signal")
bgcolor(zzz==0? na : x1 >= spreadpct? fuchsia : na, transp=80, title= "% Signal")
plot(zzz==0? spread : spreadpct, color= aqua, style= line, title= "Buy M1", transp= 20, linewidth= 1)
plot(zzz==0? spread*-1 : spreadpct*-1, color= orange, style= line, title= "Sell M1", transp= 10, linewidth= 1)
DeemaWave
@Quicksilver80, It`s that what i was look for Big Respect.

but how to update it ? I need 2 create new indi. and copy/paste this code ?
DeemaWave
Done ... Thx!
gianfranco60
Hi this indicator maybe useful between usoil /ukoil but it is not perfect yet. Thanks
更多