Posts

Building a Trading Bot from Scratch - Part 2

avatar of @leoplaw
25
@leoplaw
·
·
0 views
·
2 min read

I've reached a major milestone in the development of my trading bot. It now reads the current price stream (ticker), stores it to the database, as well as backfills any missing history required for the trading strategy by requesting it from the server, and of course, also storing that to the database.

That means I now have a working price buffer to feed to the trading strategy.

The next step is implementing the strategies. I'm looking at how the Gekko trading bot, for ideas on how to do this, but already have structured things differently.

Gekko has restrictions on the number of strategies working simultaneously on one exchange, because of its architecture. I should have a solution to overcome this with my bot.

I will also be using Node.js threads instead of processes to run parallel tasks. From my research it should be more efficient and only limited by the number of processor threads.

It's a huge advantage to be able to look at the work of others and study the successes and short comings of their projects. Many of the issues and feature requests that Gekko had were slated to be dealt with, but the project creator moved on to new things. Various people have made modifications, but no one has sifted through them all and merged them into one working repository. This is pity, because there's been a great deal of work done.

This is part of the reason I decided to start programming my own trading bot. I did not want to take over the time consuming work of firstly understanding the internals of Gekko and then trying to merge many different modifications.

But, that said, I have recently done some tinkering with Gekko to extend its usefulness while I am still developing my own bot. More on that in the next post.

Posted Using LeoFinance Beta