tav

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tav provides a gopy-compatible wrapper for the github.com/banbox/banta/tav library. It modifies functions with multiple return values to return a single array of slices, making them suitable for Python bindings generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADX

func ADX(high, low, close []float64, period int) []float64

ADX calculates the Average Directional Index.

func ADXBy

func ADXBy(high, low, close []float64, period, smoothing, method int) []float64

ADXBy calculates the ADX with specified smoothing and method.

func ALMA

func ALMA(data []float64, period int, sigma, distOff float64) []float64

ALMA calculates the Arnaud Legoux Moving Average.

func ATR

func ATR(high, low, close []float64, period int) []float64

ATR calculates the Average True Range.

func Aroon

func Aroon(high, low []float64, period int) [3][]float64

Aroon calculates the Aroon Indicator. Returns [3][]float64{aroonUp, aroonDown, aroonOscillator}.

func AvgDev

func AvgDev(data []float64, period int) []float64

AvgDev calculates the Average Deviation.

func BBANDS

func BBANDS(data []float64, period int, stdUp, stdDn float64) [3][]float64

BBANDS calculates Bollinger Bands. Returns [3][]float64{upperBand, middleBand, lowerBand}.

func CCI

func CCI(data []float64, period int) []float64

CCI calculates the Commodity Channel Index.

func CHOP

func CHOP(high, low, close []float64, period int) []float64

CHOP calculates the Choppiness Index.

func CMF

func CMF(high, low, close, volume []float64, period int) []float64

CMF calculates the Chaikin Money Flow.

func CMO

func CMO(data []float64, period int) []float64

CMO calculates the Chande Momentum Oscillator.

func CMOBy

func CMOBy(data []float64, period int, maType int) []float64

CMOBy calculates the CMO with a specified MA type.

func CRSI

func CRSI(data []float64, period, upDn, rocVal int) []float64

CRSI calculates the Connors RSI.

func CRSIBy

func CRSIBy(data []float64, period, upDn, rocVal, vtype int) []float64

CRSIBy calculates the Connors RSI with a specified type.

func CTI

func CTI(data []float64, period int) []float64

CTI calculates the Correlation Trend Indicator.

func Cross

func Cross(data1 []float64, data2 []float64) []int

Cross detects crossovers between two data series.

func DV2

func DV2(h, l, c []float64, period, maLen int) []float64

DV2 calculates the DV2 indicator.

func EMA

func EMA(data []float64, period int) []float64

EMA calculates the Exponential Moving Average.

func EMABy

func EMABy(data []float64, period int, initType int) []float64

EMABy calculates the Exponential Moving Average with a specified initialization type.

func ER

func ER(data []float64, period int) []float64

ER calculates the Efficiency Ratio (Kaufman).

func HL2

func HL2(a, b []float64) []float64

HL2 calculates the average of two series (e.g., high and low).

func HLC3

func HLC3(a, b, c []float64) []float64

HLC3 calculates the average of three series (e.g., high, low, and close).

func HMA

func HMA(data []float64, period int) []float64

HMA calculates the Hull Moving Average.

func HeikinAshi

func HeikinAshi(open, high, low, close []float64) [4][]float64

HeikinAshi calculates Heikin-Ashi candlesticks. Returns [4][]float64{haOpen, haHigh, haLow, haClose}.

func Highest

func Highest(data []float64, period int) []float64

Highest finds the highest value over a specified period.

func HighestBar

func HighestBar(data []float64, period int) []float64

HighestBar finds the offset to the highest value bar over a specified period.

func KAMA

func KAMA(data []float64, period int) []float64

KAMA calculates the Kaufman's Adaptive Moving Average.

func KAMABy

func KAMABy(data []float64, period int, fast, slow int) []float64

KAMABy calculates the KAMA with fast and slow periods.

func KDJ

func KDJ(high, low, close []float64, period, sm1, sm2 int) [3][]float64

KDJ calculates the KDJ indicator. Returns [3][]float64{k, d, j}.

func KDJBy

func KDJBy(high, low, close []float64, period int, sm1 int, sm2 int, maBy string) [3][]float64

KDJBy calculates the KDJ indicator with a specified MA type. Returns [3][]float64{k, d, rsv}.

func LinReg

func LinReg(data []float64, period int) []float64

LinReg calculates the Linear Regression.

func LinRegAdv

func LinRegAdv(data []float64, period int, angle, intercept, degrees, r, slope, tsf bool) []float64

LinRegAdv calculates advanced Linear Regression values.

func Lowest

func Lowest(data []float64, period int) []float64

Lowest finds the lowest value over a specified period.

func LowestBar

func LowestBar(data []float64, period int) []float64

LowestBar finds the offset to the lowest value bar over a specified period.

func MACD

func MACD(data []float64, fast, slow, smooth int) [2][]float64

MACD calculates the Moving Average Convergence Divergence. Returns [2][]float64{macd, signal}.

func MACDBy

func MACDBy(data []float64, fast, slow, smooth, initType int) [2][]float64

MACDBy calculates the MACD with a specified initialization type. Returns [2][]float64{macd, signal}.

func MFI

func MFI(high, low, close, volume []float64, period int) []float64

MFI calculates the Money Flow Index.

func PercentRank

func PercentRank(data []float64, period int) []float64

PercentRank calculates the percentile rank of the current value over a period.

func PluMinDI

func PluMinDI(high, low, close []float64, period int) [2][]float64

PluMinDI calculates the Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI). Returns [2][]float64{plusDI, minusDI}.

func PluMinDM

func PluMinDM(high, low, cls []float64, period int) [2][]float64

PluMinDM calculates the Plus Directional Movement (+DM) and Minus Directional Movement (-DM). Returns [2][]float64{plusDM, minusDM}.

func RMA

func RMA(data []float64, period int) []float64

RMA calculates the Wilder's Smoothing Average (Relative Moving Average).

func RMABy

func RMABy(data []float64, period int, initType int, initVal float64) []float64

RMABy calculates the Wilder's Smoothing Average with specified initialization.

func RMI

func RMI(data []float64, period int, montLen int) []float64

RMI calculates the Relative Momentum Index.

func ROC

func ROC(data []float64, period int) []float64

ROC calculates the Rate of Change.

func RSI

func RSI(data []float64, period int) []float64

RSI calculates the Relative Strength Index.

func RSIBy

func RSIBy(data []float64, period int, subVal float64) []float64

RSIBy calculates the Relative Strength Index with a subtraction value.

func SMA

func SMA(data []float64, period int) []float64

SMA calculates the Simple Moving Average.

func STC

func STC(data []float64, period, fast, slow int, alpha float64) []float64

STC calculates the Schaff Trend Cycle.

func StdDev

func StdDev(data []float64, period int) []float64

StdDev calculates the Standard Deviation.

func StdDevBy

func StdDevBy(data []float64, period int, ddof int) [2][]float64

StdDevBy calculates the Standard Deviation with a specified delta degrees of freedom (ddof). Returns [2][]float64{stddev, mean}.

func Stiffness

func Stiffness(data []float64, maLen, stiffLen, stiffMa int) []float64

Stiffness calculates the Stiffness indicator.

func Stoch

func Stoch(high, low, close []float64, period int) []float64

Stoch calculates the Stochastic Oscillator.

func StochRSI

func StochRSI(obj []float64, rsiLen int, stochLen int, maK int, maD int) [2][]float64

StochRSI calculates the Stochastic RSI. Returns [2][]float64{k, d}.

func Sum

func Sum(data []float64, period int) []float64

Sum calculates the rolling sum of a series over a given period.

func TD

func TD(data []float64) []float64

TD calculates the Tom DeMark Sequential.

func TR

func TR(high, low, close []float64) []float64

TR calculates the True Range.

func UTBot

func UTBot(c, atr []float64, rate float64) []float64

UTBot calculates the UT Bot indicator.

func UpDown

func UpDown(data []float64, vtype int) []float64

UpDown classifies price movement as up, down, or flat.

func VWMA

func VWMA(price []float64, volume []float64, period int) []float64

VWMA calculates the Volume Weighted Moving Average.

func WMA

func WMA(data []float64, period int) []float64

WMA calculates the Weighted Moving Average.

func WillR

func WillR(high, low, close []float64, period int) []float64

WillR calculates the Williams %R.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL