12 Commits
Author SHA1 Message Date
beejay 5dcbd4a1cf feat(pattern_recognitions): add 25 remaining Cdl* candlestick pattern wrappers
Complete the TA-Lib candlestick pattern recognition coverage by adding the second
half of the Cdl* function family.

New functions in pattern_recognitions.go (all return []int32, OHLC inputs):
  CdlLadderBottom, CdlLongLeggedDoji, CdlLongLine, CdlMarubozu,
  CdlMatchingLow, CdlMatHold(penetration), CdlMorningDojiStar(penetration),
  CdlMorningStar(penetration), CdlOnNeck, CdlPiercing, CdlRickshawMan,
  CdlRiseFall3Methods, CdlSeparatingLines, CdlShootingStar, CdlShortLine,
  CdlSpinningTop, CdlStalledPattern, CdlStickSandwich, CdlTakuri,
  CdlTasukiGap, CdlThrusting, CdlTristar, CdlUnique3River,
  CdlUpsideGap2Crows, CdlXSideGap3Methods

Supporting changes:
- functions.go: add 25 C function pointer declarations (TA_CDL* signatures)
- loader.go: register all 25 new symbols via purego.RegisterLibFunc in Load()
- cli/main.go: extend smoke harness to exercise all new wrappers
- README.md: document all new patterns in the Pattern Recognition section
2026-07-29 16:24:47 +09:00
beejay c7f21b073e feat: add CMOU and candlestick pattern wrappers
- add CMOU momentum wrapper in `momentum_indicators.go`
- add `Cdl*` pattern-recognition wrappers in `pattern_recognitions.go`
- register `TA_CMOU` and `TA_CDL*` symbols in `loader.go`
- add corresponding function pointer signatures in `functions.go`
- sync `README.md` with CMOU and pattern-recognition API docs
2026-07-28 16:23:50 +09:00
beejay 88997a62ef feat: add volatility and volume indicator wrappers via purego
- add TA-Lib function pointer signatures for ATR/NATR/TRANGE and AD/ADOSC/CMF/NVI/OBV/PVI/PVO in functions.go
- register new native symbols in loader.go
- add new wrapper sources: volatility_indicators.go and volume_indicators.go
- update README function matrix with new volatility and volume categories
- add ta-lib upstream as a git submodule (.gitmodules + ta-lib gitlink)
2026-07-28 14:20:52 +09:00
beejay b3ad421c76 feat(loader): make Load idempotent and expose TA-Lib version API
- guard library initialization with sync.Once to avoid duplicate registrations
- refactor loading logic into internalLoad()
- register TA_GetVersionString and expose Version()
- document Version() usage and API behavior in README
2026-07-28 12:25:24 +09:00
beejay fc504d0c01 feat(stats): add regression and volatility wrappers
- add native TA-Lib bindings in functions.go for beta, correl, linear regression, stddev, tsf, and variance
- register the new TA-Lib symbols in loader.go
- add public wrappers in statistic_functions.go for Beta, Correl, LinearReg, LinearRegAngle, LinearRegIntercept, LinearRegSlope, StdDev, TSF, and Var
- update README.md to document Price Transforms and Statistic Functions
2026-07-27 18:10:46 +09:00
beejay 7cf9ab6e24 feat(price-transform): add price transform and statistic function wrappers
New file price_transform.go implements five new public wrappers:
- AvgPrice  (TA_AVGPRICE)  – mean of OHLC per bar
- MedPrice  (TA_MEDPRICE)  – (High + Low) / 2
- TypPrice  (TA_TYPPRICE)  – (High + Low + Close) / 3
- WCLPrice  (TA_WCLPRICE)  – (High + Low + 2×Close) / 4
- AvgDev    (TA_AVGDEV)    – rolling average absolute deviation from SMA

- add corresponding low-level function pointer signatures in functions.go
- register all five symbols in Load() in loader.go
- update README.md with Price Transforms and Statistic Functions sections
2026-07-27 16:52:33 +09:00
beejay f1c96eaf1d feat(overlap): add advanced overlap studies wrappers and wire TA-Lib symbols
- add TA-Lib function pointer signatures in functions.go for:
  MA, MAMA, MAVP, MIDPOINT, MIDPRICE, SAR, SAREXT, SMA, T3, TEMA, TRIMA, WMA
- register new symbols in Load() via purego.RegisterLibFunc in loader.go
- add public overlap study wrappers in overlap_studies.go with consistent nil-on-failure behavior
- update README overlap studies list to match implemented API
2026-07-27 16:04:46 +09:00
beejay 89d990ff1b feat: add overlap studies wrappers and align indicator API names
- add TA-Lib bindings and loader registrations for overlap studies:
  TA_ACCBANDS, TA_BBANDS, TA_DEMA, TA_EMA, TA_HT_TRENDLINE, TA_KAMA
- add new public wrappers in overlap_studies.go:
  AccBands, BBands, DEMA, EMA, HT_TRENDLINE, KAMA
- refactor momentum wrapper names to consistent Go-style exports
  (e.g. Aroon/AroonOsc, MACDExt/MACDFix, Stoch/StochF/StochRSI,
  MinusDI/MinusDM, PlusDI/PlusDM, Trix, UltOsc, WillR)
- rename MAType constants to MA_* for clearer namespacing
- update README to reflect the current exported API and overlap coverage
2026-07-24 18:27:36 +09:00
beejay 4b07e7c741 feat: add momentum indicators and expand function coverage
Add a full Momentum Indicators category (momentum_indicators.go) with
26 new wrapped functions:

  ADX, ADXR, APO, AROON, AROONOSC, BOP, CCI, CMO, DX, IMI,
  MACD, MACDEXT, MACDFIX, MFI, MOM, MINUS_DI, MINUS_DM,
  PLUS_DI, PLUS_DM, PPO, ROC, ROCP, ROCR, ROCR100, RSI,
  STOCH, STOCHF, STOCHRSI, TRIX, ULTOSC, WILLR

- Register all new native symbols in Load() (loader.go)
- Declare corresponding native function variables in functions.go
- Add MAType enum (ta_ma_type.go) for MA-type parameters (SMA, EMA,
  WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3)
- Add taResult constants (ta_result.go) mirroring TA-Lib return codes
- Each wrapper includes a doc comment with formula, interpretation, and
  known behavioral edge-case notes
2026-07-24 13:37:34 +09:00
beejay e77cd88cd9 feat: expand TA-Lib wrapper with math transform functions
- Add 13 new math transform functions: Cos, Sin, Tan, ACos, ASin, ATan, CosH, SinH, TanH, Ceil, Exp, Floor, Sqrt, Ln, Log10
- Implement proper TA-Lib bindings for all math transform operations
- Add comprehensive documentation comments to all new functions
- Standardize error handling across all wrapper functions using slog.Debug
- Refactor function definitions for consistency and maintainability

The wrapper now exposes a comprehensive set of mathematical operations from TA-Lib,
including trigonometric, hyperbolic, exponential, logarithmic, and rounding functions.
All functions follow the established pattern of vector element-wise transformations.
2026-07-23 11:05:32 +09:00
beejay e0715fb3e3 feat: add math operator wrappers and align TA-Lib binding types
Add Go wrappers for additional TA-Lib math operators:
Div, Max, MaxIndex, Min, MinIndex, MinMax, MinMaxIndex, Mult, Sub, and Sum.

Refactor the TA-Lib function signatures to use int32 consistently,
including taResult and Hilbert Transform bindings, so the Go layer
matches the native library more closely.

Fix HT_TRENDMODE to return []int32 and update related comments and
naming for better API consistency.
2026-07-22 17:18:22 +09:00
beejay 1ce0c19fd5 initial commit 2026-07-22 15:40:16 +09:00