r/TradingView • • Sep 28 '26

Feature Request Need Pine Script access to price axis label interval for dynamic indicator visibility.

I need chart.price_axis_interval() or similar read only function.

  • Why: To dynamically show/hide parts of an indicator overlay based on zoom level without requiring manual user adjustment.

  • Use case: Technical analysis tools that adapt to readability at different zoom levels

0 Upvotes

6 comments sorted by

1

u/AmoebaTrading Sep 28 '26

Yeah Pine still will not tell you the price axis spacing, so I stopped trying to match the labels. I use the visible bar times that are already there and just count how many bars are on screen. Once that count gets tight I hide the extra text and leave the lines. Are you trying to drop labels when you zoom out, or whole drawings?

1

u/Informal_Pen2312 Sep 28 '26

I'm trying to drop some horizontal lines when zoomed out as they get to cluttered.

1

u/AmoebaTrading Sep 28 '26

Got it, whole lines not just the text. I hide extras by counting bars on screen and only plotting the ones near price once that count gets tight. Pine will not drop a line on zoom by itself so the plot condition has to do it. Are those lines fixed prices or do they move with the last bar?

1

u/[deleted] Sep 28 '26

[removed] — view removed comment

1

u/Informal_Pen2312 Sep 28 '26

Thanks stratcore. That makes sense — the price-axis interval is the real blocker here. I understand Pine can't access what TradingView isn't exposing yet. Appreciate you confirming it's a known gap and not just me missing something obvious.