Proper Round Functions [QuantNomad]

More exclusive indicators from QuantNomad
Subscribe to UT Bot Suite for $9.99/month to get exclusive indicators by this author. You pay right on TradingView and can use them on your charts straight away.
Explore UT Bot SuiteRound function in PineScript is very simple and allows you to round numbers only to the closest integer number. This is a bit irritating because I very often have to round numbers to some decimal places and not integer.
So I created 2 functions I use all the time and now sharing them with you.
I hope they will be useful for you.
So I created 2 functions I use all the time and now sharing them with you.
- roundn - rounds the values in its first argument to the specified number of decimal places.
- roundtick - rounds the values to current symbol mintick
I hope they will be useful for you.
Quant Developer | Pine Script v6 | Python & R
12+ yrs in systematic trading, derivatives & hedge funds
🚀 Pro Indicators & Tools:
qntly.com/pro
💼 Quant Advisory & Development:
qntly.com/hire
12+ yrs in systematic trading, derivatives & hedge funds
🚀 Pro Indicators & Tools:
qntly.com/pro
💼 Quant Advisory & Development:
qntly.com/hire
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
Quant Developer | Pine Script v6 | Python & R
12+ yrs in systematic trading, derivatives & hedge funds
🚀 Pro Indicators & Tools:
qntly.com/pro
💼 Quant Advisory & Development:
qntly.com/hire
12+ yrs in systematic trading, derivatives & hedge funds
🚀 Pro Indicators & Tools:
qntly.com/pro
💼 Quant Advisory & Development:
qntly.com/hire
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。