Round 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.
Courses:
Pine Programming v5: qntly.com/pineprog
Adv.Pine Use-Cases: qntly.com/advpine
Access to Pro Indic.: qntly.com/proind
Hire Me: qntly.com/hirepine
Telegram: qntly.com/tel
Pine Programming v5: qntly.com/pineprog
Adv.Pine Use-Cases: qntly.com/advpine
Access to Pro Indic.: qntly.com/proind
Hire Me: qntly.com/hirepine
Telegram: qntly.com/tel