Which price scale an indicator uses: scale.left, scale.right, or scale.none to share the pane without a scale of its own.
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
| Name | Value | Description |
|---|---|---|
scale.left | Use the left price axis. | |
scale.none | Use no price axis; overlay indicators only. | |
scale.right | Use the right price axis. |
Remarks
- Leave scale out to use the chart's default, usually the right axis.
Example
//@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