paint-brush
Market Making Bot After a Few Days: In Reviewby@jare
1,399 reads
1,399 reads

Market Making Bot After a Few Days: In Review

by Jarett DunnApril 3rd, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Seeing consistent profits is an incredibly good feeling :)

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Market Making Bot After a Few Days: In Review
Jarett Dunn HackerNoon profile picture

Seeing consistent profits is an incredibly good feeling :)

http://techvoices.club/

Don’t believe the dev bot? How about a community member?

Market Maker Bot

<a href="https://medium.com/media/a5985bf73af9c5b7e02f4b845c5d1e5c/href">https://medium.com/media/a5985bf73af9c5b7e02f4b845c5d1e5c/href</a>

We’ve taken some community feedback and incorporated it into the bot.

  1. Bollinger Band indicator, minutely, over 9 minutes, don’t buy if ask is above upper band!
  2. RSI indicator, minutely, over 14 minutes, don’t buy if over 70 or sell if under 30!

These were really fun to incorporate. I created an array of arrays and object of objects that sorts 6 secondly updates into 10 intervals for minutely data, and it warms up when the bot is run.

3. Creating a minimum i-1 hourly candle volume vs. implied hourly volatility from 24-hour volume.

This was a good idea as there were tons of pairs that would pump and dump, spike the 24 hour volume and not have significant volume going forward.

4. Start work on creating a shippable product, via AWS or GCP, feeding images start scripts with export= vars and pulling the code from the private GitLab master branch. Coming soon to a website near you!

5. On that note, we moved the code from public free and open source to a private repo run on my computer via duckdns, and require a donation of 0.1 btc or equivalent to access the code.

Next level sh#t that was achieved involved allowing the bot (optionally, according to a boolean var) to buy all the way down the order book, selling at the takeProfit % more than buy price and as the price moves up and down the books we scrape over and over again. Hoorah!

The bot in review:

I made a bot for my bot! Telegram powers to the rescue!

HitBTC volumes were super low, although the lack of min_notional 1 BNB 0.01 ETH or 0.001 BTC as on Binance helped develop the bot into the beast it is today…

… most notably is the inclusion and tweaking of the ‘neversellataloss’ boolean and following logic:

a. when entering a buy order, note (if current returns are negative) a function of negative returns and buy price, to restore losses and (if current returns are positive) a function of the buy price * 1.002 to cover fees

b. never enter a sell order for less than the above amount — never re-buy these pairs that are above the amount

c. every x number (config var) minutes, reduce the minimum sell price by a fraction of 0.9999

d. if the pair hits a y number (config var) % losses, execute a market sell order as stop loss

The above logic is doing wonders, and after fixing a memory leak due to re-initializing the depths more than necessary, the bot is fully-functional and absolutely killing it.

Conclusion

If you want to scalp the spreads of coins that are behaving to recoup losses of those pairs that fall below your neversellataloss value, bring up your volumes on exchanges and — yes, dare I say it — profit, join our ranks :)

https://t.me/themarketmakerbot