Sidechair

settlement_as_close.* constants

Browse the reference

Whether a futures daily bar closes at the settlement price: settlement_as_close.on, off or inherit.

Try it in the editor

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

NameValueDescription
settlement_as_close.inheritUse the chart's setting.
settlement_as_close.offDaily closes are the last trade.
settlement_as_close.onDaily 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.new is not supported yet; it warns once and returns na.

Example

Pine ScriptSettlement closesOpen in editor
//@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