scale

The scale namespace provides constants that control which price scale an indicator is attached to. These constants are passed to the scale parameter of @script.indicator().

Quick Example

from pynecore.lib import script, close, ta, scale

@script.indicator(title="Volume Oscillator", scale=scale.left)
def main():
    fast: float = ta.ema(close, 5)
    slow: float = ta.ema(close, 20)
    osc: float = fast - slow

Constants

ConstantDescription
scale.leftAttaches the indicator to the left price scale.
scale.rightAttaches the indicator to the right price scale.
scale.noneDisplays the indicator without a price scale (“No Scale” mode). Requires overlay=True.

Usage

Pass a scale constant to @script.indicator():

@script.indicator(title="My Overlay", overlay=True, scale=scale.none)