dscotese / kraken-grid

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

Broken UserRef strategy. #12

Closed dscotese closed 2 years ago

dscotese commented 2 years ago

If the price moves up enough past the highest sell, the bot will create ten more sells at higher prices with userrefs that are each one million lower than the previous one. The userref of the tenth sell will be the SAME userrref as the FIRST buy that gets added when the price drops below the lowest buy, causing a userref collision.

The fix for this that I'm planning is to create the 10-digit userref (INT32) from the trade information so that is it forced to be unique. I propose that the ten digits of the userref will be determined thus: Digit 1: 1 for buy, 2 for sell (A sell with a userref that starts with 1 resulted from the execution of a buy command) Digits 2&3: Position in the list of pairs at the beginning or report() Digits 4-10: Leading zeroes and all (up to 7) digits of the price.

dscotese commented 2 years ago

I am working on this.