Whether a futures daily bar closes at the settlement price: settlement_as_close.on, off or inherit.
settlement_as_close.* constants go in the settlement_as_close argument of ticker.new and ticker.modify. For futures on daily and higher timeframes, settlement_as_close.on makes each bar's close the official settlement price instead of the last trade. settlement_as_close.off uses the last trade, and settlement_as_close.inherit takes the chart's setting.
Intraday bars are unaffected: the setting changes only the close of daily, weekly and monthly bars.
Constants
| Name | Value | Description |
|---|---|---|
settlement_as_close.inherit | Use the chart's setting. | |
settlement_as_close.off | Daily closes are the last trade. | |
settlement_as_close.on | Daily closes are the settlement price. |
Remarks
- Settlement prices differ from the last trade by a small amount, but enough to move a signal that triggers on a close.
- On Sidechair:
ticker.newis not supported yet; it warns once and returns na.
Example
//@version=6
indicator("Settlement", overlay = true)
settle = ticker.new(syminfo.prefix, syminfo.ticker, settlement_as_close = settlement_as_close.on)
plot(close, "Close", color.blue)
if barstate.islast
label.new(bar_index, high, "Ticker: " + str.tostring(settle))See also
Runs on Sidechair