Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
Thom
on 06/02/2014, 20:32:28 UTC
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

Wow, don't take what I'm saying as anything other than sage advice, but it would probably behoove you and others' opinion of your advice to not describe it quite like that.

Also, major financial institutions leverage extreme bandwidth and near-zero-latency fibre connections in close physical proximity to the exchange to run their bots, essentially making it into a race, precog or otherwise. We in the big wide ping-wobbly interweb can't have that, so Gekko being a reactive trading bot makes it a nice safe bet to leave running on your account in case of massive market moves while you're sleeping, etc. Granted some extreme market oscillation and bad config can result in a loss as easily as it can a gain, but compared to that, a predictive bot requires much more care, tuning and observation, as it's entirely possible for seasoned traders to use the orderbooks at little or no cost to trick predictive spreadwatching bots into orders they shouldn't oughta be doing.

Having said all that, if gekko does ever evolve to watch the spread as well as / instead of the candles, I'd like a plain ol' reactive version like it is right now.

Why? Because it's a robust and often-profitable alternative to hoping like hell BTC/GHS/whatever won't crash in the night, or fraying one's nerves by day trading constantly.
It has required a fair bit of config tweaks to accommodate the market moves of each week, but I'm mostly chalking that up to my inexperience in day trading and that I'm doing so on cex.io, the weirdest mutant of the exchanges.

Nonetheless, pictures can speak more than words. Here's the GHS holdings in my gekko-equipped cex.io account. Most of this is gekko trading, but sometimes i jump in and intervene when the candles get exciting.
Consider only the peaks and the red curve I applied - each blip is an hour's average, so any full hour not holding GHS registers low.

(edit: i pasted multiple cex graphs together to make them more readable and forum-sized plus skip the flat boring bit)


YEAH GEKKO.

@whydifficult - I often ctrl-c gekko so I can manually trade without it disagreeing wildly in my face, but when the graph goes flat again and I fire Gekko up so I can stop trading, it has to recalc candles. IMO what it needs most is a hotkey to toggle the trader (during which it would keep running, advising, simulating, candle gathering, etc). Right now it's a lumpen cancel-changeconfig-restart scenario that resets sim trading values etc.

Only a few things stop the show so far - nonce increment fail, which t recovers from but only when the next trading advice is issued:
Code:
2014-02-09 08:57:05 (INFO): attempting to BUY GHS at cex.io
2014-02-09 08:57:06 (ERROR): unable to buy: Nonce must be incremented
2014-02-09 10:57:14 (INFO): Trader Received advice to go short Selling  GHS

and this not-too-esoteric error:
Code:
2014-02-06 17:06:13 (ERROR): unable to buy: { [Error: socket hang up] code: 'ECONNRESET' }
2014-02-06 17:06:29 (ERROR): unable to buy: { [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }

Happy to report that it can deal with all manner of esoteric balances though:
Code:
2014-02-06 19:16:12 (INFO): wanted to buy GHS but the amount is to small (-0.0004199288335019076) at cex.io