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
- Updated the Prime method signature in multiple indicators (Jma, Kama, Lsma, Mama, Mgdi, Pwma, Rma, Sma, Ssf, Super, T3, Tema, Trima, Usf, Vidya, Wma, Atr) to accept an optional TimeSpan parameter for improved flexibility.
- Added unit tests for Lsma to verify Dispose functionality, ensuring proper unsubscription from the source and thread safety.
- Enhanced Mama and Wma classes to handle non-finite inputs gracefully and added checks for valid parameters in constructors.
- Introduced additional tests for T3 to validate constructor behavior with invalid volume factors.
- Ensured all indicators maintain consistent behavior when handling edge cases, such as empty buffers and non-finite values.
- Updated event handler signatures to use TValueEventArgs for consistency in Mama, Mgdi, Pwma, Rma, Sma, Ssf, Super, T3, Tema, Trima, Usf, Vidya, Wma, and Atr classes.
- Enhanced argument validation by specifying parameter names in exceptions for clarity.
- Adjusted tests to align with new event handler signatures.
- Improved code readability and maintainability by using structured records and lambda expressions.
Add implementation of CVI - Chaikin's Volatility class and related tests.
* **Cvi Class Implementation:**
- Add `Cvi` class in `lib/volatility/Cvi.cs` to calculate Chaikin's Volatility.
- Use high and low prices for calculation.
- Include a constructor with `period` parameter.
- Add a method to calculate Chaikin's Volatility.
* **Quantower Indicator:**
- Add `CviIndicator` class in `quantower/Volatility/CviIndicator.cs`.
- Use `Cvi` class for calculation.
- Add input parameters for `period` and `showColdValues`.
- Implement `OnInit` and `OnUpdate` methods.
* **Tests:**
- Add a test method for `Cvi` class in `Tests/test_updates_volatility.cs`.
- Use random updates to test `Cvi`.
- Ensure initial and final values are equal.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mihakralj/QuanTAlib?shareId=XXXX-XXXX-XXXX-XXXX).