Introducing Bot18, The New šŸ”„ Crypto Trading Bot To Supersede Zenbot And Unleash The Zalgo (Updated)

Carlos Rodriguez
6 min readMay 14, 2018

Update May 19: Bot18 now has a website and weā€™re taking Beta testers! Sign up here: https://bot18.net/

Thanks for being patient, Zenbot users! Finally, I got some news for ā€˜yal. This is gonna be dope, Iā€™m very excited!

Iā€™ve created a brand new trading bot, code-named ā€œBot18.ā€

Itā€™s in alpha state (not public yet) but since itā€™s going so swimmingly, I wanted to drop some info on what I have so far. This may all change in the near future ā€” I make no guarantees.

A short history of Zenbot

Zenbot started out forever ago, as a little hobbyist challenge among my hundreds of open-source projects. Then last year, I released the version 4 overhaul which saw it become a full-featured, intricate app competing directly with the likes of Gekko.

Zenbot 4 was a smash hit, a major success story for open-source (thanks to the tireless work of @DeviaVir!), and gained a level of community support I never dreamed of or achieved with any of my other projects. I am extremely thankful for the contributions of too many talented people to name, and the 4,800 folks who starred Zenbot on Github. People found my work useful, which is the highest complement a hacker and scientist can receive. In that way alone, my mission was accomplished.

Walk with the master, see through the master, BECOME the MASTER.

Then shortly after version 4 dropped, I dropped my website engineer job to become a full-time crypto trader. I started out with limited experience, a $500 investment and an improvised approach, but I gradually developed an extremely profitable trading method. So much so, thatā€¦

ā€œMy account balance ballooned exponentially. I literally turned that $500 into $150,000 in 8 months. Coinbase told the IRS I grossed $62 million in trades, and they were correct! My tax bill ended up being higher than the average American income. ZEN MASTER ACHIEVED!ā€

Now about those candlesā€¦

The bad thing was, I couldnā€™t teach Zenbot my method, due to limitations of its slow, candle-based design, and my inability to find an algorithm to sum up what I intuitively used to trade. The default trend_ema strategy for Zenbot 4 was hacked together quickly before I really knew what I was doing, and the sar strat was marginally better but I never came up with a real winner. Usually by the time a candle rolled around, and a signal could be generated, the market had moved on and trade opportunity missed. This is the classic problem with technical analysis ā€” always being late to the party. Trading with ā€œsloppy secondsā€ doesnā€™t usually end well.

Although I made decent early profits, no matter how many simulations and tweaks I ran, I often had major losses, and Zenbot never performed well enough for me to run it without worrying about losses. Thatā€™s just my experience though, other people may well have had great experiences. Zenbot is pretty good, but its algorithmic approach ended up being clunky and not that attractive to me.

So, I stopped using Zenbot for algorithmic trade signals after a couple months. Afterward I used it only to track my coinā€™s change %, balance, and profit (using manual mode). Mostly I calculated everything in my head, and executed orders directly through the exchangeā€™s website. Thatā€™s why I havenā€™t updated Zenbot in so, so long, since it was feature-complete as a tracking tool at the start, and the only thing I needed was manual mode.

This is THE NEW SHIT

The limitations I ran into with Zenbot, combined with my actual success with manual trading, have given birth to a new bot concept. Code name Bot18, aka. ZalgoBot, aka, The New Shit. The approach will be quite different, so much so that Iā€™ll leave Zenbot 4 as it stands (for those who enjoy the TA-based, candle-y approach) and create a brand new bot category. I no longer intend on developing Zenbot, and I will be working on Bot18 intensely, since it is quickly becoming what I aimed to do with Zenbot and failed to pull off. Like, such asā€¦

Core design and features

  • Redesigned from scratch, multi-pair is fully supported, so bot instances wonā€™t interfere with one another and all profit/balance calculations are totally separate from total account balance.
  • Superior order execution and balance/profit tracking tool, at its core (which creative strategies can be built on top of), far quicker and more efficient than Zenbotā€™s. Automatic, instant profit stops on buy, and can manage multiple buy and sell orders at once.
  • Streaming APIs and event-based triggers whenever possible. Minimizes latency of exchange -> evaluation -> execution -> exchange roundtrip loop. Zenbot 4 was built stubbornly on REST (for exchange cross-compatibility), and I painfully had to endure the inevitable consequences! No more!
  • No built-in candles or periods concept. Core does not revolve around TA and doesnā€™t need to build candles from raw trades (but strategies can be built that build candles and use TA).
  • No longer based on buy-all sell-all pattern. Now capable of buy-one sell-two, market-making, arbitrage, out-of-band signals and hooks, and all other exotic strategies.
  • Execution loop (not candle size) is 500ms, 240 times quicker than Zenbotā€™s. Reacts near-instantly to user input and trade signals.
  • No historical trades ā€” Launches, evaluates and executes within a few seconds. Zero baggage.
  • Realtime orderbook mirror and stats pipeline. Enables strategies and execution that depend on exact orderbook state (and yes, the main strategy Iā€™ve implemented so far is based on orderbook!).
  • Mongo is optional, so the persistence (profit totals, telemetry for later analysis) can be skipped if desired.
  • Super accurate, realtime balance and profit calculations (down to 16 decimal places). No more fudging on the order sizes.
  • Profit calc based on FIFO inventory list, not global account balance. No more fucked up profit numbers if your account balance changes externally or you run multiple pairs on the same exchange.
  • Long/short position tracking. Profit/loss subtotal that shows you exactly how much you lost/gained when you short (regardless of how much currency is in the account).
  • Multiple ā€œsourceā€ exchanges/pairs that aggregate into the eval engine. (i.e., buy ETH on GDAX when BTC rises on Bitfinex)
  • Efficient CPU usage ā€” an instance streaming data to Mongo and watching 2 different exchanges uses around 30% of a core.
  • Push notifications (Iā€™m subscribed to Pushover with my iPhone/iWatch/Desktop, I highly recommend it!)
  • Resilient error handling ā€” Reboots engine to a clean state on each error (i.e. the inevitable socket disconnects).
  • Keeps records of EVERYTHING in Mongo (orders placed and cancelled, fills, notifications, heartbeats, order book snapshots and stats), even stuff that isnā€™t used by the engine, in case you want to replay and analyze (or train your neural network) on it later.
  • Planned support for on-the-fly genetic mutation strategies! (forex.analytics on steroids)
  • Planned support for all exchanges Zenbot supports, and possibly more (exchange support for Bot18 will be an open-source effort, so you can contribute to it if your exchange isnā€™t supported).

As you can see, Iā€™ve been busy! Iā€™m so excited to explore the huge potential of this engine. Especially since itā€™s already made quite a few successful trades on signals generated solely from the orderbook with no TA (static positional analysis, like a chess engine).

I will be developing solely on Bot18 going forward, and have developed a Dual-Licensing Model that will allow me to make income and work on the low-level Bot18 engine full-time, while also open-sourcing the higher-level parts of the system and encouraging collaborations on strategies and exchange support.

Zenbot can live on, but I wonā€™t be updating it anymore. (Itā€™s in the good hands of @DeviaVir who is the best maintainer I could ask for! šŸ‘)

Sign up for the Beta today at Bot18.net. I will be hanging out in the Zenbot Discord #bot18 channel if anyone wants to chat while I work on it. Thanks everybody!

And The Zalgo, He Shall Comeā€¦

Personally I welcome all our future robot overlords. Itā€™s the inevitable, isnā€™t it? So why not embrace it? The Zalgo He Will Come.

ā€œWe are at the Second Coming of Gozer. Beware! AVAST! The Zalgo He Shall RISE! And Will Sing the Song that Will End You! Er, something. HAHA!

--

--