-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Acceleration bands #1099
Conversation
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.
minor comments
Indicators/AccelerationBands.cs
Outdated
LowerBand.Update(new IndicatorDataPoint | ||
{ | ||
Time = input.Time, | ||
Value = input.Low * (1 - _width * (input.High - input.Low) / (input.High + input.Low)) |
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.
Since you are using _"width * (input.High - input.Low) / (input.High + input.Low)" twice you might assign it to some var en line 100
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.
Done.
delta: 1e-4, message: "Upper band test fail.") | ||
); | ||
} | ||
} |
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.
missing MiddleBand test?
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.
Please check the ´CommonIndicatorTests´ class.
/// <summary> | ||
/// Gets the lower acceleration band (Low * (1 - Width * (High - Low)/ (High + Low))) | ||
/// </summary> | ||
public IndicatorBase<IndicatorDataPoint> LowerBand { get; } |
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.
all of these could be readonly?
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'm not sure.
Nice work @Jay-Jay-D, thanks for the review @MartinMoli ! |
Implementation of the Acceleration bands. #1066