Documentation
¶
Index ¶
- func ADX(high, low, close []float64, period int) []float64
- func ADXBy(high, low, close []float64, period, smoothing, method int) []float64
- func ALMA(data []float64, period int, sigma, distOff float64) []float64
- func ATR(high, low, close []float64, period int) []float64
- func Aroon(high, low []float64, period int) ([]float64, []float64, []float64)
- func AvgDev(data []float64, period int) []float64
- func BBANDS(data []float64, period int, stdUp, stdDn float64) ([]float64, []float64, []float64)
- func CCI(data []float64, period int) []float64
- func CHOP(high, low, close []float64, period int) []float64
- func CMF(high, low, close, volume []float64, period int) []float64
- func CMO(data []float64, period int) []float64
- func CMOBy(data []float64, period int, maType int) []float64
- func CRSI(data []float64, period, upDn, rocVal int) []float64
- func CRSIBy(data []float64, period, upDn, rocVal, vtype int) []float64
- func CTI(data []float64, period int) []float64
- func Cross(data1 []float64, data2 []float64) []int
- func DV2(h, l, c []float64, period, maLen int) []float64
- func EMA(data []float64, period int) []float64
- func EMABy(data []float64, period int, initType int) []float64
- func ER(data []float64, period int) []float64
- func HL2(a, b []float64) []float64
- func HLC3(a, b, c []float64) []float64
- func HMA(data []float64, period int) []float64
- func HeikinAshi(open, high, low, close []float64) ([]float64, []float64, []float64, []float64)
- func Highest(data []float64, period int) []float64
- func HighestBar(data []float64, period int) []float64
- func KAMA(data []float64, period int) []float64
- func KAMABy(data []float64, period int, fast, slow int) []float64
- func KDJ(high, low, close []float64, period, sm1, sm2 int) ([]float64, []float64, []float64)
- func KDJBy(high, low, close []float64, period int, sm1 int, sm2 int, maBy string) (k, d, rsv []float64)
- func LinReg(data []float64, period int) []float64
- func LinRegAdv(data []float64, period int, angle, intercept, degrees, r, slope, tsf bool) []float64
- func Lowest(data []float64, period int) []float64
- func LowestBar(data []float64, period int) []float64
- func MACD(data []float64, fast, slow, smooth int) ([]float64, []float64)
- func MACDBy(data []float64, fast, slow, smooth, initType int) ([]float64, []float64)
- func MFI(high, low, close, volume []float64, period int) []float64
- func PercentRank(data []float64, period int) []float64
- func PluMinDI(high, low, close []float64, period int) ([]float64, []float64)
- func PluMinDM(high, low, cls []float64, period int) ([]float64, []float64)
- func RMA(data []float64, period int) []float64
- func RMABy(data []float64, period int, initType int, initVal float64) []float64
- func RMI(data []float64, period int, montLen int) []float64
- func ROC(data []float64, period int) []float64
- func RSI(data []float64, period int) []float64
- func RSIBy(data []float64, period int, subVal float64) []float64
- func SMA(data []float64, period int) []float64
- func STC(data []float64, period, fast, slow int, alpha float64) []float64
- func StdDev(data []float64, period int) []float64
- func StdDevBy(data []float64, period int, ddof int) ([]float64, []float64)
- func Stiffness(data []float64, maLen, stiffLen, stiffMa int) []float64
- func Stoch(high, low, close []float64, period int) []float64
- func StochRSI(obj []float64, rsiLen int, stochLen int, maK int, maD int) ([]float64, []float64)
- func Sum(data []float64, period int) []float64
- func TD(data []float64) []float64
- func TR(high, low, close []float64) []float64
- func UTBot(c, atr []float64, rate float64) []float64
- func UpDown(data []float64, vtype int) []float64
- func VWMA(price []float64, volume []float64, period int) []float64
- func WMA(data []float64, period int) []float64
- func WillR(high, low, close []float64, period int) []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADXBy ¶
ADXBy 可自定义方法的平均方向指数 method=0 经典ADX计算方法 method=1 TradingView "ADX and DI for v4"方法 smoothing=0 表示使用period作为平滑周期 返回 adx值数组
func ALMA ¶
ALMA Arnaud Legoux Moving Average
period: window size. sigma: Smoothing value. distOff: min 0 (smoother), max 1 (more responsive).
func CMOBy ¶
CMOBy 计算Chande Momentum Oscillator maType: 0: ta-lib (Wilder's smoothing) 1: tradingView (simple moving sum)
func CTI ¶
CTI Correlation Trend Indicator 并行版本 CTI是一个由John Ehler在2020年创建的振荡器 它根据价格范围内的价格接近正斜率或负斜率直线的程度来分配值 值范围从-1到1,建议周期:20 当前是性能优化版本,快20%;等同于LinRegAdv(data, period, false, false, false, true, false, false)
func Cross ¶
Cross 计算两个序列在每个时间点的交叉状态。 返回值:正数表示上穿,负数表示下穿,0表示无交叉或未知。 返回值的绝对值减1 (abs(ret) - 1) 代表了最近一次交叉点到当前元素的距离。
func DV2 ¶
DV2 Developed by David Varadi of http://cssanalytics.wordpress.com/
This is the batch-calculation (parallel) version of the DV2 indicator.
func HMA ¶
HMA an implementation of Hull Moving Average. This is a high-performance version for batch calculation.
func HeikinAshi ¶
HeikinAshi 并行版本,返回 [open, high, low, close] 数组 参数:开盘价、最高价、最低价、收盘价数组
func Highest ¶
Highest finds the highest value over a preceding period for each point. No changes needed as it relies on the correct slidingWindow implementation.
func HighestBar ¶
HighestBar finds the offset of the highest bar in a preceding period.
func Lowest ¶
Lowest finds the lowest value over a preceding period for each point. No changes needed as it relies on the correct slidingWindow implementation.
func PercentRank ¶
func StochRSI ¶
StochRSI StochasticRSI,对应 sta_inds.go 中的 StochRSI rsiLen: RSI周期, stochLen: Stoch周期, maK: K线SMA周期, maD: D线SMA周期 返回 [fastK, fastD]
Types ¶
This section is empty.