Sidechair

ticker.pointfigure()

Browse the reference

Builds a ticker id that serves a Point and Figure chart for a symbol, from a box size and a reversal count.

Try it in the editor

ticker.pointfigure(symbol, source, style, param, reversal) returns an id that request.security turns into a Point and Figure series. Columns of X (rising) and O (falling) boxes are drawn; a column flips only after a move of reversal boxes the other way.

Time plays no part, so a column can span many bars or form in one.

Syntax

Pine Script
ticker.pointfigure(symbol: simple string, source: simple string, style: simple string, param: simple int/float, reversal: simple int) -> simple string
ticker.pointfigure(symbol: series string, source: series string, style: series string, param: series int/float, reversal: series int) -> series string

Arguments

NameTypeDefaultDescription
symbolsimple/series stringrequiredThe ticker id to convert, such as syminfo.tickerid.
sourcesimple/series stringrequiredThe price the columns are built from: "hl" (highs and lows) or "close".
stylesimple/series stringrequiredHow the box size is set: "ATR" or "Traditional".
paramsimple/series int/floatrequiredThe ATR length for "ATR", or the box size in price units for "Traditional".
reversalsimple/series intrequiredHow many boxes price must move against the current column to start a new one. Three is the classic value.

Returns

simple/series string: A ticker id string. Pass it to request.security as its symbol argument.

Remarks

  • All five arguments are required.

Example

Pine ScriptPoint and Figure closeOpen in editor
//@version=6
indicator("P&F close", overlay = true)
pfId = ticker.pointfigure(syminfo.tickerid, "close", "ATR", 14, 3)
pfClose = request.security(pfId, timeframe.period, close)
plot(close, "Close", color.gray)
plot(pfClose, "P&F close", color.orange, style = plot.style_stepline)

See also

Runs on Sidechair