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.
www.investopedia.com
Settlement prices for ES.
www.cmegroup.com
CME summary of settlement price.
www.cmegroup.com
How to enable settlement price as close for daily intervals in TradingView. This does not affect the use of this script.
www.tradingview.com
About back-adjustment for continuous futures charts in TradingView.
www.tradingview.com
Settlement
% Chg LinesThis indicator is designed to visually represent percentage changes from the previous day's close.
1. Percentage Change Lines : The core function of the script is to apply lines to the chart that represent specific percentage changes from the previous day's closing price. It can display up to five different percentage levels, ranging from 0.50% to 2.50% by default but the user can set any value that they wish. This feature allows users to quickly gauge how the current price is performing relative to the previous day's close.
2. Customizable Inputs : Users have the flexibility to customize the script through various inputs. This includes the option to display lines only for the current trading day (`todayonly`), and to select which specific percentage change levels to plot (`show_pct1` to `show_pct5`).
3. Dynamic Calculation : The script dynamically calculates the previous day's closing price by making a request security call and uses it as a baseline to determine the percentage change levels.
% Change = (y2-y1)/y1*100
4. Positive and Negative Changes : It plots both positive and negative percentage changes, allowing users to see areas of potential resistance and support based on historical closing data.
This script is can be used by all traders for any market. The trader might have to adjust the %Chg input amount, but most financial instruments do see "reactions" at certain % intervals.
Settlement priceThis script is meant to be used intraday, on futures products.
It charts the previous day/week/month settlement price as a constant level intraday.
The settlement price of a product is calculated by the exchange at the end of each day. It is shown in the D/W/M chart as the close price. The settlement price does not coincide with the last close price intraday, thus creating the need of a script like this.
The settlement price can be a pivotal price in intraday futures trading, as it can act as support or resistance
You can select the resolution of the settlement by the "Resolution" input
Daily Settlement (BM&FBOVESPA B3 FUTURES)This script is simple designed to plot the daily settlement to any Securities traded on B3, Brazilian stock exchange.
The daily settlement is an important price where position traders are adjusted every day. This adjustment is defined by the exchange itself every day at approximately 4 pm, with an average of all trades in this window.
We consider that the settlement is a region of "money spent", where every day, some player "woke up" in long or in short at that price. As this is a region of "money spent", traders should give significant attention when traded at this price.
CME & XBT - BTC Futures Settlement DatesHi everyone
This in an indicator inspired by Scarrff
I added the XBT quarterly and yearly settlement dates
Enjoy
David