1 Star 0 Fork 0

younland / godas

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
llvbars.go 476 Bytes
一键复制 编辑 原始数据 按行查看 历史
package formula
import "gitee.com/younland/godas/stat"
// LLVBARS 求上一低点到当前的周期数.
//
// 用法:
// LLVBARS(X,N):求N周期内X最低值到当前周期数,N=0表示从第一个有效值开始统计
// 例如:
// LLVBARS(HIGH,20)求得20日最低点到当前的周期数
func LLVBARS(S stat.Series, N any) stat.Series {
x := S.Rolling(N).Apply(func(X stat.Series, W stat.DType) stat.DType {
return stat.Any2DType(X.Reverse().ArgMin())
})
return x
}
1
https://gitee.com/younland/godas.git
git@gitee.com:younland/godas.git
younland
godas
godas
v1.0.1

搜索帮助