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.
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 đồ?
 
// 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.

study(title="Arbitrage", shorttitle="Arb1.0", overlay=false)
spread = input(10,step=0.00000001,title="Spread $")
spreadpct = input(5,step=0.00000001,title="Spread %")/100
sym1 = input("BTCUSDT",title= "Symbol 1")
sym2 = input("COINBASE:BTCUSD",title= "Symbol 2")
source = close
sym11 = sym1, res11 = period
sym22 = sym2, res22 = period 

s1 = security(sym11, res11, source)
s2 = security(sym22, res22, source)

sym33 = s2-s1
aaa=(s2/s1)-1
bbb = aaa*100
plot(sym33, color=sym33>0?green:red, linewidth=2,style = columns,title="$",transp=60)
plot(bbb, color=bbb>0?teal:orange, linewidth=2,style = columns,title="%",transp=100)

bgcolor(abs(sym33)>=spread?purple : na, transp=40,title = "Spread $")
bgcolor(aaa>=spreadpct?yellow : na, transp=100,title = "Spread %",transp=100)