bug in phenotype.js
Happy new year at all !
I have the last version of Zenbot (git checked). I'm playing with backtesting (darwin.js) with gdax and at the end of simulation this error occurs:
`Generation complete, saving results...
Finished writing generation json to simulations/generation_data_1515508771_gen_1.json Finished writing generation csv to simulations/backtesting_1515508771.csv
Generation's Best Results
/root/Bureau/zenbot/scripts/genetic_backtester/darwin.js:695
console.log(\t(${v}) Result Fitness ${results[0].fitness}, VS Buy and Hold: ${results[0].vsBuyHold}, End Balance: ${results[0].endBalance}, Wins/Losses ${results[0].wins}/${results[0].losses}.);
^
TypeError: Cannot read property 'fitness' of undefined
at selectedStrategies.forEach (/root/Bureau/zenbot/scripts/genetic_backtester/darwin.js:695:63)
at Array.forEach (
Seems to be a issue if you don't define the following in your sim: --currency_capital=10 --asset_capital=100
you're right !
asset_capital has been filled but not the currency_capital ... for me: if not filled: = 0 It's logic the bot check the empty value and set it to 0. as we can see in the conf.js if you don't fill these params or don't overwrite them.
But if you write: --currency_capital=0 --asset_capital=0.6 (wich can be 0.6 ETH or BTC) the same error occurs ... if you want to fill one of these params with a null value you can't because of this error. i think there is something to adjust between darwin and phenotype ? may be a pull request ?
the full command:
./scripts/genetic_backtester/darwin.js --selector="gdax.ETH-BTC" --days=1 --currency_capital=0 --asset_capital=0.6 --use_strategies=trend_ema --population=150
thank's again for your advice
...but you can't trade with 0.
should probably default darwin to check conf.js for values first. if not, just default to --currency_capital=1000
Morning,
@shr00mie you can start trading with an asset capital of 0.6 ETH and a balance of currency at 0.
last week-end i was on binance to trade with NULS, LINK and others. monday i sent to gdax my whole balance of 0.6 ETH from binance and start to trade on gdax.
I expected sim can reflect the reality and if i must set the currency higher than 0 in this case the sim is wrong ...