Bitcoin Perpetual Swaps Basis

Click the image to see more details on that indicator.
https://www.tradingview.com/script/OFebImhm-Aggregated-Perpetuals-Basis/
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
Removed the smoothing option because it's redundant, everything that makes the indi load faster is good.
I also made some changes to the index weighting so that more actively traded markets have a bigger impact on the basis calculation.
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.
สคริปต์เฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ ByzantiumScripts โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำเตือน: โปรดอ่านคำแนะนำของเราสำหรับสคริปต์เฉพาะที่ได้รับเชิญเท่านั้น ก่อนที่จะขอสิทธิ์เข้าถึง
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์เฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ ByzantiumScripts โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำเตือน: โปรดอ่านคำแนะนำของเราสำหรับสคริปต์เฉพาะที่ได้รับเชิญเท่านั้น ก่อนที่จะขอสิทธิ์เข้าถึง