Files
QuanTAlib/docs/release-notes/cci-warmup-period-migration.md
T
Miha Kralj 75c6a9f135 Enhance validation tests for various indicators with external library comparisons
- Added detailed comments explaining the validation limitations for MMA and ZLEMA due to differences in algorithm implementations.
- Implemented validation tests for True Range against TALib and Tulip, ensuring directional agreement.
- Updated Ulcer Index validation to clarify differences in algorithmic approaches between QuanTAlib and Skender.
- Enhanced Ease of Movement tests to verify directional agreement with Tulip's EMV, noting differences in volume scaling.
- Expanded Klinger Volume Oscillator tests to validate against Skender and Tulip, focusing on directional agreement across multiple period configurations.
- Improved Negative Volume Index tests to compare percentage changes with Tulip, addressing differences in starting values.
- Updated Positive Volume Index tests to validate against Tulip, emphasizing percentage change comparisons.
- Enhanced Williams Accumulation/Distribution tests to verify directional agreement with Tulip, highlighting formula differences.
2026-02-11 14:46:56 -08:00

1.6 KiB

Release Note: CCI WarmupPeriod — Static to Instance Migration

Summary

Cci.WarmupPeriod has been changed from a static property to an instance property. This allows each Cci instance to report the warmup period for its configured period parameter, rather than a single hard-coded default.

Breaking Change

Code that previously accessed Cci.WarmupPeriod as a static member will no longer compile:

// ❌ Before (no longer compiles)
int warmup = Cci.WarmupPeriod;

Migration

var cci = new Cci(period: 14);
int warmup = cci.WarmupPeriod; // returns 14

Option B — Use the obsolete static accessor (temporary bridge)

A static DefaultWarmupPeriod property has been added and marked [Obsolete] to ease migration:

// ⚠️ Compiles with a warning; will be removed in a future major version.
#pragma warning disable CS0618
int warmup = Cci.DefaultWarmupPeriod; // returns 20 (the default period)
#pragma warning restore CS0618

Timeline

Milestone Action
Current release Cci.DefaultWarmupPeriod available as [Obsolete] static bridge
Next major version Cci.DefaultWarmupPeriod will be removed
  • Ppo.Update(TSeries): Fixed state synchronization — _p_state = _state is now assigned after the batch loop, matching the pattern used in Pmo.Update(TSeries).
  • Ppo.Batch(ReadOnlySpan): Added fastPeriod >= slowPeriod guard to match the constructor validation, ensuring invalid parameter combinations are rejected early.