-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
trogdor123 got me looking at the right section where the params were being input in json. made some minor tweaks to the code and now both are outputting correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really find the changes because of all the indentation things you changed, which I'm not sure I agree with in first place 😕
scripts/genetic_backtester/darwin.js
Outdated
// selector should be at start before keys | ||
if(key == "selector"){ | ||
result = input[key].normalized + result; | ||
let buyHoldRegexp = /buy hold: (\d+\.\d+) \(/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you indenting this?
scripts/genetic_backtester/darwin.js
Outdated
@@ -91,7 +91,7 @@ let runUpdate = (days, selector) => { | |||
let command = `${zenbot_cmd} backfill --days=${days} ${selector}`; | |||
console.log(`Backfilling (might take some time) ...`); | |||
console.log(command); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?
scripts/genetic_backtester/darwin.js
Outdated
@@ -81,7 +81,7 @@ let runCommand = (taskStrategyName, phenotype, cb) => { | |||
console.log(`Bad output detected`, err.toString()); | |||
console.log(stdout); | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?
scripts/genetic_backtester/darwin.js
Outdated
@@ -71,7 +71,7 @@ let runCommand = (taskStrategyName, phenotype, cb) => { | |||
console.error(stderr); | |||
return cb(null, null); | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?
scripts/genetic_backtester/darwin.js
Outdated
phenotype['sim'] = {}; | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?
scripts/genetic_backtester/darwin.js
Outdated
@@ -59,9 +59,9 @@ let runCommand = (taskStrategyName, phenotype, cb) => { | |||
let zenbot_cmd = process.platform === 'win32' ? 'zenbot.bat' : './zenbot.sh'; | |||
let command = `${zenbot_cmd} sim ${simArgs} ${commonArgs} ${strategyArgs[taskStrategyName]}`; | |||
console.log(`[ ${iterationCount++}/${populationSize * selectedStrategies.length} ] ${command}`); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary spaces?
scripts/genetic_backtester/darwin.js
Outdated
* | ||
* Example: ./darwin.js --selector="bitfinex.ETH-USD" --days="10" --currency_capital="5000" --use_strategies="all | macd,trend_ema,etc" --population="101" --population_data="simulations/generation_data_NUMBERS_gen_X.json" | ||
*/ | ||
* Clifford Roche <clifford.roche@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd argue it looks better with a space in front of it, might be personal preference
scripts/genetic_backtester/darwin.js
Outdated
}); | ||
}; | ||
|
||
simulateGeneration(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more indentation problems here
...changes - formatting.
dropped formatting. just kept changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice
* bring the recent commits to master down into unstable (#1048) * update products.json file to newest trading pairs at binance (#1028) * Binance changed API 24 hours to 1 hour (#1027) * Update README * Update README again * add generation data to gitignore (#1012) * binance changed their API strategy from 24 hour windows to 1 hour. * rename periodLength to period_length (#1035) * Change markup_pct to new markdown and markup, set commonArgs so it is included in all strategies, fix return. (#1047) The only other occurrence is in the readme file noting the legacy aspect. * Update darwin.js * Added support for dema-strategy to darwin.js (#1046) * fix bad escaping on output to console (#1045) * Update periodLength to underscore syntax for darwin * Missing | lead to bitwise operation being performed rather than an OR logical comparison. (#1053) * Console Output adjustment (#1055) * resolution to .csv & .json output (#1058) * resolution to .csv & .json output trogdor123 got me looking at the right section where the params were being input in json. made some minor tweaks to the code and now both are outputting correctly. * Update darwin.js ...changes - formatting. * darwin.js - crossover strategy (#1060) noticed that generational output was static from gen to gen for smalen1 and smalen2. sure enough, those are coded into the strategy itself, but were left out of the darwin.js strategy config for mutation. * Docker (#1061) * docker fix * Resolve docker build problems * noop strategy: readme/links/list (#1062) * Travis. Docker. (#1063) * Updated minimum required node version (#1066) It appears Zenbot wont work on anything before 8.3.0. Updating the minimum required version, for clarity. * Merge DemaStrats (#1067) fixes #1064 * v4.1.0: prepare release (#1068) * v4.1.0: prepare release * update package-lock.json
trogdor123 got me looking at the right section where the params were being input in json. made some minor tweaks to the code and now both are outputting correctly. also ran the entire thing through auto indent to make sure all the sections were visually grouped. resolves part 2 of #1044.