twingall

Meats: Backwardation/Cantango

twingall Cập nhật   
MEATS: Live Cattle , Feeder Cattle, Lean Hogs (LE, GF , HE)
Quickly visualize carrying charge market vs backwardized market by comparing the price of the next 2 years of futures contracts.
Carrying charge (contract prices increasing into the future) = normal, representing the costs of carrying/storage of a commodity. When this is flipped to Backwardation (contract prices decreasing into the future): its a bullish sign: Buyers want this commodity, and they want it NOW.

Note: indicator does NOT map to time axis in the same way as price; it simply plots the progression of contract months out into the future; left to right; so timeframe DOESN'T MATTER for this plot
There's likely some more efficient way to write this; e.g. when plotting for Live Cattle (LE); 8 of the security requests are redundant; but they are still made; and can make this slower to load
TO UPDATE(once a year will do): in REQUEST CONTRACTS section, delete old contracts (top) and add new ones (bottom). Then in PLOTTING section, Delete old contract labels (bottom); add new contract labels (top); adjust the X in 'bar_index-(X+_historical)' numbers accordingly

This is one of three similar indicators: Meats | Metals | Grains
-If you want to build from this; to work on other commodities ; be aware that Tradingview limits the number of contract calls to 40 (hence the 3 seperate indicators)

Tips:
-Right click and reset chart if you can't see the plot; or if you have trouble with the scaling.
-Right click and add to new scale if you prefer this not to overlay directly on price. Or move to new pane below.

--Added historical input: input days back in time; to see the historical shape of the Futures curve via selecting 'days back' snapshot
updated 15th June 2022
© twingall
Phát hành các Ghi chú:
-updated contracts
Phát hành các Ghi chú:
-added function to detect if contract is expired: Now will stop showing contracts once they expire, unless using the backtesting 'snapshot' mode

You can buy me a coffee here...

PayPal.Me/twingall
BTC: 3JrhUwNRnKyqhaa1n1AXKeAubNeEFoch6S
ETH erc20: 0x4b0400B1c18503529ab69611e82a934DDe4Ab038
ETH bep20: 0x1F0f03F184079bb1085F8C9dF3a8191C9f5869B3
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 đồ?