eeb512fac6
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Fix bug and add unit tests The bug was raised because rounding the first point inserted in the RenkoConsolidator didn't get the closest y-multiple of the given number x, where y is the bar-size. In order to compute the first y-multiple of the given number x, we need to first compute x mod y := x - y*Floor(x/y), once we get this number we divide it by y to know if we should round x to minimum y-multiple greater than x, or should round x to the maximum y-multiple smaller than x. If (x mod y)/y < 0.5 we round down, otherwise we round up (the amount (x mod y)/y is always less than one and higher than 0). See the Art of Computer Programming, Vol I. Donald E. Knuth. - Add `GetClosestMultiple()` method in `RenkoConsolidator.cs` - Add more unit tests * Nit change * Add XML docs * Address required changes and add more unit tests