04-27-2018, 04:39 AM
(04-24-2018, 08:17 AM)tommiehansen Wrote:(04-24-2018, 02:35 AM)gt3 Wrote: Hey guys, firstly, I've been following this thread since inception and have had 5 instances of Gekko running very nicely for about 2 months. I started using the RSI_BULL_BEAR strategy when it was first posted and subsequently changed to the improved RSI_BULL_BEAR_ADX strategy.
My existing instances have been producing a nice return lately and I am wanting to spin up another one. As a result I downloaded to the latest version of gekko_tools and copied over the gekko-extra-indicators as per the instructions. I've also created the json file RSI_BULL_BEAR_ADX.json (placed it next to the existing toml version in gekko/config/strategies) both by using the code example posted by Kris191 earlier in this thread and also by using an online converter. However, I'm still getting the error when attempting a backtest:
2018-04-24 02:29:26 (INFO): Setting up Gekko in backtest mode
2018-04-24 02:29:26 (INFO):
2018-04-24 02:29:26 (INFO): Setting up:
2018-04-24 02:29:26 (INFO): Trading Advisor
2018-04-24 02:29:26 (INFO): Calculate trading advice
2018-04-24 02:29:26 (INFO): Using the strategy: RSI_BULL_BEAR_ADX
/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39
this.addIndicator('maSlow', 'SMA', this.settings.SMA.long );
^
TypeError: Cannot read property 'SMA' of undefined
at Base.init (/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39:52)
at Base.bound [as init] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
at new Base (/home/admin/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)
at Actor.setupTradingMethod (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)
at Actor.bound [as setupTradingMethod] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
at new Actor (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
at load (/home/admin/gekko/core/pluginUtil.js:95:22)
at /home/admin/gekko/node_modules/async/dist/async.js:1156:9
at replenish (/home/admin/gekko/node_modules/async/dist/async.js:1030:17)
at iterateeCallback (/home/admin/gekko/node_modules/async/dist/async.js:1015:17)
This a brand new install with the latest version of Gekko, gekko_tools, gekko-extra-indicators (copied to both gekko/strategies and gekko/strategies/indicators), tulind. I'm using version 1.0.2 of talib.
I've spent hours trying to debug this Sorry to be a pain but really hoping someone can help out! Thank you for all your work so far @tommiehansen and for everyone else contributions
You're using an outdated TOML-file for some reason. It basically is saying that
[SMA]
long = xxxxxx
Does not exist.
Latest version of RBB ADX does not use tulip or talib.
Thanks for the reply. I was using the updated toml file but for some reason Gekko just wouldn't read it... Anyway, I've integrated the toml settings into my config.js and it's working fine now.
Interestingly, a side by side backtest comparison of the new RSI_BULL_BEAR_ADX strategy vs the old one shows the old one outperforming the new by about %30 - using the data set, settings etc.