Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
Thom
on 13/02/2014, 22:01:22 UTC

@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

- Woow that is a really smart idea. Really want those toggles in there. I've put them on the todo now.
- I'll rename the error to something more sain, it means that CEX.io API is not responding correctly. So to clarify: when the unable to buy happened Gekko did not retry to buy?
- Awesome!

I've built a completely differently-oriented standalone cexbot of my own in python this week, so I know cex's API returns pretty well now.

Toggles - Awesome! I added toggles to my bot by adding a quick "Trade, Simulate, Quit? >" prompt that happens on ctrl-c / keyboardinterrupt. Should be easy in node?
Error - yeah cexapi gets sleepy and times out sometimes. And gekko didn't retry the buy - it just left the order open and didn't do anything else until next advice time (by which time i'd cancelled the order manually). Happened twice now.
Awesome - awesome!

Leaping between your Gekko's DEMA for the candle action and my Librium's high-speed balancing and reporting for the flatlines and sleepytimes is working out nicely so far. With toggles on both and autorecovery from timeouts, they can run in harmony for evaaaaar <3