OPEN-SOURCE SCRIPT

Futures Settlement [NeoButane]

업데이트됨
Traders use settlement prices as both support/resistance and as a target for price to trend towards. The intention of this script is to provide possible entry and exit levels for swing and scalp trades by drawing horizontal lines of true settlement prices provided by TradingView.

The settlement price, which is calculated daily, is used to determine the profit/loss of a trader's futures position. Prior to the daily close, price settlement of futures contracts is performed by taking the average of its traded price during a specified period of time.

Usage
The settlement prices, shown as horizontal lines, serve as support or resistance for entry or exit. There are hundreds of ways to combine this with favorite indicators, or it can be used as levels for pure price action traders.

See how settlement price levels can be used in confluence with oscillators.
스냅샷

Configuration
Toggles to show each settlement. Reprint shows prior weeks or months after they've ended. Back-adjusted futures, which affect expired futures price history on continuous futures charts, should only be enabled on non-standard charts to match the user's chart settings.
스냅샷


What this script does
This script plots the daily, weekly, and monthly settlements for futures, including an average for the two most recent weekly or monthly settlements. The weekly settlement uses the last day of the week's daily settlement and the monthly settlement uses the last day of the month's daily settlement. For symbols that do not have settlement prices, which will be almost if not all symbols that are not futures, the settlement price instead becomes price at the last second before the daily/weekly/monthly close. In those cases, this script becomes a tool for automatically plotting daily/weekly/monthly closes.

See below for two different bitcoin charts. The chart on top is a non-futures chart and a futures chart is at the bottom. Note that CME bitcoin futures settle 4 hours (1500 CST) before bitcoin's daily close (UTC).
스냅샷


How this script works
TradingView has a built-in ability to display daily settlements instead of the actual daily close. This can be enabled in chart settings for futures on the daily timeframe and there is an argument for Pine Script to do so as well. Because settlement times are different for multiple products during the day, the script uses the settlement price from daily timeframe, which is guaranteed to be correct because TradingView is wonderful. I accidentally found the undocumented backadjustment and settlement_at_close when I was trying to use ticker.inherit() to create a symbol with its daily close time changed to another symbol's, which I still haven't figured out. TradingView has since added documentation for both of them, but there's still an ambiguous 'etc.' in the description of ticker.inherit() so maybe there's more secret arguments...

The script is able to be used on non-standard charts by using ticker.standard(), but back-adjustment will need to be changed by input to match chart settings.
스냅샷

References
Investopedia explanation of settlement price.
investopedia.com/terms/s/settlementprice.asp

Settlement prices for ES.
cmegroup.com/markets/equities/sp/e-mini-sandp500.settlements.html

CME summary of settlement price.
cmegroup.com/market-data/daily-settlements.html

How to enable settlement price as close for daily intervals in TradingView. This does not affect the use of this script.
tradingview.com/chart/?solution=43000685268

About back-adjustment for continuous futures charts in TradingView.
tradingview.com/chart/?solution=43000685266
릴리즈 노트
Update
  • Added the last settlement of the quarter as an option to enable.
  • Added the final settlement of quarterly contracts for the year as an option to enable.


The final settlement is the final value of an expired contract and occurs on the last Friday in its expiration month. The final settlement price is not affected by back-adjustment. It can be used in the same fashion as the other settlement "levels".

More information on final settlement prices here:
tradingview.com/chart/?solution=43000703820
cmegroup.com/trading/equity-index/settlement.html
cmegroup.com/market-data/final-settlements.html

스냅샷
릴리즈 노트
Bugfix: When charting an active session, the last values of the settlement prices all become last price of the symbol. The settlement prices now correctly show during an active session.
cbotCMEcomexfuturesmultitimeframenymexPivot points and levelssettlementSupport and Resistance

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


My published indicators: tradingview.com/u/NeoButane/

Sorry if I haven't replied to your message yet, I'm a bit backlogged :)
또한 다음에서도:

면책사항