CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 303 forks source link

Using 24h high to decide whether to buy in on a new announcement (pump detection) #59

Open fievelbud opened 2 years ago

fievelbud commented 2 years ago

Pull the 24 high, then add a config option to choose how much higher the 24h high has to be above than the current price in % to not buy the coin.

i.e. you run the bot and it detects and announcement for xyz that has already "peaked", let's say at 100 and you have a 24h % set at 5% then if the current price of the coin is 95, the bot won't buy it.

Since this is a customizable number, you get to choose what you believe a big enough price difference is to skip buying. The 24h high pull runs before the current price pull so the price is less likely to be below the 24h price due to a delay in data pull.

I've added the changes and it appears to work. I tested it by adding a coin to new_listings.json to trick the bot into wanting to order it. Tested using RGT as an example, which has spiked already to 62.76 and landed on ~47 atm which is about a 35% difference. When the 24H setting in config was 30%, it did not buy the coin.also merged with Kekkokk's fork.

You can find Kekkokk's fork here: https://github.com/kekkokk/gateio-crypto-trading-bot-binance-announcements-new-coins/commit/62e9799fb6cee170dde4e825422614144b3c34e0

cryptmjt commented 2 years ago

Since you merged with kekkokk's version, this is not only a PR to address the 24h high, but also the ioc flag and the issue around not including fees correctly. That's a lot to merge at once - how thoroughly have the other changes been tested?

fievelbud commented 2 years ago

There are issues with the 24h high, it seems to update the 24h high faster than the last price... PR on pause/draft till I can collect more data and resolve.