paamachat
paamachat

Reputation: 73

Does pinescript allow you to hide numerical values on the Y-axis

I'm preparing an indicator whose output is relative. The actual values are not only meaningless, but distracting. Is there some pinescript code that will prevent these values from being displayed on the Y-axis?

To further clarify, I'm not trying to remove the highlights on the Y-axis that mark the current value of the indicator (e.g. as would be done with:

display = - display.price_scale

I'm trying to suppress the display of all values on the Y-axis as illustrated in this image. enter image description here

Also note that

scale=scale.none

in the indicator call statement is not a solution because this won't compile unless the indicator is an overlay.

Upvotes: 0

Views: 66

Answers (1)

vitruvius
vitruvius

Reputation: 21342

You can use display.all - display.price_scale.

Below code will display high and low prices. The high (green) price will be displayed everywhere, whereas the low (red) price will be displayed everwhere except the price scale.

//@version=6
indicator("My script")

plot(high, "High", color.green, display=display.all)
plot(low, "Low", color.red, display=display.all - display.price_scale)

enter image description here

Upvotes: 0

Related Questions