Giter Club home page Giter Club logo

Comments (5)

joypeterson avatar joypeterson commented on May 25, 2024

I ran into this problem yesterday and I was running with debugging output enabled. That output gives a clue about why this is happening:

2013-06-23 15:01:48 (DEBUG): fetching new trades for new bucket at Mt. Gox
2013-06-23 15:02:04 (DEBUG): Mt. Gox returned an error, retrying..
2013-06-23 15:02:29 (DEBUG): Mt. Gox returned an error, retrying..
2013-06-23 15:02:54 (DEBUG): Mt. Gox returned an error, retrying..
2013-06-23 15:03:06 (DEBUG): calculated candle: 0
2013-06-23 15:03:06 (DEBUG): calced EMA properties for new candle:
2013-06-23 15:03:06 (DEBUG): short ema NaN
2013-06-23 15:03:06 (DEBUG): long ema NaN
2013-06-23 15:03:06 (DEBUG): diff ema NaN

TypeError: Cannot call method 'toFixed' of undefined
at TradingMethod.advice (/home/joy/mining/gekko.test/methods/exponential-moving-averages.js:112:42)
at TradingMethod.calculateEMAs (/home/joy/mining/gekko.test/methods/exponential-moving-averages.js:77:10)
at EventEmitter.emit (events.js:92:17)
at CandleCalculator.calculateCandle (/home/joy/mining/gekko.test/methods/candle-method.js:152:8)
at CandleCalculator.fillNewBucket (/home/joy/mining/gekko.test/methods/candle-method.js:138:8)
at null. (/home/joy/mining/gekko.test/exchanges/mtgox.js:56:7)
at Request._callback (/home/joy/mining/gekko.test/node_modules/mtgox-apiv2/mtgox.js:48:11)
at Request.self.callback (/home/joy/mining/gekko.test/node_modules/mtgox-apiv2/node_modules/request/index.js:148:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (/home/joy/mining/gekko.test/node_modules/mtgox-apiv2/node_modules/request/index.js:876:14)

from gekko.

trevlovett avatar trevlovett commented on May 25, 2024

I got this also, when I set interval=1 in config.js

from gekko.

askmike avatar askmike commented on May 25, 2024

I was debugging this yesterday and it appears that in some scenarios bitcoincharts (the API that provides trade data to Gekko) does not return the trades in the date range I request them, this in turn results in candles and EMA's being undefined (or NaN).

I will debug this some more to see how I can fix this.

from gekko.

askmike avatar askmike commented on May 25, 2024

Should be fixed now!

from gekko.

cursorsequence avatar cursorsequence commented on May 25, 2024

I am still having this same issue :( I get the error when setting the interval to 1 to 5 however setting the interval to 6 works.

from gekko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.