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
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
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
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.