Skip to content

uncaughtException` { TypeError: ema.result.toFixed is not a function #16

@gbittoun

Description

@gbittoun

Hello, I have trouble executing backtest and livetest (thankfully leads to the same errors :) ):

uncaughtException` { TypeError: ema.result.toFixed is not a function
    at Base.method.log (/home/guite/Documents/gekko/strategies/EMA_OR_PRICE_DIV.js:40:38)
    at Base.bound [as log] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.propogateTick (/home/guite/Documents/gekko/plugins/tradingAdvisor/baseTradingMethod.js:166:10)
    at Base.bound [as propogateTick] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.calculateSyncIndicators (/home/guite/Documents/gekko/plugins/tradingAdvisor/baseTradingMethod.js:129:8)
    at Base.bound [as calculateSyncIndicators] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at afterAsync (/home/guite/Documents/gekko/plugins/tradingAdvisor/baseTradingMethod.js:94:10)
    at Base.tick (/home/guite/Documents/gekko/plugins/tradingAdvisor/baseTradingMethod.js:108:5)
    at Base.bound [as tick] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Actor.emitStratCandle (/home/guite/Documents/gekko/plugins/tradingAdvisor/tradingAdvisor.js:103:17)
    at Actor.bound [as emitStratCandle] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at CandleBatcher.batcher.on._candle (/home/guite/Documents/gekko/plugins/tradingAdvisor/tradingAdvisor.js:82:12)
    at emitOne (events.js:116:13)
    at CandleBatcher.emit (events.js:211:7)
    at CandleBatcher.bound [as emit] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at _.each.candle (/home/guite/Documents/gekko/core/candleBatcher.js:55:20)
    at Function.forEach (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:3298:15)
    at CandleBatcher.flush (/home/guite/Documents/gekko/core/candleBatcher.js:53:5)
    at CandleBatcher.bound [as flush] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Actor.processCandle (/home/guite/Documents/gekko/plugins/tradingAdvisor/tradingAdvisor.js:97:16)
    at Actor.bound [as processCandle] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Gekko.<anonymous> (/home/guite/Documents/gekko/core/gekkoStream.js:59:9)
--> in Database#all('\n    SELECT * from candles_XBT_ETH\n    WHERE start <= 1561942485 AND start >= 1561942201\n    ORDER BY start ASC\n  ', [Function])
    at Reader.get (/home/guite/Documents/gekko/plugins/sqlite/reader.js:98:11)
    at Reader.bound [as get] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Market.get (/home/guite/Documents/gekko/core/markets/leech.js:62:15)
    at Timeout.bound [as _onTimeout] (/home/guite/Documents/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5) __augmented: true }
RECEIVED ERROR IN GEKKO INSTANCE 2019-06-30-22-56-tradebot-2896762559368744
{ __augmented: true }
2019-07-01T03:21:39.328Z 'Service:Unavailable'

printed variable ema.result with a console.error(ema.result) and got: Indicator { weight: 50, result: false, age: 0 }

Might be a kraken configuration issue (I’m using kraken) but other “builtin” gekko strategies are working fine with my current configuration.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions