Rostfrei
Rostfrei

Reputation: 484

Pine script indicator undesired chart scaling

I coded indicator that creates monthly/weekly/daily even on lower time frames based on the information from higher time frames.

This levels can be created far back in the history. What annoys me that when analysing chart on lower time frame, I don't want to see monthly level from way back. TradingView wants to show me all the lines from my indicator and squashes candles to fit all data.

Is there a way to disable this auto scaling? I just want bars to be show at the exact same scale as if there would be no lines created by my indicator. If lines would be in view they would be shown otherwise they are out of visible space but still there.

enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 2258

Answers (2)

Marcos Santiago
Marcos Santiago

Reputation: 1

Trying enabling the "Scale price chart only" option in the cog wheel menu on the bottom right of the chart.

Picture.

Upvotes: 0

vitruvius
vitruvius

Reputation: 21382

You can set scaling=scaling.none or disable the auto scaling yourself.

//@version=5
indicator("My script", overlay=true, scale=scale.none)
plot(100000)
plot(0)

enter image description here

Upvotes: 3

Related Questions