Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceleration bands #1099

Merged
merged 4 commits into from
Aug 30, 2017
Merged

Conversation

Jay-Jay-D
Copy link
Contributor

Implementation of the Acceleration bands. #1066

Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

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

minor comments

LowerBand.Update(new IndicatorDataPoint
{
Time = input.Time,
Value = input.Low * (1 - _width * (input.High - input.Low) / (input.High + input.Low))
Copy link
Member

Choose a reason for hiding this comment

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

Since you are using _"width * (input.High - input.Low) / (input.High + input.Low)" twice you might assign it to some var en line 100

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.

delta: 1e-4, message: "Upper band test fail.")
);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

missing MiddleBand test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check the ´CommonIndicatorTests´ class.

/// <summary>
/// Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low)))
/// </summary>
public IndicatorBase<IndicatorDataPoint> LowerBand { get; }
Copy link
Member

Choose a reason for hiding this comment

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

all of these could be readonly?

Copy link
Contributor Author

@Jay-Jay-D Jay-Jay-D Aug 30, 2017

Choose a reason for hiding this comment

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

I'm not sure.

@jaredbroad
Copy link
Member

Nice work @Jay-Jay-D, thanks for the review @MartinMoli !

@jaredbroad jaredbroad merged commit 6a512e8 into QuantConnect:master Aug 30, 2017
@Jay-Jay-D Jay-Jay-D deleted the AccelerationBands branch August 30, 2017 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants