3c9f9aae20
* Fix bug, add unit tests and nit changes The bug was raised because if two inputs points with repeated close values were inserted, and the second one had 0 volume, when the first one is removed from _oldDataPoints, as the reamaining value of it in _volumePerPrice is zero, that entry is removed from _volumePerPrice. Therefore, when the second input point is removed from _oldDataPoints, this entry is not found in _volumePerPrice. Then the changes made were: - Modify MarketProfile.Add() method to check every removed data point is still in _volumePerPrice - Add unit tests to covert this change - Nit changes in VolumeProfileTests.cs * Fix bugs and add more unit tests - The Fill Forward bars shouldn't be considered in the calculations as it's not real data. - If bar inserted is not FF but has zero volume, it could remove a price value from VolumePerPrice and leave this sorted list empty, then each time we access that list we need to first check it's not empty * Enhance ComputeNextValue() and add more unit tests