OPEN-SOURCE SCRIPT

pips bar

Updated
This indicator displays a line (pips bar) of lengths corresponding to the set number of pips on the chart. This pips bar serves as a reference for assessing the volatility of the displayed chart. One pip for currency pairs is distinguished for JPY pairs and for others.
The horizontal position of the pips bar is offset to the right of the latest bar by the specified bar amount, and the vertical position can be selected from Top, Middle, or Bottom, calculated using the maximum and minimum values visible on the chart.
Release Notes
pip calculation method was changed.
pip = syminfo.mintick * (syminfo.type == "forex" ? 10 : 1)
Release Notes
chart was changed.
Release Notes
pip calculation was changed and pine version was updated to version 6
pip = syminfo.mintick * 10
Release Notes
Thanks for the improvement ideas. I have modified the indicator.
This indicator defines 1 pip as 10 times the minimum tick value of the chart. For 'OANDA:XAGUSD', where this standard method doesn't display the pips bar correctly, it automatically sets 1 pip to 0.01. For other cases where the standard method doesn't display correctly, I've made it possible to input the pip value manually.
Now, you can select the horizontal position. The default 'Right' setting displays it on the right side of the last chart bar as before. When 'Left' is selected, it displays the bar offset from the right side of the leftmost visible chart bar.
Volatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer