ByzantiumScripts

Bitcoin Perpetual Swaps Basis

This is a simplified version of my Aggregated Perpetual Swaps Basis script.
Click the image to see more details on that indicator.

This version works only for bitcoin (the older script works for BTC and ETH) and a bunch of code has been trimmed down.
The purpose of this is to make the indicator a lot faster.

When I published the old one I noticed that it always took a long time to load which is incredibly frustrating to me.
I guess I propped too much stuff in one indicator.
So that's why I'm basically cutting it up into two, more code efficient pieces, but it does the same thing.
People who have access to the old indicator will also get access to this one.

Here's a list of contracts that I used to make the perps and spot indices.
These will be updated if needed (in case an exchange loses relevancy for example).

Perps:
  • Binance USDT margin
  • Binance coin margin
  • Bybit USDT margin
  • Bybit coin margin
  • FTX perp

Spot:
  • Coinbase USD
  • Bitfinex USD
  • FTX USD
  • Binance USDT
版本注释:
Updated weighting and components of the indices.

Removed the smoothing option because it's redundant, everything that makes the indi load faster is good.
版本注释:
FTX shut down so I removed that data and replaced it Binance BUSD markets.

I also made some changes to the index weighting so that more actively traded markets have a bigger impact on the basis calculation.
版本注释:
Corrected small mistake in code.
版本注释:
Big update under the hood.
I adjusted all the indices and calculations so that it more accurately reflects the official index premiums that the exchanges use.
I also added an option to look at individual exchange premiums, but by default it'll show the global average premium.

I also inverted the colours because it made more sense that positive values are green I thought.
版本注释:
Tradingview changed the tickers for perpetual swaps contracts so I updated it.

Send me a private message for access to my invite only indicators.
仅限邀请脚本

仅限作者授权的用户访问此脚本,并且通常需要付费。您可以将其添加到收藏中,但是只有在向作者请求并获得许可之后,才能使用它。 请与ByzantiumScripts联系以获取更多信息,或按照以下作者的说明进行操作。

在您100%信任脚本作者并了解脚本的工作原理之前,TradingView不建议您购买脚本并使用它。在很多情况下,您可以在我们的公共指标库中免费找到一个不错的开源替代品。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

作者的说明

Send me a private message if you want access.

想在图表上使用此脚本?

警告:请阅读,然后再请求访问权限。