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

Constant Bug in Genetic Backtester #1236

Open
kilowatt1 opened this issue Jan 27, 2018 · 2 comments
Open

Constant Bug in Genetic Backtester #1236

kilowatt1 opened this issue Jan 27, 2018 · 2 comments
Labels

Comments

@kilowatt1
Copy link

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • Zenbot version: Master
  • NodeJS version: 8.9.4
  • Python version: Python 3.5.2
  • Exact command to reproduce: ./scripts/genetic_backtester/darwin.js --selector="gdax.ltc-eur" --days=10 --currency_capital=4500 --use_strategies=

Logs:
./zenbot.sh sim gdax.ltc-eur --period_length=36m --min_periods=119 --markdown_buy_pct=2.692266657499561 --markup_sell_pct=4.744030757398114 --order_type=maker --sell_stop_pct=0 --buy_stop_pct=38 --profit_stop_enable_pct=0 --profit_stop_pct=5 --cci_periods=142 --rsi_periods=143 --srsi_periods=199 --srsi_k=23 --srsi_d=44 --oversold_rsi=45 --overbought_rsi=70 --oversold_cci=62 --overbought_cci=76 --constant=0.03980302101693896 --backtester_generation=366 --exchangeMarketPair=gdax.ltc-eur --strategy=cci_srsi --days=10 --currency_capital=4500 --filename=none
undefined:636
throw createError(name, arguments.length, 0, arguments[0], 'number,Complex,BigNumber,Fraction,Array,Matrix');
^

TypeError: Unexpected type of argument in function round (expected: number or Complex or BigNumber or Fraction or Array or Matrix, actual: undefined, index: 0)
at createError (/root/zenbot/node_modules/typed-function/typed-function.js:135:17)
at Object.round (eval at _typed (/root/zenbot/node_modules/typed-function/typed-function.js:1118:22), :636:9)
at srsi (/root/zenbot/lib/srsi.js:57:62)
at Object.calculate (/root/zenbot/extensions/strategies/cci_srsi/strategy.js:34:20)
at onTrade (/root/zenbot/lib/engine.js:155:18)
at withOnPeriod (/root/zenbot/lib/engine.js:874:15)
at /root/zenbot/lib/engine.js:867:17
at Object.onPeriod (/root/zenbot/extensions/strategies/cci_srsi/strategy.js:85:7)
at Array. (/root/zenbot/lib/engine.js:854:35)
at Immediate.each [as _onImmediate] (/root/zenbot/node_modules/run-series/index.js:17:24)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)

Describe the problem

When running genetic backtester, i get the above error which seems to be coming from the large number in constant that it auto generated.

@DeviaVir DeviaVir added the bug label Jan 29, 2018
@station384
Copy link
Contributor

cci_srsi limits need to be adjusted in darwin.js. they are out of acceptable range. I came across this as well.

@kilowatt1
Copy link
Author

How do we do that, can you post your config please

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants