Hi
Kindly, help with an indicator that draw horizontal lines on chart in rounded market price numbers with maximum hundredth value. (example, 1.23000)
If you need to keep only 2 decimal digits you’ll have to:
- multiply it by 100
- round it
- divide it by 100
a = close * 100
b = round(a - 0.5)
c = b / 100
whether CLOSE is 1.23380, or 1.23999, it will be rounded to 1.23000
There is this one in the library:
Sweet Spots – round numbers