askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.06k stars 3.95k forks source link

TypeError: Cannot read property 'c' of undefined / TypeError: Cannot call method 'toFixed' of undefined #238

Closed cryptocxeq closed 8 years ago

cryptocxeq commented 10 years ago

what should I put my candleSize and historySize at for DEMA if I want to emulate the 2hr EMAs, but don't want to wait forever to get data (esp. since I'm crashing all the time...)

I keep getting this error on btce

TypeError: Cannot read property 'c' of undefined at Base.tick (C:\Users\Zack\Desktop\gekko-candle-rewrite\core\baseTradingMethod.js:74:21) at bound as tick at Actor.processCandle (C:\Users\Zack\Desktop\gekko-candle-rewrite\plugins\tradingAdvisor.js:39:15) at bound (C:\Users\Zack\Desktop\gekko-candle-rewrite\node_modules\lodash\dist\lodash.js:729:21) at EventEmitter.emit (events.js:95:17) at bound as emit at Manager.relayCandle (C:\Users\Zack\Desktop\gekko-candle-rewrite\core\marketManager.js:60:8) at bound (C:\Users\Zack\Desktop\gekko-candle-rewrite\node_modules\lodash\dist\lodash.js:729:21) at EventEmitter.emit (events.js:117:20) at bound as emit

and this one on bitstamp

C:\Users\Zack\Desktop\gekko-candle-rewrite\methods\DEMA.js:44 var message = '@ ' + price.toFixed(8) + ' (' + diff.toFixed(5) + ')'; ^ TypeError: Cannot call method 'toFixed' of undefined at method.check (C:\Users\Zack\Desktop\gekko-candle-rewrite\methods\DEMA.js:44:30) at bound (C:\Users\Zack\Desktop\gekko-candle-rewrite\node_modules\lodash\dist\lodash.js:729:21) at Base.tick (C:\Users\Zack\Desktop\gekko-candle-rewrite\core\baseTradingMethod.js:86:10) at bound as tick at Actor.processCandle (C:\Users\Zack\Desktop\gekko-candle-rewrite\plugins\tradingAdvisor.js:39:15) at bound (C:\Users\Zack\Desktop\gekko-candle-rewrite\node_modules\lodash\dist\lodash.js:729:21) at EventEmitter.emit (events.js:95:17) at bound as emit at Manager.relayCandle (C:\Users\Zack\Desktop\gekko-candle-rewrite\core\marketManager.js:60:8) at bound (C:\Users\Zack\Desktop\gekko-candle-rewrite\node_modules\lodash\dist\lodash.js:729:21)

my settings are basically unchanged:

enabled: true, exchange: 'BTCe', // 'MtGox', 'BTCe', 'Bitstamp', 'cexio' or 'kraken' currency: 'USD', asset: 'BTC' method: 'DEMA', candleSize: 60, historySize: 50

Mailer on.

cryptocxeq commented 10 years ago

evidently this project is no longer maintained

askmike commented 9 years ago

Thanks for reporting, I am pretty sure this will be fixed by the new version.

askmike commented 8 years ago

new version is out!