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
This commit is contained in:
2026-07-27 16:52:33 +09:00
parent f1c96eaf1d
commit 7cf9ab6e24
4 changed files with 211 additions and 0 deletions
+54
View File
@@ -876,4 +876,58 @@ var (
outNBElement *int32,
outReal []float64,
) int32
avgdev func(
startIdx int32,
endIdx int32,
inReal []float64,
optInTimePeriod int32,
outBegIdx *int32,
outNBElement *int32,
outReal []float64,
) int32
avgprice func(
startIdx int32,
endIdx int32,
inOpen []float64,
inHigh []float64,
inLow []float64,
inClose []float64,
outBegIdx *int32,
outNBElement *int32,
outReal []float64,
) int32
medprice func(
startIdx int32,
endIdx int32,
inHigh []float64,
inLow []float64,
outBegIdx *int32,
outNBElement *int32,
outReal []float64,
) int32
typprice func(
startIdx int32,
endIdx int32,
inHigh []float64,
inLow []float64,
inClose []float64,
outBegIdx *int32,
outNBElement *int32,
outReal []float64,
) int32
wclprice func(
startIdx int32,
endIdx int32,
inHigh []float64,
inLow []float64,
inClose []float64,
outBegIdx *int32,
outNBElement *int32,
outReal []float64,
) int32
)