Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

BTC-e stuck on 'Calculating EMA on historical data...' #51

Closed
kiliankoe opened this issue Nov 28, 2013 · 8 comments
Closed

BTC-e stuck on 'Calculating EMA on historical data...' #51

kiliankoe opened this issue Nov 28, 2013 · 8 comments

Comments

@kiliankoe
Copy link

When setting Gekko to pull data from BTCe nothing is actually being pulled from anywhere and Gekko seems to be stuck on Calculating EMA on historical data...

When enabling debug mode:

2013-11-28 12:50:29 (DEBUG):    fetching historical data at bitcoincharts
2013-11-28 12:50:29 (DEBUG):    bitcoincharts returned an error, retrying..

(And just as a side note: Would BTC/LTC trading on BTC-e be a possibility with Gekko?)

@askmike
Copy link
Owner

askmike commented Nov 28, 2013

Is it looping the bitcoincharts returned an error, retrying.. all the time and are you able to connect to bitcoincharts.com (on the machine you are running Gekko from)?

@kiliankoe
Copy link
Author

I am able to connect to bitcoincharts.com from my machine and it is looping the error.

@ptigas
Copy link

ptigas commented Nov 30, 2013

just add this to your /etc/hosts
176.9.79.196 api.bitcoincharts.com

@askmike
Copy link
Owner

askmike commented Nov 30, 2013

It appears the DNS for api.bitcoincharts.com is not working everyone, you can test it by clicking the link (if it shows 404 Not Found or similar it means that you are able to connect to the server, while This webpage is not available means that you can't) or by running this in a terminal

nslookup api.bitcoincharts.com

If this doesn't return an IP please use the solution by ptigas.

@STRML
Copy link

STRML commented Dec 1, 2013

I'm seeing a similar issue, but it only seems to be when calculating the most recent candle. Perhaps it's possible that request is malformed. I'm looking into it. From my logs:

# .... calculating candles 98 -> 3....
2013-12-02 07:23:17 (DEBUG):    calculated candle: 2
2013-12-02 07:23:17 (DEBUG):    calced EMA properties for new candle:
2013-12-02 07:23:17 (DEBUG):         short ema 863.980
2013-12-02 07:23:17 (DEBUG):         long ema 919.874
2013-12-02 07:23:17 (DEBUG):         diff ema -6.267
2013-12-02 07:23:17 (DEBUG):    need new trades, refetching bitcoincharts
2013-12-02 07:23:22 (DEBUG):    calculated candle: 1
2013-12-02 07:23:22 (DEBUG):    calced EMA properties for new candle:
2013-12-02 07:23:22 (DEBUG):         short ema 862.138
2013-12-02 07:23:22 (DEBUG):         long ema 913.872
2013-12-02 07:23:22 (DEBUG):         diff ema -5.826
2013-12-02 07:23:22 (DEBUG):    fetching new trades for new bucket at bitcoincharts
2013-12-02 07:23:29 (DEBUG):    did not receive trades for most recent candle, retrying..
2013-12-02 07:23:39 (DEBUG):    fetching new trades for new bucket at bitcoincharts
2013-12-02 07:23:45 (DEBUG):    did not receive trades for most recent candle, retrying..
2013-12-02 07:23:55 (DEBUG):    fetching new trades for new bucket at bitcoincharts
2013-12-02 07:24:02 (DEBUG):    did not receive trades for most recent candle, retrying..
2013-12-02 07:24:12 (DEBUG):    fetching new trades for new bucket at bitcoincharts
2013-12-02 07:24:46 (DEBUG):    bitcoincharts returned an error, retrying..
2013-12-02 07:25:28 (DEBUG):    bitcoincharts returned an error, retrying..
2013-12-02 07:26:11 (DEBUG):    bitcoincharts returned an error, retrying..
2013-12-02 07:26:55 (DEBUG):    bitcoincharts returned an error, retrying..
2013-12-02 07:27:40 (DEBUG):    bitcoincharts returned an error, retrying..
2013-12-02 07:28:24 (DEBUG):    bitcoincharts returned an error, retrying..

The retries just continue on and on in the same pattern.

@kiliankoe
Copy link
Author

I didn't have an issue with the DNS for bitcoincharts, those always seemed to work fine. BTCe also seems to be working now, although I can't confirm at the moment as all it's generating right now are debug messages, no trade recommendations.

The error STRML (lol at your commit history btw :D) is describing is what I'm seeing when switching to Bitstamp. After a few of those however it throws an error:

TypeError: Cannot call method 'toFixed' of undefined
    at TradingMethod.advice (/home/kiliank/git/gekko/methods/exponential-moving-averages.js:143:42)
    at bound [as advice] (/home/kiliank/git/gekko/node_modules/lodash/dist/lodash.js:725:21)
    at TradingMethod.calculateEMAs (/home/kiliank/git/gekko/methods/exponential-moving-averages.js:98:10)
    at bound [as calculateEMAs] (/home/kiliank/git/gekko/node_modules/lodash/dist/lodash.js:725:21)
    at EventEmitter.emit (events.js:92:17)
    at bound [as emit] (/home/kiliank/git/gekko/node_modules/lodash/dist/lodash.js:725:21)
    at CandleCalculator.calculateCandle (/home/kiliank/git/gekko/methods/realtime-candle-fetcher.js:177:8)
    at bound [as calculateCandle] (/home/kiliank/git/gekko/node_modules/lodash/dist/lodash.js:725:21)
    at CandleCalculator.fillNewBucket (/home/kiliank/git/gekko/methods/realtime-candle-fetcher.js:163:8)
    at bound (/home/kiliank/git/gekko/node_modules/lodash/dist/lodash.js:725:21)

I probably should be opening a new issue for this...

@STRML
Copy link

STRML commented Dec 2, 2013

Hey, I'm sorry - it looks like the issue goes away after merging in the last few commits from master. I think this is safe to close - is anyone else still having this issue?

@askmike
Copy link
Owner

askmike commented Dec 2, 2013

I'll close it for now, if anyone runs into this issue again I'll reopen this.

@askmike askmike closed this as completed Dec 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants