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

stddev calculate on period #826

Merged
merged 3 commits into from Dec 14, 2017
Merged

stddev calculate on period #826

merged 3 commits into from Dec 14, 2017

Conversation

ghost
Copy link

@ghost ghost commented Dec 9, 2017

less api calls

less api calls
calculated = null
},
onPeriod: function (s, cb) {
get('lib.ema')(s, 'stddev', s.options.stddev)
Copy link
Owner

Choose a reason for hiding this comment

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

Odd indenting. Also, what calls the calculate() fn now?

Copy link
Contributor

Choose a reason for hiding this comment

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

the caluculate method get's called with every single trade the bot receives. I don't think that we have to calculate the stddev on every trade but only when it's actually needed: In the onPeriod - call. It's not perfect but it's enough, imho.

Copy link
Author

Choose a reason for hiding this comment

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

yea ^^

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.

👍

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.

2 participants