How to change the precision for an indicator in TradingView?

How to change the precision for an indicator in TradingView?

By default indicators you add to the TradingView chart have the same precision as the underlying instrument you applying it on. Sometimes this can cause some problems:

We applied cumulative percentile to XBTUDT from Bitmex. Its min tick is 0.1$, so our indicator also inherited this precision. You can see that values change but on the y-axis, we always have only 1.0. Of course, that doesn’t make much sense, but fortunately, it’s pretty easy to change that in TradingView.

You can change precision from indicator settings. Click on the Gear icon near your indicator name:

Next on the “Style” tab, you’ll find a Precision dropdown where you can select how many digits you want to see after the comma.

Select needed precision and click ok, you’ll see that your indicator looks much better now:

Also, if you have access to the code of your indicator you can set the default precision in study() or strategy() function. Just specify the precision parameter and this will do the trick for you:

study("Percentile", overlay=false, precision = 5)

Follow me on TradingView and YouTube.

This image has an empty alt attribute; its file name is wide.png
Pine Script Programming Courses
Pine Script Programming Courses
Learn to build your own TradingView Indicators and Strategies
Sidebar Signup Form
If you want to be the first in this business, subscribe to the latest news