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

Srsi macd #369

Merged
merged 5 commits into from
Jul 10, 2017
Merged

Srsi macd #369

merged 5 commits into from
Jul 10, 2017

Conversation

talvasconcelos
Copy link
Contributor

Renamed and tweaked a bit the strategy and a small fix to the SMA file.

@talvasconcelos talvasconcelos mentioned this pull request Jul 8, 2017
lib/sma.js Outdated
return sum + cur
}, 0)

s.period[key] = SMA / lenght
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: lenght -> length

@fasheng
Copy link
Contributor

fasheng commented Jul 8, 2017

Besides the typo, you could also rename the strategy name in backtester.js, too.
Just rename all rsi_macd to srsi_macd:

sed -i 's/rsi_macd/srsi_macd/g' backtester.js

https://github.com/carlos8f/zenbot/blob/master/scripts/auto_backtester/backtester.js#L75

@talvasconcelos
Copy link
Contributor Author

talvasconcelos commented Jul 8, 2017 via email

@fasheng
Copy link
Contributor

fasheng commented Jul 8, 2017

Yes, just edit the file and git add .; git commit --amend to avoid another commit and git push --force.

@fasheng
Copy link
Contributor

fasheng commented Jul 8, 2017

And you must edit lib/_codemap.js to export sma function.

lib/sma.js Outdated
let SMA = s.lookback
.slice(0, length)
.reduce((sum, cur) => {
return sum + cur
Copy link
Contributor

Choose a reason for hiding this comment

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

return sum + cur -> return sum + cur[source_key]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Owner

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

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

👍

@DeviaVir DeviaVir merged commit 26e3565 into DeviaVir:master Jul 10, 2017
supersabbath pushed a commit to supersabbath/zenbot that referenced this pull request Oct 2, 2017
* updates to srsi_macd

* rename strategy to srsi_macd

* srsi_macd and sma indicator tweaks

* fixed type in length

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

Successfully merging this pull request may close these issues.

3 participants