Commit Graph

76 Commits

Author SHA1 Message Date
Miha Kralj d7dbd7078a Refactor event handling and improve argument validation across indicators
- 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.
2025-12-27 15:46:28 -08:00
Miha Kralj f45ffde425 qodana wants .net8.0 2025-12-26 13:59:13 -08:00
Miha Kralj 4ff6dc0ad9 feat(statistics): add Variance indicator with O(1) calculation and usage example 2025-12-25 17:18:41 -08:00
Miha Kralj 8917575994 Refactor IndicatorExtensions: Remove unused methods and optimize price retrieval 2025-12-24 13:50:19 -08:00
Miha Kralj 4efa0e773e Enhance documentation and validation for various indicators 2025-12-22 20:42:26 -08:00
Miha Kralj b5358091ae feat: Add Absolute Price Oscillator (APO) implementation and documentation
feat: Implement ADL (Accumulation/Distribution Line) indicator
2025-12-18 21:32:01 -08:00
Miha Kralj d277e08056 refactoring 2025-12-16 21:16:50 -08:00
Miha Kralj f761cc5712 feat: Add Awesome Oscillator (AO) implementation with tests and documentation 2025-12-14 21:01:21 -08:00
Miha Kralj f7b8fe1654 feat: implement DMX indicator with comprehensive tests and documentation 2025-12-13 23:17:56 -08:00
Miha Kralj 4b17984cfd Add PWMA implementation and tests; enhance documentation 2025-12-13 20:21:21 -08:00
Miha Kralj cea3e0c46d Refactor validation tests for various indicators to utilize shared test data structure 2025-12-12 13:47:57 -08:00
Miha Kralj 66b1fc3dca Add RMA indicator implementation and related tests; update existing indicators to return empty array for zero count 2025-12-10 19:24:55 -05:00
Miha Kralj 8959d9584d chore: update project files and configurations for improved compatibility and performance 2025-12-09 16:04:19 -05:00
Miha Kralj 53a2dd2c05 chore: Update various indicators to improve null handling and code readability 2025-12-08 18:02:36 -05:00
Miha Kralj c2b33a8320 Add unit tests for various indicators and update project file
- Implemented unit tests for the following indicators:
  - KAMA (Kaufman Adaptive Moving Average)
  - SMA (Simple Moving Average)
  - T3 (Tillson T3 Moving Average)
  - TEMA (Triple Exponential Moving Average)
  - TRIMA (Triangular Moving Average)
  - WMA (Weighted Moving Average)

- Each test class includes tests for constructor defaults, history depth, short name, initialization, processing updates, and source type handling.

- Updated the Quantower.Tests.csproj to include all new test files in the lib directory.
2025-12-08 11:40:21 -08:00
Miha Kralj ed5e5c8209 Add unit tests for various moving average indicators
- Implement tests for HMA (Hull Moving Average) indicator to verify default settings, history depth calculations, and value computations during updates.
- Create tests for KAMA (Kaufman Adaptive Moving Average) indicator, ensuring correct defaults, history depth, and value calculations.
- Add tests for SMA (Simple Moving Average) indicator, checking default values, history depth, and value computations.
- Develop tests for T3 (Tillson T3 Moving Average) indicator, validating defaults, history depth, and value calculations.
- Implement tests for TEMA (Triple Exponential Moving Average) indicator, ensuring correct defaults and value computations.
- Create tests for TRIMA (Triangular Moving Average) indicator, verifying defaults, history depth, and value calculations.
- Add tests for WMA (Weighted Moving Average) indicator, checking default values, history depth, and value computations.
2025-12-08 11:00:58 -08:00
Miha Kralj 488de7ea1e chore: Update documentation links and improve code readability in averages and tests 2025-12-07 20:44:24 -08:00
Miha Kralj 8277ed9ccf chore: Add Snyk CLI installation and update CodeQL action versions; add assertion for SonarCloud compliance 2025-12-07 20:05:09 -08:00
Miha Kralj 3975ff2d7f Refactor T3 Moving Average Implementation and Remove Unused Tests
- Deleted DebugTulip.Tests.cs as it was no longer needed.
- Refactored T3.cs to encapsulate parameters in a struct for better organization and readability.
- Updated methods in T3.cs to use the new Parameters struct, improving clarity and reducing redundancy.
- Enhanced T3.md documentation to provide clearer explanations of the T3 moving average and its parameters.
- Removed Wma.Coverage.Tests.cs as it was obsolete.
- Added new tests in IndicatorExtensions.Tests.cs to validate logic methods and ensure correct calculations.
- Updated IndicatorExtensions.cs to improve method organization and add new functionality for handling chart coordinates.
- Refactored mocks in TradingPlatformMocks.cs to align with new chart interface definitions.
2025-12-07 17:32:01 -08:00
Miha Kralj 94d06b0749 T3 Moving Average and associated tests 2025-12-07 17:10:41 -08:00
Miha Kralj 875998b288 Add eventing support to WMA indicator and implement unit tests for various indicators
- Enhanced WMA indicator with event-driven capabilities using ITValuePublisher interface.
- Created a new TODO file listing various indicators and their corresponding libraries.
- Added unit tests for DEMA, HMA, TEMA, and WMA indicators to ensure proper functionality.
- Implemented tests for handling new bars, ticks, and historical data updates across indicators.
- Verified that indicators correctly compute values and handle different source types.
2025-12-07 16:46:38 -08:00
Miha Kralj 9e152b9027 Add TEMA (Triple Exponential Moving Average) implementation and validation tests
- Implemented TEMA calculation in QuanTAlib with O(1) update complexity.
- Added validation tests for TEMA against Skender, TA-Lib, and Tulip indicators.
- Updated documentation for TEMA, including its mathematical foundation and usage examples.
- Enhanced existing tests for other indicators (TRIMA, WMA) to generate more records.
- Adjusted benchmark tests to include DEMA and TEMA comparisons.
- Refactored code for better readability and performance, including zero-allocation Span API.
2025-12-04 19:57:46 -08:00
Miha Kralj ee358bfdd9 Enhance coding conventions and static analysis setup; update .editorconfig, scanner.sh, and various C# files for improved readability and performance 2025-12-04 14:36:00 -08:00
Miha Kralj 967096d4f5 Refactor and optimize various components of QuanTAlib
- Removed WmaVector class to streamline weighted moving average calculations.
- Simplified RingBuffer implementation by removing unnecessary comments and improving clarity.
- Enhanced SIMD extensions for better performance and readability.
- Updated TBar and TBarSeries classes to improve property calculations and reduce overhead.
- Cleaned up TValue struct by removing redundant comments.
- Added comprehensive unit tests for IndicatorExtensions and TrimaIndicator to ensure functionality and correctness.
2025-12-04 13:49:05 -08:00
Miha Kralj 4a0435c217 Refactor EMA, SMA, and WMA indicators to improve warmup tracking and coverage calculations; enhance tests for IsHot behavior and period dependency; update project files for better structure and maintainability. 2025-12-03 13:49:45 -08:00
Miha Kralj 4a0a8d6da2 chore: Update project files and configurations; enhance .gitignore, add Qodana and SonarScanner scripts, and improve test project references 2025-12-03 09:27:29 -08:00
Miha Kralj 1d145d0622 Refactor TBar struct for improved equality comparison and string representation; update Benchmark program structure for better organization; modify Averages project file to include specific source files; add Directory.Build.props for common project settings; implement comprehensive tests for Ema, Sma, and Wma indicators; create mock classes for TradingPlatform.BusinessLayer to facilitate testing; enhance Quantower test project configuration for better test management. 2025-12-01 18:40:23 -08:00
Miha Kralj acac3e610c updates from mac 2025-11-28 13:35:16 -08:00
Miha Kralj 74b49d2bb4 Add TBar, TBarSeries, TSeries, TValue, and IFeed implementations with comprehensive documentation and examples
- Introduced TBar struct for efficient OHLCV data representation.
- Implemented TBarSeries class for high-performance collection of TBar instances using Structure of Arrays (SoA) layout.
- Added TSeries class for time-series data management with zero-copy access.
- Created TValue struct for time-value pairs with implicit conversions.
- Defined IFeed interface for consistent data feed implementations.
- Developed CsvFeed class for loading historical OHLCV data from CSV files.
- Implemented GBM class for generating synthetic financial data using Geometric Brownian Motion.
- Added Quantower project files for Averages indicator with necessary dependencies and configurations.
- Included extensive usage examples and notebooks for TBar, TBarSeries, TSeries, TValue, and feed implementations.
2025-11-27 19:51:43 -08:00
Miha Kralj 33ffd3a37a first iteration 2025-11-25 20:40:46 -08:00
Miha Kralj 530dfe0aa2 chore: snapshot current state 2025-09-23 22:01:11 -07:00
Miha e3d6bbc54a .NET 9 update 2024-11-13 21:28:41 -05:00
Miha Kralj 02c92712a0 CTI 2024-11-08 10:07:11 -08:00
Miha Kralj 11fc798517 CTI - Ehler's Correlation Trend - calc and chart 2024-11-08 08:24:51 -08:00
Miha Kralj 351214ed31 moar Chart indicators 2024-11-07 21:40:02 -08:00
Miha Kralj 69aef2b127 Dpo chart + refactored tests 2024-11-07 09:55:19 -08:00
Miha Kralj 582a0256ec Momentum
charts for Quantower
2024-11-06 20:56:32 -08:00
Miha Kralj 7b41d84c66 Bband, Ccv, Ce, Cv, Cvi, Ewma, Fcb, Gkv, Hlv 2024-11-03 15:52:25 -08:00
Miha Kralj 94928714bf sonar fixes 2024-11-03 15:52:25 -08:00
codefactor-io a0c99ef326 [CodeFactor] Apply fixes 2024-11-03 23:47:53 +00:00
codefactor-io e60cf47d3a [CodeFactor] Apply fixes 2024-11-03 23:03:24 +00:00
Miha Kralj f55f630ac6 Add CVI - Chaikin's Volatility class and tests
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).
2024-10-31 11:19:40 -07:00
Miha 6b79f8158c Adx, Adxr, Apo, Dmi 2024-10-27 21:59:46 -07:00
Miha c21b96152c macos dev update 2024-10-26 23:54:55 -07:00
Miha Kralj 70a2ed0b0b Merge branch 'main' into dev 2024-10-24 19:27:20 -07:00
Miha Kralj efc8e553db Rsi and Rsx 2024-10-24 18:30:59 -07:00
Miha Kralj 707d81ff72 MACD histogram 2024-10-23 22:04:21 -07:00
Miha Kralj 7748bdd101 CMO - Chande Momentum Oscillator 2024-10-22 05:46:48 -07:00
Miha Kralj e3d7cd9896 Atr, FlowIndicator and fixes 2024-10-21 16:06:47 -07:00
Miha Kralj fbe4046b5d Documentation 2024-10-16 18:28:06 -07:00