📢
Loading...
On this page
category
shape
Choose chart marker styles with PyneCore shape constants. Look up the Shape values accepted by plotshape() and compare the available symbols in the reference.
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, location, size
@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=location.belowbar,
color=color.green, size=size.small)
plotshape(cross_down, style=shape.triangledown, location=location.abovebar,
color=color.red, size=size.small)Constants
All shape constants are of type Shape and are passed to the style parameter of plotshape().
| Constant | Description |
|---|---|
shape.arrowdown | Downward-pointing arrow |
shape.arrowup | Upward-pointing arrow |
shape.circle | Filled circle |
shape.cross | Cross (plus sign) |
shape.diamond | Diamond shape |
shape.flag | Flag marker |
shape.labeldown | Label with downward pointer |
shape.labelup | Label with upward pointer |
shape.square | Filled square |
shape.triangledown | Downward-pointing triangle |
shape.triangleup | Upward-pointing triangle |
shape.xcross | X-shaped cross |
Compatibility
All 12 constants are fully implemented. No stubs or missing items.