Pages:
Author

Topic: Gekko - a javascript trading bot and backtesting platform - page 13. (Read 147876 times)

newbie
Activity: 2
Merit: 0
Hi, everyone,

Two days ago (April 7), gekko started to return the following errors (after two weeks of flawless usage).
No OS packages were updated and no gekko configuration was changed.

Code:
root@ubuntu:~/gekko/bin# ./gekko_launch.sh BTCe-LTC

adding: log/gekko_log.BTCe-LTC.20140409144353.txt   (in=6681) (out=682) (deflated 90%) total bytes=9003419, compressed=776853 -> 91% savings
2014-04-09 14:43:53 (INFO):     Gekko v0.1.2 started
2014-04-09 14:43:53 (INFO):     I'm gonna make you rich, Bud Fox.


2014-04-09 14:43:53 (INFO):     Setting up Gekko in realtime mode

2014-04-09 14:43:53 (INFO):     Setting up:
2014-04-09 14:43:53 (INFO):              Trading Advisor
2014-04-09 14:43:53 (INFO):              Calculate trading advice
2014-04-09 14:43:53 (INFO):              Using trading method: DEMA

2014-04-09 14:43:53 (INFO):     Setting up:
2014-04-09 14:43:53 (INFO):              Mailer
2014-04-09 14:43:53 (INFO):              Mail module lets sends you email yourself everytime Gekko has new advice.
2014-04-09 14:43:53 (DEBUG):    Setup email adviser.

2014-04-09 14:43:56 (INFO):     Send advice via email.
2014-04-09 14:43:56 (INFO):     Setting up:
2014-04-09 14:43:56 (INFO):              Profit Simulator
2014-04-09 14:43:56 (INFO):              Paper trader that logs fake profits.

2014-04-09 14:43:56 (INFO):     Starting to watch the market: BTC-e LTC/USD
2014-04-09 14:43:56 (DEBUG):    ~market start
2014-04-09 14:43:56 (DEBUG):    checking history
2014-04-09 14:43:56 (DEBUG):    ~watch market
2014-04-09 14:43:56 (DEBUG):    Requested LTC/USD trade data from BTC-e ...
2014-04-09 14:43:56 (DEBUG):    BTC-E returned an error, retrying..
2014-04-09 14:44:06 (DEBUG):    BTC-E returned an error, retrying..
2014-04-09 14:44:16 (DEBUG):    BTC-E returned an error, retrying..
2014-04-09 14:44:26 (DEBUG):    BTC-E returned an error, retrying..
2014-04-09 14:44:36 (DEBUG):    BTC-E returned an error, retrying..



I have changed btc-e API key today just to see if the problem persists, but to no use, same error message.

Anyone with this problem, too?

Thank you.



Environment:
Code:
root@ubuntu:~/gekko/bin# node -v
v0.10.24

root@ubuntu:~/gekko/bin# npm -v
1.3.21

root@ubuntu:~/gekko/bin# uname -a
Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

root@ubuntu:~/gekko/bin# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:        12.04
Codename:       precise


gekko settings (comments deleted for brevity):

Code:
var config = {};

config.history = {
  directory: './history/'
}
config.debug = true;

config.watch = {
  enabled: true,
  exchange: 'BTCe',
  currency: 'USD',
  asset: 'LTC'
}

config.tradingAdvisor = {
  enabled: true,
  method: 'DEMA',
  candleSize: 30,
  historySize: 24
}

config.DEMA = {
  short: 10,
  long: 21,
  thresholds: {
    down: -0.025,
    up: 0.025
  }
};

config.MACD = {
  short: 10,
  long: 21,
  signal: 9,
  thresholds: {
    down: -0.025,
    up: 0.025,
    persistence: 1
  }
};

config.PPO = {
  short: 12,
  long: 26,
  signal: 9,
  thresholds: {
    down: -0.025,
    up: 0.025,
    persistence: 2
  }
};

config.RSI = {
  interval: 14,
  thresholds: {
    low: 30,
    high: 70,
    persistence: 1
  }
};

config.custom = {
  my_custom_setting: 10,
}

config.trader = {
  enabled: false,
  key: 'myKey',
  secret: 'mySecret',
  username: ''
}

config.adviceLogger = {
  enabled: true
}

config.profitSimulator = {
  enabled: true,
  reportInCurrency: true,
  simulationBalance: {
    asset: 10,
    currency: 0,
  },
  verbose: false,
  fee: 0.2,
  slippage: 0.08
}

config.mailer = {
  enabled: true,    
  sendMailOnStart: true,  
  email: '[email protected]',    
  password: 'myPass',
  tag: '[GEKKO] ',
  server: 'smtp.gmail.com',
  smtpauth: true,
  user: '[email protected]',
  from: '[email protected]',
  to: '[email protected]',
  ssl: false,
  port: '587',
  tls: true
}

config.ircbot = {
  enabled: false,
  emitUpdats: false,
  channel: '#your-channel',
  server: 'irc.freenode.net',
  botName: 'gekkobot'
}

config.campfire = {
  enabled: false,
  emitUpdates: false,
  nickname: 'Gordon',
  roomId: null,
  apiKey: '',
  account: ''
}
config.redisBeacon = {
  enabled: false,
  port: 6379,
  host: '127.0.0.1',
  channelPrefix: '',
  broadcast: [
    'small candle'
  ]
}

config.webserver = {
  enabled: false,
  ws: {
    host: 'localhost',
    port: 1338,
  },
  http: {
    host: 'localhost',
    port: 1339,
  }
}

config.backtest = {
  enabled: false
}

config['I understand that Gekko only automates MY OWN trading strategies'] = true;

module.exports = config;
hero member
Activity: 637
Merit: 500
Is it possible to run multiple instances of the bot at the same time ?
I would like to run the bot with different indicators for different exchanges at the same time from the same server.
sr. member
Activity: 252
Merit: 250
I noticed that  this.name = 'RSI'; is missing from RSI.js, which causes a warning.

Sorry I don't know how to submit simple patches yet.


newbie
Activity: 4
Merit: 0
Great project.

I want to know is any plan to integrate ta-lib?

Maybe it's a little difficult to using that on windows, at least for me..
sr. member
Activity: 462
Merit: 250
That sounds weird starvin marvin!

Can you please make an issue on GitHub, you'll reach askmike easier that way.
sr. member
Activity: 511
Merit: 250
Open and Transparent Science Powered By Blockchain
I got this kind of error. I'm using the newest version of gekko from github and newest node.js

TypeError: Object false has no method 'find'
    at Manager.getCandles (/home/xxx/gekko/core/candleManager.js:560:35)
    at bound [as getCandles] (/home/xxx/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at iterator (/home/xxx/gekko/core/candleManager.js:516:10)
    at bound (/home/xxx/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at /home/xxx/gekko/node_modules/async/lib/async.js:227:13
    at /home/xxx/gekko/node_modules/async/lib/async.js:111:13
    at Array.forEach (native)
    at _each (/home/xxx/gekko/node_modules/async/lib/async.js:32:24)
    at async.each (/home/xxx/gekko/node_modules/async/lib/async.js:110:9)
    at _asyncMap (/home/xxx/gekko/node_modules/async/lib/async.js:226:9)

Any help please?
full member
Activity: 161
Merit: 100
digging in the bits... now ant powered!
Hi,

Any way to disable debug info in the output?


Cheers
sr. member
Activity: 511
Merit: 250
Open and Transparent Science Powered By Blockchain
I've got a few noob questions. Just started playing with Linux a few days ago.

How do I close Gekko? Is there some /exit command? Does it stay running in the background if I only close the terminal window?

What happens if I shut down my computer now and then? Does it save data into history?

What happens if I trade manually while Gekko is running?
sr. member
Activity: 462
Merit: 250
Hi
Im interested in testing and making some adaptations to this bot.
It would be great to have the possibility of configuring an array of trading methods, each one with different weight, and execute the change in position if all signals are in the same direction or a signal level is reached.

But for some cases I need some historical data in CSV format to feed gekko and monitor the signals produced by this bot.

Where can I get historical data (let's say the last 2-weeks, grouped hourly, bitstamp BTCUSD), as displayed in bitcoinwisdom.com? Is this data accesible by any API?

Thanks!

PS: @Camille, If you're still interested in the volume filter drop me a PM and I'll sent you the modified code.

Historical data is a pain in the ass, especially on Bitstamp.

You can get some historical data here:
http://bitcoincharts.com/about/markets-api/

Or you could probably let gekko run for a while and use the 1min candlestick data it fetches?
newbie
Activity: 25
Merit: 0
Hi
Im interested in testing and making some adaptations to this bot.
It would be great to have the possibility of configuring an array of trading methods, each one with different weight, and execute the change in position if all signals are in the same direction or a signal level is reached.

But for some cases I need some historical data in CSV format to feed gekko and monitor the signals produced by this bot.

Where can I get historical data (let's say the last 2-weeks, grouped hourly, bitstamp BTCUSD), as displayed in bitcoinwisdom.com? Is this data accesible by any API?

Thanks!

PS: @Camille, If you're still interested in the volume filter drop me a PM and I'll sent you the modified code.
full member
Activity: 161
Merit: 100
digging in the bits... now ant powered!
Thanks!!

Will give it a bit more time and then enable the trading again.
newbie
Activity: 5
Merit: 0
full member
Activity: 161
Merit: 100
digging in the bits... now ant powered!
Thanks, tried that, no difference.

I have to use nodejs gekko to start it, could that be an issue?

member
Activity: 87
Merit: 10
Hi,

New to using Gekko and having some issues. I have it up and running but after leaving it for 2 days to "learn" the markets it crashes out and I then have the following error when trying to restart it:

/opt/gekko/node_modules/nedb/lib/datastore.js:60
    if (err) { throw err; }


If i delete the history db I can fire it up again, but then 2 days in and it crashes out and have to resort to the same fix to get it started.

Any thoughts, fixes?

Cheers

Try pulling the new version from github. I think yesterday was uploaded a new version that fixed datastore problems.
try this on your gekko directory:

Code:
git pull 
npm install
full member
Activity: 161
Merit: 100
digging in the bits... now ant powered!
Hi,

New to using Gekko and having some issues. I have it up and running but after leaving it for 2 days to "learn" the markets it crashes out and I then have the following error when trying to restart it:

/opt/gekko/node_modules/nedb/lib/datastore.js:60
    if (err) { throw err; }


If i delete the history db I can fire it up again, but then 2 days in and it crashes out and have to resort to the same fix to get it started.

Any thoughts, fixes?

Cheers
member
Activity: 112
Merit: 10
Be kind man, don't be mankind
Edit: I thought MACD wasn't working but turns out the default config values were just a bit massive (for cex). Far from 0.25 and its negative counterpart being useful in the up/down, I'm having more luck around 0.000001!

Using DEMA, it hangs sometimes still, like this instance when it failed to cancel an order and as such got a borked balance:

Code:
2014-03-03 22:01:09 (INFO):	attempting to SELL 28.84926429 GHS at cex.io
2014-03-03 22:01:40 (INFO): SELL order was not (fully) filled, cancelling and creating new order
2014-03-03 22:01:41 (INFO): wanted to buy BTC but the amount is to small (-28.33826429) at cex.io

Yup, after more testing it looks like Gekko forgets to check (or should doublecheck) if there are orders open before trying to count, then gets borky balances. I have sooooo maaaaany instances of this in one 12 hour run that I can't count them...

Code:
2014-03-04 01:23:11 (INFO):	wanted to buy GHS but the amount is to small (-4.7192984857186947e-7) at cex.io
2014-03-04 01:28:11 (INFO): wanted to buy GHS but the amount is to small (-4.6926303647910064e-7) at cex.io
2014-03-04 01:33:11 (INFO): wanted to buy GHS but the amount is to small (-4.699248120300752e-7) at cex.io

Code:
2014-03-04 08:43:14 (INFO):	wanted to buy GHS but the amount is to small (-4.85717241650642e-7) at cex.io
2014-03-04 08:48:11 (INFO): wanted to buy but insufficient BTC (-4.885200237029916e-7) at cex.io

and lots of it reporting "SELL was successfull" when it wasn't and there are orders still open.
Maybe this is what happens when DEMA changes its mind while orders are still open?
full member
Activity: 152
Merit: 100
Any backtesting results?
newbie
Activity: 26
Merit: 4
Okay Gekko is find in watching market/making advice with Kraken for me. Smiley

But when it comes to trade I've got this error :

Code:
TypeError: Cannot read property 'error' of null
    at set (/Users/*/gekko/exchanges/kraken.js:176:81)
    at KrakenClient.bound (/Users/*/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Request._callback (/Users/*/gekko/node_modules/kraken-api/kraken.js:144:15)
    at Request.self.callback (/Users/*/gekko/node_modules/kraken-api/node_modules/request/request.js:121:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request. (/Users/*/gekko/node_modules/kraken-api/node_modules/request/request.js:978:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage. (/Users/*/gekko/node_modules/kraken-api/node_modules/request/request.js:929:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16

Any idea how to fix that ?

I know kraken is not really supported now but I really like this market !

EDIT : I had some pending orders which may have blocked gekko. I've deleted them and it worked but I had this erro message just after. :s
hero member
Activity: 838
Merit: 534
Hey, thanks for your work.
I Use the version 0.1.1  so far everythink is workin good.
I Only got the following Error 2 times now.

Quote
TypeError: Cannot read property 'ticker' of undefined
    at set (/home/pi/gekko/exchanges/btce.js:108:31)
    at bound (/home/pi/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Request._callback (/home/pi/gekko/node_modules/btc-e/btc-e.js:62:16)
    at self.callback (/home/pi/gekko/node_modules/btc-e/node_modules/request/index.js:142:22)
    at Request.EventEmitter.emit (events.js:95:17)
    at ClientRequest.self.clientErrorHandler (/home/pi/gekko/node_modules/btc-e/node_modules/request/index.js:246:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at CleartextStream.socketErrorListener (http.js:1547:9)
    at CleartextStream.EventEmitter.emit (events.js:95:17)
    at Socket.onerror (tls.js:1437:17)
newbie
Activity: 26
Merit: 4
Hi,

Thank you so much for this work ! That's very great Smiley

I've been trying it this afternoon and I've got a few questions :

Does the paper trader plugin register some data somewhere ?

And do you think it might be possible to incorpore a "best EMA crossing parameters calculator" based on past transactions ? As in Easybot ( https://bitcointalksearch.org/topic/m.4395470 )?

And finally have you solved the problem with kraken ?

Thank you very much for your help !

Don't you have an LTC/Doge adress for tips ?

EDIT:

I'm running gekko on kraken by deleting the line :
"monitorError: 'https://github.com/askmike/gekko/issues/210',"
on exchanges.js

I'll let it run to see what might be the problem.
Pages:
Jump to: