OPEN-SOURCE SCRIPT
Updated BABI - Binance Altcoin Basis Indicator

This indicator works by taking the basis between various altcoin perpetual futures contracts and spot market indexes on Binance, and then smooths out the data with a basic moving average.
The result is a useful oscillator that shows potential "buy" and "sell" areas.
Simply put, a spot premium is usually bullish and a derivatives premium is usually bearish.
Other versions of this indicator only worked for BTC and ETH, so I have extended its functionality to include popular altcoin trading pairs.
USDT Trading pairs included in this version:
•BTC
•ETH
•LTC
•ICP
•SOL
•LUNA
•GRT
•ATOM
•ADA
•XRP
•ETC
•AVAX
Default setting is BTC. To choose a different oscillator, go to settings and pick your desired crypto.
Thanks for looking. I think you could create a pretty basic trading strategy based on this indicator by simply placing buy and sell orders once the oscillator rises or falls below certain thresholds.
**Credit to @chestbrook on Twitter and Pinnacle_Investor on TradingView
Binance Basis Oscillator (tradingview.com/script/7lqxQ9OA-Binance-Basis-Oscillator/)
Release Notes
Drastically simplified code and made loading more efficient by creating search bar instead of drop down menu for altcoin pairs. You now can simply type in "BTC" or "LTC" or any altcoin of your choice and the indicator will load the Basis chart for that coin's trading pair. Load times are faster because in the old version, the indicator had to buffer all the data from every pair that had been included in the code. Now it only buffers when you wish to see the pair, so it is much more computationally efficient and easier to use.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.