Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
Nova!
on 29/01/2014, 16:31:50 UTC
Ok, this is my last post on the subject and then I'll leave you alone.

First off, great job!  This is a nice bot, it appears to be well written and I can see that you've put a lot of effort into it and you continue to to do so.

Now for the bad news.  DON'T USE TICKER DATA!!!

More specifically, don't use ticker data at places like CEX.io where there is no actual ticker stream.  And certainly don't make the assumption that the ticker represents the current market price.  You aren't actually seeing real ticks.  You are seeing "last" trades but only trades that have already executed.
You are going to be missing data and more importantly, you are going to be missing market intent. 

This is because unlike MtGox, you don't get a live stream.  You get a rate limited list of last trades based on a combination of your HTTP polling delay and how delayed CEX.io is in updating it's stream. 

This is going to screw your bot up bad.

What you need to do instead is look at the complete order book and perform a differential analysis on that about once every 30 seconds to a minute.  Then supplement it with ticker data.  (Again this only applies to sites that do not provide an actual streaming ticker).

In otherwords, you don't want to see the past, you want to look at the present and attempt to divine the current intent of the other players (and thus their future actions), based on current market conditions.  Historical is good for replaying strategies in a simulator, but trying to trade forward using the past (especially the recent past), is a really, really bad idea.

It's much more complex to do a differential analysis on the orderbook state, but the end result is a bot that is proactive rather than reactive.

Please don't take what I said as anything other than sage advice.  My previous position partly involved writing these things for a major financial institution, so I sort of have a clue Smiley