BTC Contango Index

‎1985‎ مشاهدة
Inspired by a Twitter post by Byzantine General:

This is a script that shows the contango between spot and futures prices of Bitcoin to identify overbought and oversold conditions. Contango and backwardation are terms used to define the structure of the forward curve. When a market is in contango, the forward price of a futures contract is higher than the spot price. Conversely, when a market is in backwardation, the forward price of the futures contract is lower than the spot price.

The aggregate prices on top exchanges are taken and then averaged to obtain a Spot Average and a Futures Average. The script then plots ( Futures Average/Spot Average) - 1 to illustrate the percent difference (contango) between spot and futures prices of Bitcoin .

When in contango, Bitcoin may be overbought.
When in backwardation, Bitcoin may be oversold.
ملاحظات الأخبار: Updated to show contango/backwardation in real time — just select your current timeframe in the dropdown menu.
ملاحظات الأخبار: Updated to show contango/backwardation in real time — just select your current timeframe in the dropdown menu.
ملاحظات الأخبار: Updated image
ملاحظات الأخبار: Added an option to show VWAP of the contango line, which can help to filter noise.
ملاحظات الأخبار: Added more markets to aggregate prices from.
ملاحظات الأخبار: Added options in the menu to select which exchanges are included in the calculation. Because of the logic, some exchanges are paired - may find a way to unpair them later.
ملاحظات الأخبار: Updated to include an option for repainting -- default value is true, meaning the script will repaint the current bar.

False = Not Repainting = Value for the current bar is not repainted, but all past values are offset by 1 bar.

True = Repainting = Value for the current bar is repainted, but all past values are correct and not offset by 1 bar.

In both cases, all of the historical values are correct, it is just a matter of whether you prefer the current bar to be realistically painted and the historical bars offset by 1, or the current bar to be repainted and the historical data to match their respective price bars.

As explained by TradingView,`f_security()` is for coders who want to offer their users a repainting/no-repainting version of the HTF data.

Also repaired the three paired exchanges so they make more sense:
Coinbase/Deribit --> Coinbase/Bitmex
Bitfinex/Bitmex --> Bitfinex/Bybit
Bitstamp/Bybit --> Bitstamp/Deribit

Removed the option to show VWAP.
ملاحظات الأخبار: Removed the timeframe input to simplify the script.
ملاحظات الأخبار: Fixed a bug in the final logic.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟


Bro, sorry for my ignorance, but which is the oversold side ? Is it the top or the bottom.
I'm not a technical guy and do not understand how to read the script.
hey bro, is this working ? not loading for me for some reasons.
@sippin, should be working as expected. Let me know.
sippin MartinShkreIi
@MartinShkreIi, getting this yellow shadow in the chart without update in contango index, is there any delay in data ? can you explain what it is ?
you should return a value? of final for ploting and having the deviation value from the futur / spot ?
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي حول مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر