xFFFFF / Gekko-BacktestTool

Batch backtest, import and strategy params optimalization for Gekko Trading Bot. With one command you will run any number of backtests.
MIT License
231 stars 85 forks source link

Issues with Gekko running in Docker #3

Closed rgarcia89 closed 6 years ago

rgarcia89 commented 6 years ago

Everytime when I try to run the backtest, I get he following error. Gekko is not running during that. The needed imports are available.

Do you have an idea?

root@eb5721dff5de:~/gekko# perl backtest.pl                                                              
/root/gekko/strategies/indicators/MACD.js:7                                                              
  this.short = new EMA(config.short);                                                                    
                              ^                                                                          

TypeError: Cannot read property 'short' of undefined                                                     
    at new Indicator (/root/gekko/strategies/indicators/MACD.js:7:31)                             
    at Base.addIndicator (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:308:34)
    at Base.bound [as addIndicator] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.method.init (/root/gekko/strategies/MACD.js:34:8)                     
    at Base.bound [as init] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Base (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)    
    at Actor.setupTradingMethod (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)             
    at Actor.bound [as setupTradingMethod] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)       
    at new Actor (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)                             
    at load (/root/gekko/core/pluginUtil.js:95:22)                                                       
USD-ETP Backtest is fail. Check logs/USD-ETP-MACD-9-75.log file for more details.                        
/root/gekko/strategies/indicators/MACD.js:7                                                              
  this.short = new EMA(config.short);                                                                    
                              ^                           
TypeError: Cannot read property 'short' of undefined
    at new Indicator (/root/gekko/strategies/indicators/MACD.js:7:31)
    at Base.addIndicator (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:308:34)
    at Base.bound [as addIndicator] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.method.init (/root/gekko/strategies/MACD.js:34:8)
    at Base.bound [as init] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Base (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)
    at Actor.setupTradingMethod (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)
    at Actor.bound [as setupTradingMethod] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Actor (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
    at load (/root/gekko/core/pluginUtil.js:95:22)
/root/gekko/strategies/indicators/MACD.js:7
  this.short = new EMA(config.short);
                              ^

TypeError: Cannot read property 'short' of undefined
    at new Indicator (/root/gekko/strategies/indicators/MACD.js:7:31)
    at Base.addIndicator (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:308:34)
    at Base.bound [as addIndicator] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at Base.method.init (/root/gekko/strategies/MACD.js:34:8)
    at Base.bound [as init] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Base (/root/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)
    at Actor.setupTradingMethod (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)
    at Actor.bound [as setupTradingMethod] (/root/gekko/node_modules/lodash/dist/lodash.js:729:21)
    at new Actor (/root/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
    at load (/root/gekko/core/pluginUtil.js:95:22)
USD-ETP Backtest is fail. Check logs/USD-ETP-MACD-6-100.log file for more details.
USD-ETP Backtest is fail. Check logs/USD-ETP-MACD-8-80.log file for more details.
xFFFFF commented 6 years ago

Do You add strategy configuration to BacktestTool? Edit backtest.pl in text editor. Remember that format for Gekko's CLI is different than UI. In next versions I will add support for toml files.

xFFFFF commented 6 years ago

TOML files are now supported by default. You dont need change any strategy parameters in backtest-config.pl now.