Post
Topic
Board Трейдеры
Re: Роботы для торговли Биткоин на биржах ICBIT.se, BTC-E, mtgo
by
genydeny
on 01/08/2013, 13:55:24 UTC
А вот захотел запустить для BTC-E биржи и получил такой результат:
Code:
2013-08-01 16:15:03 (INFO): I'm gonna make you rich, Bud Fox.
2013-08-01 16:15:03 (INFO): Let me show you some Exponential Moving Averages.


2013-08-01 16:15:03 (INFO): Using normal settings to monitor the live market
2013-08-01 16:15:04 (INFO): NOT trading with real money
2013-08-01 16:15:04 (INFO): Profit reporter active on simulated balance
2013-08-01 16:15:04 (INFO): Calculating EMA on historical data...
2013-08-01 16:15:04 (DEBUG): fetching historical data at bitcoincharts

Failed to load historical trades from bitcoincharts

Историю прошлых цен не может получить, странно почему, придется смотреть код. Даже в режиме разработки не оч. информативный вывод.
на 95 строке historical-candle-fetcher.js
Code:
  // if we haven't got a single useful trade bail out
  if(!latestTradeDate)
    throw 'Failed to load historical trades from ' + this.watcher.name;

Посмотрел в ветке форума автора бота, и вот оно решение (просто изменить настройки запуска):
I have finally found the bug regarding BTC-e monitoring. Gekko broke over BTC-e monitoring because bitcoinCharts (the API Gekko uses to get trade data from BTC-e) changed the way services can ask for trade data (silently).

Current workaround for BTC-e users:
  • Set debug in the config to true (line 145)
  • Set the candles to something lower than 40 (line 22)
  • Run Gekko
  • Check whether the calulcated EMAs are NaN, if they are lower the 40 number

The reason the 40 number can be different is that now bitcoinCharts will return the last 2000 trades, and how long ago the oldest one happened depends on the market.

и как результат - работающий бот
Code:
2013-08-01 16:53:33 (DEBUG): calced EMA properties for new candle:
2013-08-01 16:53:33 (DEBUG): short ema 96.179
2013-08-01 16:53:33 (DEBUG): long ema 96.366
2013-08-01 16:53:33 (DEBUG): diff ema -0.194
2013-08-01 16:53:33 (DEBUG): we are currently not in an up or down trend @ 95.980 (-0.194)