size

The size namespace provides constants for specifying the visual size of chart objects such as labels, shapes, boxes, and table cells. These constants are passed to the size parameter of drawing functions like label.new(), box.new(), plotchar(), and plotshape().

Quick Example

from pynecore.lib import close, ta, label, size, bar_index, script

@script.indicator(title="Size Demo", overlay=True)
def main():
    if ta.crossover(close, ta.sma(close, 20)):
        label.new(bar_index, close, "Cross", size=size.normal)

Constants

ConstantDescription
size.autoAutomatically adjusts size based on context. Supported by plotchar, plotshape, label.new, and box.new.
size.hugeLargest fixed size. Supported by plotchar, plotshape, label.new, box.new, and table.cell.
size.largeLarge fixed size. Supported by plotchar, plotshape, label.new, box.new, and table.cell.
size.normalStandard size. Supported by plotchar, plotshape, label.new, box.new, and table.cell.
size.smallSmall fixed size. Supported by plotchar, plotshape, label.new, box.new, and table.cell.
size.tinySmallest fixed size. Supported by plotchar, plotshape, label.new, box.new, and table.cell.