dscotese / kraken-grid

A bot that extends grid trading once you use it to create a grid.
GNU General Public License v3.0
10 stars 3 forks source link

Extending the grid sometimes uses too low an amount. #22

Open dscotese opened 2 years ago

dscotese commented 2 years ago

I`m guessing this happens because the previous trade is only partially executed and the code uses only one part of the actual volume.

dscotese commented 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.