mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 13:38:05 +00:00
fix: address code review issues in indicators and core components
This commit is contained in:
@@ -177,12 +177,7 @@ public sealed class Kama : ITValuePublisher
|
||||
|
||||
// Use static Calculate for performance
|
||||
var outputSpan = new double[len];
|
||||
Calculate(source.Values, outputSpan, _period,
|
||||
(int)(2.0 / _fastAlpha - 1), (int)(2.0 / _slowAlpha - 1)); // Reverse calc periods from alphas?
|
||||
// Actually better to pass alphas or periods.
|
||||
// The static method signature should match constructor params.
|
||||
|
||||
// Wait, I need to pass periods to static method.
|
||||
|
||||
// fastPeriod = 2/fastAlpha - 1.
|
||||
int fastPeriod = (int)Math.Round(2.0 / _fastAlpha - 1);
|
||||
int slowPeriod = (int)Math.Round(2.0 / _slowAlpha - 1);
|
||||
|
||||
Reference in New Issue
Block a user