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:
@@ -114,6 +114,12 @@ func Load() (uintptr, error) {
|
||||
purego.RegisterLibFunc(&trima, ptr, "TA_TRIMA")
|
||||
purego.RegisterLibFunc(&wma, ptr, "TA_WMA")
|
||||
|
||||
purego.RegisterLibFunc(&avgdev, ptr, "TA_AVGDEV")
|
||||
purego.RegisterLibFunc(&avgprice, ptr, "TA_AVGPRICE")
|
||||
purego.RegisterLibFunc(&medprice, ptr, "TA_MEDPRICE")
|
||||
purego.RegisterLibFunc(&typprice, ptr, "TA_TYPPRICE")
|
||||
purego.RegisterLibFunc(&wclprice, ptr, "TA_WCLPRICE")
|
||||
|
||||
return ptr, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user