mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-21 12:08:05 +00:00
feat: update Qodana configuration to disable failure conditions and improve build stability
refactor: enhance Bilateral and SMA indicators to handle edge cases and improve state management refactor: clean up whitespace and formatting in various test files for consistency
This commit is contained in:
@@ -262,8 +262,14 @@ public sealed class Mama : AbstractBase
|
||||
return new TSeries(t, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Primes the indicator with historical data.
|
||||
/// </summary>
|
||||
/// <param name="source">Historical price data</param>
|
||||
/// <param name="step">Time step parameter (unused for this indicator but required by base signature)</param>
|
||||
public override void Prime(ReadOnlySpan<double> source, TimeSpan? step = null)
|
||||
{
|
||||
_ = step; // Parameter required by base signature but not used by MAMA
|
||||
foreach (var value in source)
|
||||
{
|
||||
Step(value, true);
|
||||
@@ -447,11 +453,8 @@ public sealed class Mama : AbstractBase
|
||||
// Set initial p_state
|
||||
p_mama = avg;
|
||||
p_fama = avg;
|
||||
p_period = 0; // Initial period state
|
||||
p_period = 0;
|
||||
p_phase = 0;
|
||||
|
||||
// Initialize other state variables if needed for next iteration logic?
|
||||
// Actually they just stay 0/default until we hit count > 6
|
||||
}
|
||||
|
||||
output[i] = mama;
|
||||
|
||||
Reference in New Issue
Block a user