Search content
Sort by

Showing 7 of 7 results by avert
Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
avert
on 11/09/2013, 08:02:34 UTC
Something odd happened today: I had Gekko running in the background for like a day or so (trading in MtGox), but suddenly I got a signal to sell, even though the chart on bitcoincharts didn't give any indication to do so. When I closed and reopened it, I got things like this:

Code:
2013-09-11 00:18:56 (INFO):     ADVICE is to HOLD @ 129.043 (NaN)

Ran it again with config.debug set:

...


gox was down for a bit, so it seems to be its trying to calculate EMA's on times where there is just no data. So number * NaN = NaN right... ( just like 234234*0=0). This will happen until the candle gets pushed out of the array i guess.

I think i have a fix which sorts this out, but saying this, i dont know gekko in its entirety at all. And these could have some adverse effects.

in methods/realtime-candle-fetcher.js
line 171: calculateCandle function
Code:
CandleCalculator.prototype.calculateCandle = function() {
  var bucket = this.buckets[this.currentBucket];
  // because buckets (and their contents) are chronologically reversed
  // the _last_ item is the open and the _first_ is the close

if(typeof _.last(bucket) == 'undefined')
        return false;
  if(typeof _.max(bucket) == 'undefined')
        return false;
  if(typeof _.min(bucket) == 'undefined')
       return false;
  if(typeof _.first(bucket) == 'undefined')
        return false;

  this.candles.open.push(_.last(bucket));
  this.candles.high.push(_.max(bucket));
  this.candles.low.push(_.min(bucket));
  this.candles.close.push(_.first(bucket));

  log.debug('calculated candle:', this.currentBucket);

  this.emit('calculated candle');

  if(this.currentBucket === 0)
    this.emit('calculated new candle');
}


I added the sexy if statements to skip over underfined values.
but as i said, these could have some bad effects. I've only been using gekko for about 4 days and am no way in a position to predict what this would do:P

Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
avert
on 11/09/2013, 07:35:17 UTC
Hi there,
trying to install, when i exeecute "nmp install" I get the following error:

http 404 https://github.com/titaniumlou/emailjs/tarball/patch-1


Thanks



in package.json

change where emailjs is retrieved from

Code:
"emailjs": "git://github.com/eleith/emailjs.git#master",
Post
Topic
Board Beginners & Help
Re: hello newbie here
by
avert
on 10/09/2013, 23:11:22 UTC
welcome
Post
Topic
Board Beginners & Help
Re: Hi
by
avert
on 10/09/2013, 22:16:12 UTC
welcome
Post
Topic
Board Beginners & Help
Re: Hello fellow Bitcoiners
by
avert
on 10/09/2013, 22:10:11 UTC
welcome hugo
Post
Topic
Board Beginners & Help
Re: Newbie
by
avert
on 10/09/2013, 22:04:00 UTC
Welcome!
Post
Topic
Board Beginners & Help
Re: Hello all
by
avert
on 10/09/2013, 21:54:30 UTC
hey, welcome!