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

fix command execution line #373

Merged
merged 1 commit into from
Jul 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/auto_backtester/backtester.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let runCommand = (strategy, cb) => {
speed: `--baseline_periods=${strategy.baseline_periods} --trigger_factor=${strategy.trigger_factor}`,
trend_ema: `--trend_ema=${strategy.trend_ema} --oversold_rsi=${strategy.oversold_rsi} --oversold_rsi_periods=${strategy.oversold_rsi_periods} --neutral_rate=${strategy.neutral_rate}`
};
let command = `node zenbot sim ${simArgs} ${strategyArgs[strategyName]} --period=${strategy.period} --min_periods=${strategy.min_periods}`;
let command = `zenbot sim ${simArgs} ${strategyArgs[strategyName]} --period=${strategy.period} --min_periods=${strategy.min_periods}`;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fasheng added this node here. He might have a better opinion on this.

What error do you get, @nedievas?

Copy link
Contributor

@fasheng fasheng Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, looks the prefix node was used to fix Windows platform issue and it was not patched by me(I don't use Windows any more)...
#346

Anyway, this will break backtester.js under Linux and looks could not solve the Windows issue, too. As stackoverflow discussed, npm link should already make a zenbot.cmd wrapper for users, so could someone using Windows to test this problem again to ensure if node zenbot is necessary.
https://stackoverflow.com/questions/10396305/npm-package-bin-script-for-windows

console.log(`[ ${countArr.length}/${strategies[strategyName].length} ] ${command}`);

shell.exec(command, {silent:true, async:true}, (code, stdout, stderr) => {
Expand Down