Open dscotese opened 2 years ago
Line 227 sets the volume of the original trade and lines 342 and 362 use it. As the lowest buy or the highest sell is being depleted, it will create another trade of the opposite type because of the conditional close, and that new trade will be the lowest sell or the highest buy, which is the one whose volume gets used on line 227. bSides (the record used to find the highest sell and lowest buy for a pair) could be used to record the highest volume of each side, but that would cause the grid to always be extended with the highest volume, and that's not always what we want. I'm leaving this alone and open for now.
I`m guessing this happens because the previous trade is only partially executed and the code uses only one part of the actual volume.