Sidechair

scale.* constants

Browse the reference

Which price scale an indicator uses: scale.left, scale.right, or scale.none to share the pane without a scale of its own.

Try it in the editor

scale.* constants go in the scale argument of indicator(). scale.right and scale.left attach the indicator to the right or left price axis. scale.none attaches it to no axis; it can then only be drawn as an overlay, and it is the way to draw values that should not stretch the chart's scale.

scale.none works only when overlay is true, because an indicator in its own pane needs an axis.

Constants

NameValueDescription
scale.leftUse the left price axis.
scale.noneUse no price axis; overlay indicators only.
scale.rightUse the right price axis.

Remarks

  • Leave scale out to use the chart's default, usually the right axis.

Example

Pine ScriptLeft-axis indicatorOpen in editor
//@version=6
indicator("Left scale", overlay = true, scale = scale.left)
plot(ta.sma(volume, 20), "Average volume", color.blue, 2)
plot(volume, "Volume", color.new(color.gray, 70), style = plot.style_columns)

See also

Runs on Sidechair