Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
lky_svn
on 30/07/2013, 08:05:02 UTC
Hi,

Using MtGox, I get NaN errors when using EUR...
USD seems to be working fine.

Enabled verbose to check what's going on. With USD I get:
Code:
2013-07-30 09:59:29 (DEBUG):    calced EMA properties for new candle:
2013-07-30 09:59:29 (DEBUG):             short ema 101.048
2013-07-30 09:59:29 (DEBUG):             long ema 101.037
2013-07-30 09:59:29 (DEBUG):             diff ema 0.010
2013-07-30 09:59:29 (DEBUG):    fetching new trades for new bucket at Mt. Gox
2013-07-30 09:59:31 (DEBUG):    calculated candle: 0
2013-07-30 09:59:31 (DEBUG):    calced EMA properties for new candle:
2013-07-30 09:59:31 (DEBUG):             short ema 101.038
2013-07-30 09:59:31 (DEBUG):             long ema 101.033
2013-07-30 09:59:31 (DEBUG):             diff ema 0.005
2013-07-30 09:59:31 (DEBUG):    we are currently not in an up or down trend @ 100.981 (0.005)

When changing to EUR, I get something like:
Code:
2013-07-30 10:04:03 (DEBUG):    calculated candle: 1
2013-07-30 10:04:03 (DEBUG):    calced EMA properties for new candle:
2013-07-30 10:04:03 (DEBUG):             short ema NaN
2013-07-30 10:04:03 (DEBUG):             long ema NaN
2013-07-30 10:04:03 (DEBUG):             diff ema NaN
2013-07-30 10:04:03 (DEBUG):    fetching new trades for new bucket at Mt. Gox
2013-07-30 10:04:04 (DEBUG):    calculated candle: 0
2013-07-30 10:04:04 (DEBUG):    calced EMA properties for new candle:
2013-07-30 10:04:04 (DEBUG):             short ema NaN
2013-07-30 10:04:04 (DEBUG):             long ema NaN
2013-07-30 10:04:04 (DEBUG):             diff ema NaN
2013-07-30 10:04:04 (DEBUG):    we are currently not in an up or down trend @ 75.500 (NaN)

This is the config I changed:
Code:
config.normal = {
  enabled: true,
  exchange: 'MtGox', // 'MtGox', 'BTCe' or 'Bitstamp'
  currency: 'EUR',
  asset: 'BTC',
  tradingEnabled: false,
Simply changed the currency in there - and then the error appears.


Anybody had this issue?