54 Commits

Author SHA1 Message Date
Miha Kralj c98b0e2a57 feat: add EPA (Ehlers Phasor Analysis) indicator - TASC Nov 2022 2026-03-19 09:22:04 -07:00
Miha Kralj b1302a4761 feat: add FSI (Ehlers Fourier Series Indicator, TASC June 2019) 2026-03-18 19:58:53 -07:00
Miha Kralj b79b56dc65 feat: add TBF (Ehlers Truncated BandPass Filter) + fix all 64 warnings
TBF indicator:
- Sealed class with RingBuffer, stackalloc scratch, O(Length) per bar
- 7 core files: Tbf.cs, Tbf.Quantower.cs, Tbf.md, tbf.pine, 3 test files
- 67 tests (48 lib + 19 Quantower) all passing
- Full integration: sidebar, indexes, docs, Python bridge, exports

AMFM fix:
- Added envBuf.Clear()/smaBuf.Clear() after stackalloc in Batch
  (SkipLocalsInit garbage values caused 8.97e+65 blowup)

Warning fixes (64 → 0):
- Amfm.cs: S125 commented code removed, 11× IDE0011 braces
- Pta.cs: 11× IDE0011 braces on if/else/for/foreach
- Pta.Tests.cs: 14× IDE0011, S1481 unused var, S2699 assertion, 2× MA0074
- Lpf.Quantower.Tests.cs: 2× MA0074 StringComparison

Build: 0 warnings, 0 errors, 20,048 tests passing
2026-03-18 19:10:48 -07:00
Miha Kralj 6ac30d37e6 feat: add LPF - Ehlers Linear Predictive Filter (TASC Jan 2025)
Implements Ehlers' Linear Predictive Filter for dominant cycle detection:
- Roofing filter (HP + SuperSmoother) → AGC → Griffiths adaptive predictor
- DFT spectrum from predictor coefficients → Center of Gravity dominant cycle
- Outputs: DominantCycle, Signal (AGC-normalized), Predict (one-bar-ahead)

Files added:
- lib/cycles/lpf/Lpf.cs (core implementation, sealed class)
- lib/cycles/lpf/Lpf.Quantower.cs (3 LineSeries: Cycle, Signal, Predict)
- lib/cycles/lpf/Lpf.md (canonical template v3 documentation)
- lib/cycles/lpf/lpf.pine (PineScript v6 reference)
- lib/cycles/lpf/tests/Lpf.Tests.cs (38 unit tests)
- lib/cycles/lpf/tests/Lpf.Quantower.Tests.cs (22 adapter tests)

Updated: index files, Python bridge (Exports.cs, _bridge.py, cycles.py)
2026-03-17 20:24:54 -07:00
Miha Kralj aec3a64e4e feat(dynamics): add PTA - Ehlers Precision Trend Analysis
TASC Sep 2024. Dual 2-pole Butterworth highpass bandpass for
near-zero-lag trend extraction. HP(long) - HP(short) preserves
cycles between shortPeriod and longPeriod.

- Core: Pta.cs with O(1) streaming, Span batch, state rollback
- Quantower: PtaIndicator adapter with LineSeries + SetValue
- Tests: 31 lib + 11 Quantower (all passing)
- Pine: pta.pine PineScript v6 reference
- Docs: Pta.md canonical template v3
- Python: Exports.Generated.cs + _bridge.py + dynamics.py
- Indexes: _sidebar.md, lib/_index.md, dynamics/_index.md,
  docs/indicators.md, docs/pinescript.md
2026-03-17 17:25:17 -07:00
Miha Kralj 84d12e5706 feat: add USI (Ehlers Ultimate Strength Index) - TASC Nov 2024 2026-03-17 16:44:48 -07:00
Miha Kralj d3cb9d2513 feat(cycles): add AMFM - Ehlers AM Detector / FM Demodulator 2026-03-17 15:56:55 -07:00
Miha Kralj 8112009b32 feat(filters): add NET - Ehlers Noise Elimination Technology (TASC Dec 2020) 2026-03-17 14:38:31 -07:00
Miha Kralj f7dcc20f7c feat: add EEO (Ehlers Elegant Oscillator) - TASC Feb 2022 2026-03-17 14:18:57 -07:00
Miha Kralj b4523b5cca feat: add MADH (Ehlers Moving Average Difference with Hann) indicator 2026-03-17 13:48:34 -07:00
Miha Kralj 4fa29c04b7 feat: add DMH (Ehlers Directional Movement with Hann) indicator 2026-03-17 13:35:03 -07:00
Miha Kralj 4552d8529d feat: add RSIH (Ehlers Hann-Windowed RSI) indicator 2026-03-17 12:40:55 -07:00
Miha Kralj 7db48e2418 feat(oscillators): add DSO - Ehlers Deviation-Scaled Oscillator
Implement DSO (TASC Oct 2018) with SSF 2-pole filter, RMS normalization,
and Fisher Transform (±0.99 clamp). Sealed class, O(1) streaming RMS via
RingBuffer, precomputed SSF coefficients.

New files: Dso.cs, Dso.Quantower.cs, Dso.md, dso.pine,
  Dso.Tests.cs (27), Dso.Validation.Tests.cs (7), Dso.Quantower.Tests.cs (11)

Updated: Exports.cs, _bridge.py, oscillators.py, SPEC.md,
  _sidebar.md, lib/_index.md, oscillators/_index.md,
  docs/indicators.md, docs/pinescript.md

All 19,565 tests pass, 0 warnings.
2026-03-17 11:59:04 -07:00
Miha Kralj 5fc6e27d8e Rename EACP to ACP across entire codebase
- Renamed directory lib/cycles/eacp → lib/cycles/acp
- Renamed class Eacp → Acp, EacpIndicator → AcpIndicator
- Renamed all files: Eacp.cs → Acp.cs, Eacp.Quantower.cs → Acp.Quantower.cs,
  eacp.md → acp.md, eacp.pine → acp.pine, and all test files
- Updated display names: EACP → ACP in Quantower Name/ShortName properties
- Updated all documentation surfaces: _sidebar.md, lib/_index.md,
  lib/cycles/_index.md, docs/indicators.md, docs/validation.md,
  docs/pinescript.md, lib/cycles/cg/cg.md cross-reference
- Updated Python bridge: qtl_eacp → qtl_acp entry point, _bridge.py,
  cycles.py wrapper, SPEC.md, test_shapes.py, run_all_exported
- All 83 tests pass (38 AcpTests + 22 AcpValidationTests + 23 AcpIndicatorTests)
- Build: 0 warnings, 0 errors across all projects
2026-03-17 11:35:11 -07:00
Miha Kralj 329b0657bc Add "Ehlers" prefix to 5 Ehlers indicators: SAM, PMA, ILRS, CTI, RVGI
Standardize naming convention so all Ehlers-originated indicators
have "Ehlers" in their display name across all documentation and
code surfaces:

- SAM: Smoothed Adaptive Momentum → Ehlers Smoothed Adaptive Momentum
- PMA: Predictive Moving Average → Ehlers Predictive Moving Average
- ILRS: Integral of LinReg Slope → Ehlers Integral of LinReg Slope
- CTI: Correlation Trend Indicator → Ehlers Correlation Trend Indicator
- RVGI: Relative Vigor Index → Ehlers Relative Vigor Index

Updated across: .md H1 titles, XML doc summaries, Quantower Name
properties, Quantower test assertions, _sidebar.md, lib/_index.md,
category _index.md files, docs/indicators.md, docs/validation.md.

Build: 0 warnings, 0 errors. All tests pass.
2026-03-17 10:51:24 -07:00
Miha Kralj 6f0a339c9b fix: resolve build and test errors
- Sar.Quantower.Tests.cs: add missing opening quote on string literal (line 48)
- Exports.cs: rename Correlation.Batch → Correl.Batch (CS0103)
- Ad.Validation.Tests.cs: fix Ooples OutputValues key "Ad" → "Adl"
2026-03-16 12:45:13 -07:00
Miha Kralj e3bd07aa87 feat: add ADF (Augmented Dickey-Fuller) indicator
- Core implementation with Cholesky OLS, MacKinnon p-value, AIC lag selection
- Three regression models: NoConstant, Constant, ConstantAndTrend
- NormCdf via Abramowitz & Stegun 7.1.26 erf approximation
- Quantower adapter, Python bridge (NativeAOT export + ctypes + wrapper)
- 69 tests (41 unit + 12 validation + 14 Quantower + 2 consistency)
- Documentation with Schwert table, MacKinnon coefficients, PineScript ref
- All 19,095 tests pass, zero warnings
2026-03-15 17:56:54 -07:00
Miha Kralj b9783f7c03 docs: sweep all indicator references — fix paths, add missing entries, sort alphabetically
_sidebar.md:
- Fix 4 wrong DI/DM paths (minus_di→minusdi, minus_dm→minusdm, plus_di→plusdi, plus_dm→plusdm)
- Sort Dynamics section alphabetically
- Add DECAY and EDECAY to Numerics section

lib/dynamics/_index.md:
- Fix HT_TRENDMODE link (Httrendmode.md→HtTrendmode.md)
- Sort all 25 indicators alphabetically

lib/core/_index.md:
- Sort all 8 indicators alphabetically (HA was out of order)

docs/indicators.md:
- FIR: Replace with all 33 entries sorted
- IIR: Replace with all 36 entries sorted
- Filters: Add SAK (now 37 entries)
- Oscillators: Add 17 missing (BBI, BRAR, COPPOCK, CRSI, CTI, DOSC, ER, ERI, FI, KRI, KST, MSTOCH, PSL, QQE, RVGI, SQUEEZE, TD_SEQ) — now 48 entries
- Dynamics: Sort all 25 entries alphabetically
- Statistics: Add POLYFIT, TRIM, WAVG, WINS — now 35 entries sorted
- Numerics: Add FFT, IFFT — now 31 entries sorted
- Core: Add HA — now 8 entries sorted

Total: 402 indicators across 16 categories, all cross-referenced.
2026-03-11 20:36:36 -07:00
Miha Kralj 7ec79538aa refactor: move Decay/Edecay from trends_IIR to numerics; update filter signatures
- Move lib/trends_IIR/decay/ → lib/numerics/decay/
- Move lib/trends_IIR/edecay/ → lib/numerics/edecay/
- Update Category in Decay.md/Edecay.md from Trends (IIR) to Numerics
- Add DECAY/EDECAY entries to lib/numerics/_index.md and docs/indicators.md
- Update filter signature .md files and .svg assets
- Update trends_IIR signature docs (htit, mama, holt, etc.)
- All 163 tests passing, 0 warnings, 0 errors
2026-03-10 20:33:55 -07:00
Miha Kralj 031f1b5fe6 feat: add new indicators (Decay, Edecay, MinusDi, MinusDm, PlusDi, PlusDm, Maxindex, Minindex, Sarext) and update pine scripts, core libs, validation tests, and python bindings 2026-03-09 13:45:46 -07:00
Miha Kralj 83e9511261 python wrapper 2026-02-28 14:14:35 -08:00
Miha Kralj 8a1ba95173 validation and profiles 2026-02-26 22:02:52 -08:00
Miha Kralj 9ab37c1200 adding missing validations 2026-02-26 09:59:44 -08:00
Miha Kralj 467a8c1cef filters update 2026-02-23 17:27:35 -08:00
Miha Kralj 7253f61299 Add TRAMA implementation and comprehensive tests
- Implemented the TRAMA (Trend Regularity Adaptive Moving Average) class with adaptive EMA logic.
- Added unit tests for TRAMA functionality, including constructor validation, basic calculations, state management, and robustness checks.
- Created validation tests to ensure consistency across different modes of operation (streaming, batch, and static calculations).
- Enhanced documentation for TRAMA, including performance profiles and quality metrics.
- Updated workspace configuration by removing unnecessary folder references.
2026-02-21 20:45:38 -08:00
Miha Kralj cbeefc9d64 Remove multiple Pine Script indicators: SSFDSP, STARCHANNEL, STBANDS, STC, UBANDS, UCHANNEL, VWAPBANDS, and VWAPSD. These indicators were deleted to streamline the library and remove unused or redundant code. 2026-02-20 18:44:56 -08:00
Miha Kralj 3dd05f23e4 Refactor indicators to include "Ehlers" in names and descriptions for clarity
- Updated the name and description of the Hilbert Trendline (HTIT) to "Ehlers Hilbert Transform Instantaneous Trend (HTIT)".
- Changed the name and description of the MESA Adaptive Moving Average (MAMA) to "Ehlers MESA Adaptive Moving Average".
- Modified the Center of Gravity (CG) indicator to "Ehlers Center of Gravity (CG)".
- Renamed the Detrended Synthetic Price (DSP) to "Ehlers Detrended Synthetic Price (DSP)".
- Updated the Autocorrelation Periodogram (EACP) to "Ehlers Autocorrelation Periodogram (EACP)".
- Changed the Homodyne Discriminator (HOMOD) to "Ehlers Homodyne Discriminator (HOMOD)".
- Updated the Hilbert Transform Dominant Cycle Period and Phase indicators to include "Ehlers" in their names.
- Renamed the Hilbert Transform Phasor Components to "Ehlers Hilbert Transform Phasor Components (HT_PHASOR)".
- Updated the SineWave indicator to "Ehlers Hilbert Transform SineWave (HT_SINE)".
- Changed the Phasor Analysis indicator to "Ehlers Hilbert Transform Phasor Components (HT_PHASOR)".
- Updated the SSF-Based Detrended Synthetic Price to "Ehlers SSF Detrended Synthetic Price (SSFDSP)".
- Renamed the Ultimate Channel to "Ehlers Ultimate Channel (UCHANNEL)".
- Added new indicators: Moving Average Variable Period (MAVP), Ehlers Predictive Moving Average (PMA), Ehlers Reverse EMA (REVERSEEMA), and Ehlers Trendflex Indicator (TRENDFLEX).
- Updated various SVG badges to reflect changes in classes, comments, source files, lines of code, methods, and public types.
2026-02-18 19:08:15 -08:00
Miha Kralj 24e86d762a Add documentation links for various volatility indicators and channels
- Updated BBWN, BBWP, CCV, CV, CVI, EWMA, GKV, HLV, HV, Jvolty, JVOLTYN, MASSI, NATR, RSV, RV, RVI, TR, UI, VOV, VR, YZV indicators with documentation links.
- Added documentation links for Aberration, Acceleration Bands, Andrews' Pitchfork, Adaptive Price Zone, ATR Bands, Bollinger Bands, Center of Gravity, Donchian Channels, Decay Min-Max Channel, Detrended Synthetic Price, EACP, EBSW, HOMOD, Jurik Volatility Bands, Keltner Channel, MA Envelope, Min-Max Channel, Price Channel, Regression Channels, Standard Deviation Channel, Stoller Average Range Channel, Super Trend Bands, Ultimate Bands, Ultimate Channel, VWAP Bands, and VWAP with Standard Deviation Bands.
2026-02-18 11:55:48 -08:00
Miha Kralj 63ae2c9ab2 Add TTM Scalper indicator implementation in C# and Pine Script; update Blma class for average calculation; remove missing indicators report and oscillator docs rewrite plans. 2026-02-16 21:26:44 -08:00
Miha Kralj b3a64f18fa Implement ZTEST: One-Sample t-Test Statistic with validation tests
- Added Ztest class to compute the one-sample t-statistic using sample standard deviation with Bessel correction.
- Implemented validation tests for Ztest to ensure accuracy against manual calculations and PineScript.
- Updated documentation for Ztest, detailing its mathematical foundation, performance profile, and common pitfalls.
- Adjusted NDepend badges to reflect changes in code metrics after implementation.
- Updated missing indicators report to reflect the completion of statistical indicators, including ZTEST.
2026-02-16 16:54:36 -08:00
Miha Kralj 09ffd31a40 Update SVG badges and missing indicators report
- Updated class count in classes.svg from 938 to 1078.
- Adjusted comments percentage in comments.svg from 33.06 to 33.02.
- Revised average cyclomatic complexity in complexity.svg from 2.19 to 2.12.
- Increased source files count in files.svg from 1099 to 1275.
- Updated lines of code in loc.svg from 114549 to 129859.
- Increased methods count in methods.svg from 12035 to 14066.
- Updated public types count in public-api.svg from 1086 to 1225.
- Revised missing indicators report with updated counts and categories, reflecting recent implementations and planned additions.
2026-02-15 21:59:03 -08:00
Miha Kralj dfeb23bf3d Add Savitzky-Golay Moving Average (SGMA) Indicator Implementation
- Implemented SgmaIndicator class in C# with properties for Period, Degree, and Source.
- Added unit tests for SgmaIndicator covering constructor defaults, initialization, and various update scenarios.
- Created a new Quantower adapter for the SGMA indicator, including input parameters and line series setup.
- Removed legacy SGMA implementation and tests to streamline the codebase.
- Updated project files to include new indicator and tests in the build process.
- Generated a missing indicators report and outlined a plan for oscillator documentation rewrite.
2026-02-13 21:44:45 -08:00
Miha Kralj 951842acca Add validation tests for various volume and momentum indicators
- Introduced Massi validation tests to ensure mathematical properties hold for the Mass Index indicator.
- Added Va validation tests for Volume Accumulation, checking for finite outputs and correct accumulation behavior.
- Implemented Vf validation tests for Volume Force, verifying outputs for rising and falling prices, and ensuring batch and streaming results match.
- Created Vo validation tests for Volume Oscillator, confirming behavior with constant, increasing, and decreasing volumes.
- Developed Vroc validation tests for Volume Rate of Change, validating outputs for constant volume and changes in volume.
- Updated project file to include new momentum indicators (MACD and RSI) in the compilation.
2026-02-12 19:43:09 -08:00
Miha Kralj 92709ef2ed Add Stochastic Oscillator implementation and validation tests
- Implemented Stochastic Oscillator (%K and %D) in Stoch.cs with streaming and batch processing capabilities.
- Added validation tests for the Stochastic Oscillator in Stoch.Validation.Tests.cs, ensuring consistency with Skender.Stock.Indicators.
- Created documentation for the Stochastic Oscillator in Stoch.md, detailing its mathematical formula, architecture, parameters, and common pitfalls.
- Updated project file to include necessary numeric libraries for highest and lowest calculations.
2026-02-12 14:29:54 -08:00
Miha Kralj 6d6259a47d normalization of methods 2026-02-10 21:33:16 -08:00
Miha Kralj 95838a6435 Add SSF-DSP implementation with validation tests and documentation
- Implemented the SSF-DSP (Super Smooth Filter Detrended Synthetic Price) indicator using dual Super Smooth Filters.
- Added validation tests to ensure correctness against PineScript implementation and mathematical properties.
- Created comprehensive documentation outlining the architecture, mathematical foundation, performance profile, and common pitfalls.
- Included batch processing capabilities for efficient calculations on time series data.
2026-02-04 20:58:05 -08:00
Miha Kralj c034cbd5e5 Add Yang-Zhang Volatility (YZV) Indicator Implementation
- Introduced YZV class for calculating Yang-Zhang Volatility, a comprehensive volatility measure that incorporates overnight, open-to-close, and high-low components.
- Implemented calculation methods, including batch processing for TBarSeries and spans.
- Added documentation for YZV, detailing its mathematical foundation, performance profile, and trading applications.
- Updated volume index documentation to reflect changes in file paths.
- Refactored VWMA calculation method to use a more generic source parameter instead of price.
2026-02-02 19:47:21 -08:00
Miha Kralj 7b3a6520d2 volume indicators 2026-01-30 12:47:25 -08:00
Miha Kralj fdfbfd98f0 Add Starchannel indicator implementation and validation tests
- Implemented the Starchannel class, which calculates a volatility-based envelope using SMA as the middle line and ATR for band width.
- Added methods for updating the indicator with new data, batch calculations, and state management.
- Created comprehensive unit tests for the Starchannel indicator, validating various scenarios including manual calculations, consistency across modes, eventing, and handling of large datasets.
- Ensured that the indicator's outputs are finite and that band widths are consistent across different calculation modes.
2026-01-21 17:21:29 -05:00
Miha Kralj 3eae9a76fe Add Standard Deviation Channel (SDCHANNEL) implementation and documentation
- Implemented Sdchannel class for calculating standard deviation channels based on linear regression.
- Added detailed documentation for SDCHANNEL, including overview, calculation methods, and interpretation.
- Updated project files to include new numerics library components in Channels and Volatility projects.
2026-01-21 14:41:31 -05:00
Miha Kralj 86fe32a682 SIMD Refactor: Merge simd-dev into dev (#55)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
Co-authored-by: Warp <agent@warp.dev>
2026-01-18 19:02:03 -08:00
Miha Kralj d475bcd19a New version merge 2024-09-22 17:31:24 -07:00
Miha Kralj 56f8db2949 Update main automation workflow to use wildcard for dotcover report path 2023-05-04 08:40:37 -07:00
Miha Kralj 167f20e3a8 fix on JMA 2023-03-19 18:35:34 -07:00
Miha Kralj 6db1ba7562 SMA docs 2023-01-07 22:32:33 -08:00
Miha Kralj 5e13da7532 Pandas-TA test engine update to Python 3.11.1 2023-01-06 11:58:14 -08:00
Miha Kralj 7a0279b3d5 Decay 2023-01-05 16:40:08 -08:00
Miha Kralj ca54856a66 Fibonacci Moving Average 2023-01-04 13:51:57 -08:00
Miha Kralj 83e5d89cbb HWMA 2022-12-27 12:28:53 -08:00
Miha Kralj 509bf244d9 Documentation 2022-12-26 20:12:56 -08:00