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

period is not defined #578

Closed
danielsalles opened this issue Feb 1, 2017 · 1 comment
Closed

period is not defined #578

danielsalles opened this issue Feb 1, 2017 · 1 comment

Comments

@danielsalles
Copy link

danielsalles commented Feb 1, 2017

EDIT: #580 --- bug fixed
I'm trying to create my custom methods, and I'm having problems.
https://gist.github.com/danielsalles/ccd65832cd333a34906087f87ae05acf

It seems the Talib is charging me something that does not exist in context. I do not get it right, I'm still not familiar with gekko.

                    throw err;
                    ^

ReferenceError: period is not defined
    at Object.run (/home/dbastos/botbitcoins/gekko/core/talib.js:343:30)
    at _.each.indicator (/home/dbastos/botbitcoins/gekko/core/baseTradingMethod.js:181:30)
    at forOwn (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:2106:15)
    at Function.forEach (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:3303:9)
    at Base.tick (/home/dbastos/botbitcoins/gekko/core/baseTradingMethod.js:179:7)
    at Base.bound [as tick] (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Actor.processCustomCandle (/home/dbastos/botbitcoins/gekko/plugins/tradingAdvisor.js:68:15)
    at CandleBatcher.bound (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at emitOne (events.js:96:13)
    at CandleBatcher.emit (events.js:188:7)
--> in Database#all('\n    SELECT * from candles_BTC_DASH\n    WHERE start <= 1475328239 AND start >= 1475325240\n    ORDER BY start ASC\n  ', [Function])
    at Reader.get (/home/dbastos/botbitcoins/gekko/plugins/sqlite/reader.js:78:11)
    at Reader.bound [as get] (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Market.get (/home/dbastos/botbitcoins/gekko/core/markets/backtest.js:56:15)
    at Market.bound [as get] (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Market._read (/home/dbastos/botbitcoins/gekko/core/markets/backtest.js:47:8)
    at Market.bound (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Market.Readable.read (_stream_readable.js:348:10)
    at Market.bound [as read] (/home/dbastos/botbitcoins/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at resume_ (_stream_readable.js:737:12)
@danielsalles
Copy link
Author

Just taking the question, how does the talib know the candle? Information is passed by gekko with some magic, hehehe?

danielsalles added a commit to danielsalles/gekko that referenced this issue Feb 3, 2017
@askmike askmike closed this as completed Mar 3, 2017
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

2 participants