shape

The shape namespace provides marker shape constants for use with plotshape(). Each constant specifies the visual style of the marker rendered on the chart.

Quick Example

from pynecore.lib import script, plotshape, ta, close, high, low, shape, color

@script.indicator(title="Shape Demo", overlay=True)
def main():
    cross_up = ta.crossover(close, ta.sma(close, 20))
    cross_down = ta.crossunder(close, ta.sma(close, 20))

    plotshape(cross_up, style=shape.triangleup, location="belowbar",
              color=color.green, size="small")
    plotshape(cross_down, style=shape.triangledown, location="abovebar",
              color=color.red, size="small")

Constants

All shape constants are of type Shape and are passed to the style parameter of plotshape().

ConstantDescription
shape.arrowdownDownward-pointing arrow
shape.arrowupUpward-pointing arrow
shape.circleFilled circle
shape.crossCross (plus sign)
shape.diamondDiamond shape
shape.flagFlag marker
shape.labeldownLabel with downward pointer
shape.labelupLabel with upward pointer
shape.squareFilled square
shape.triangledownDownward-pointing triangle
shape.triangleupUpward-pointing triangle
shape.xcrossX-shaped cross

Compatibility

All 12 constants are fully implemented. No stubs or missing items.