mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-12 15:48:05 +00:00
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.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# 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:
|
||||
|
||||
```csharp
|
||||
// ❌ Before (no longer compiles)
|
||||
int warmup = Cci.WarmupPeriod;
|
||||
```
|
||||
|
||||
## Migration
|
||||
|
||||
### Option A — Use the instance property (recommended)
|
||||
|
||||
```csharp
|
||||
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:
|
||||
|
||||
```csharp
|
||||
// ⚠️ 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 |
|
||||
|
||||
## Related Changes
|
||||
|
||||
- **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.
|
||||
Reference in New Issue
Block a user