Documentation ¶
Overview ¶
Package talib is a pure Go port of TA-Lib (http://ta-lib.org) Technical Analysis Library
Index ¶
- func Acos(inReal []float64) []float64
- func Ad(inHigh []float64, inLow []float64, inClose []float64, inVolume []float64) []float64
- func AdOsc(inHigh []float64, inLow []float64, inClose []float64, inVolume []float64, ...) []float64
- func Add(inReal0 []float64, inReal1 []float64) []float64
- func Adx(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func AdxR(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func Apo(inReal []float64, inFastPeriod int, inSlowPeriod int, inMAType MaType) []float64
- func Aroon(inHigh []float64, inLow []float64, inTimePeriod int) ([]float64, []float64)
- func AroonOsc(inHigh []float64, inLow []float64, inTimePeriod int) []float64
- func Asin(inReal []float64) []float64
- func Atan(inReal []float64) []float64
- func Atr(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func AvgPrice(inOpen []float64, inHigh []float64, inLow []float64, inClose []float64) []float64
- func BBands(inReal []float64, inTimePeriod int, inNbDevUp float64, inNbDevDn float64, ...) ([]float64, []float64, []float64)
- func Beta(inReal0 []float64, inReal1 []float64, inTimePeriod int) []float64
- func Bop(inOpen []float64, inHigh []float64, inLow []float64, inClose []float64) []float64
- func Cci(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func Ceil(inReal []float64) []float64
- func Cmo(inReal []float64, inTimePeriod int) []float64
- func Correl(inReal0 []float64, inReal1 []float64, inTimePeriod int) []float64
- func Cos(inReal []float64) []float64
- func Cosh(inReal []float64) []float64
- func Crossover(series1 []float64, series2 []float64) bool
- func Crossunder(series1 []float64, series2 []float64) bool
- func Dema(inReal []float64, inTimePeriod int) []float64
- func Div(inReal0 []float64, inReal1 []float64) []float64
- func Dx(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func Ema(inReal []float64, inTimePeriod int) []float64
- func Exp(inReal []float64) []float64
- func Floor(inReal []float64) []float64
- func GroupCandles(highs []float64, opens []float64, closes []float64, lows []float64, ...) ([]float64, []float64, []float64, []float64, error)
- func HeikinashiCandles(highs []float64, opens []float64, closes []float64, lows []float64) ([]float64, []float64, []float64, []float64)
- func Hlc3(highs []float64, lows []float64, closes []float64) []float64
- func HtDcPeriod(inReal []float64) []float64
- func HtDcPhase(inReal []float64) []float64
- func HtPhasor(inReal []float64) ([]float64, []float64)
- func HtSine(inReal []float64) ([]float64, []float64)
- func HtTrendMode(inReal []float64) []float64
- func HtTrendline(inReal []float64) []float64
- func Kama(inReal []float64, inTimePeriod int) []float64
- func LinearReg(inReal []float64, inTimePeriod int) []float64
- func LinearRegAngle(inReal []float64, inTimePeriod int) []float64
- func LinearRegIntercept(inReal []float64, inTimePeriod int) []float64
- func LinearRegSlope(inReal []float64, inTimePeriod int) []float64
- func Ln(inReal []float64) []float64
- func Log10(inReal []float64) []float64
- func Ma(inReal []float64, inTimePeriod int, inMAType MaType) []float64
- func MaVp(inReal []float64, inPeriods []float64, inMinPeriod int, inMaxPeriod int, ...) []float64
- func Macd(inReal []float64, inFastPeriod int, inSlowPeriod int, inSignalPeriod int) ([]float64, []float64, []float64)
- func MacdExt(inReal []float64, inFastPeriod int, inFastMAType MaType, inSlowPeriod int, ...) ([]float64, []float64, []float64)
- func MacdFix(inReal []float64, inSignalPeriod int) ([]float64, []float64, []float64)
- func Mama(inReal []float64, inFastLimit float64, inSlowLimit float64) ([]float64, []float64)
- func Max(inReal []float64, inTimePeriod int) []float64
- func MaxIndex(inReal []float64, inTimePeriod int) []float64
- func MedPrice(inHigh []float64, inLow []float64) []float64
- func Mfi(inHigh []float64, inLow []float64, inClose []float64, inVolume []float64, ...) []float64
- func MidPoint(inReal []float64, inTimePeriod int) []float64
- func MidPrice(inHigh []float64, inLow []float64, inTimePeriod int) []float64
- func Min(inReal []float64, inTimePeriod int) []float64
- func MinIndex(inReal []float64, inTimePeriod int) []float64
- func MinMax(inReal []float64, inTimePeriod int) ([]float64, []float64)
- func MinMaxIndex(inReal []float64, inTimePeriod int) ([]float64, []float64)
- func MinusDI(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func MinusDM(inHigh []float64, inLow []float64, inTimePeriod int) []float64
- func Mom(inReal []float64, inTimePeriod int) []float64
- func Mult(inReal0 []float64, inReal1 []float64) []float64
- func Natr(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func Obv(inReal []float64, inVolume []float64) []float64
- func PlusDI(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func PlusDM(inHigh []float64, inLow []float64, inTimePeriod int) []float64
- func Ppo(inReal []float64, inFastPeriod int, inSlowPeriod int, inMAType MaType) []float64
- func Roc(inReal []float64, inTimePeriod int) []float64
- func Rocp(inReal []float64, inTimePeriod int) []float64
- func Rocr(inReal []float64, inTimePeriod int) []float64
- func Rocr100(inReal []float64, inTimePeriod int) []float64
- func Rsi(inReal []float64, inTimePeriod int) []float64
- func Sar(inHigh []float64, inLow []float64, inAcceleration float64, inMaximum float64) []float64
- func SarExt(inHigh []float64, inLow []float64, inStartValue float64, ...) []float64
- func Sin(inReal []float64) []float64
- func Sinh(inReal []float64) []float64
- func Sma(inReal []float64, inTimePeriod int) []float64
- func Sqrt(inReal []float64) []float64
- func StdDev(inReal []float64, inTimePeriod int, inNbDev float64) []float64
- func Stoch(inHigh []float64, inLow []float64, inClose []float64, inFastKPeriod int, ...) ([]float64, []float64)
- func StochF(inHigh []float64, inLow []float64, inClose []float64, inFastKPeriod int, ...) ([]float64, []float64)
- func StochRsi(inReal []float64, inTimePeriod int, inFastKPeriod int, inFastDPeriod int, ...) ([]float64, []float64)
- func Sub(inReal0 []float64, inReal1 []float64) []float64
- func Sum(inReal []float64, inTimePeriod int) []float64
- func T3(inReal []float64, inTimePeriod int, inVFactor float64) []float64
- func TRange(inHigh []float64, inLow []float64, inClose []float64) []float64
- func Tan(inReal []float64) []float64
- func Tanh(inReal []float64) []float64
- func Tema(inReal []float64, inTimePeriod int) []float64
- func Trima(inReal []float64, inTimePeriod int) []float64
- func Trix(inReal []float64, inTimePeriod int) []float64
- func Tsf(inReal []float64, inTimePeriod int) []float64
- func TypPrice(inHigh []float64, inLow []float64, inClose []float64) []float64
- func UltOsc(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod1 int, ...) []float64
- func Var(inReal []float64, inTimePeriod int) []float64
- func WclPrice(inHigh []float64, inLow []float64, inClose []float64) []float64
- func WillR(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod int) []float64
- func Wma(inReal []float64, inTimePeriod int) []float64
- type MaType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ad ¶
Ad - Chaikin A/D Line
func AdOsc ¶
func AdOsc(inHigh []float64, inLow []float64, inClose []float64, inVolume []float64, inFastPeriod int, inSlowPeriod int) []float64
AdOsc - Chaikin A/D Oscillator
func Add ¶
Add - Vector arithmetic addition
func Adx ¶
Adx - Average Directional Movement Index
func AdxR ¶
AdxR - Average Directional Movement Index Rating
func Apo ¶
Apo - Absolute Price Oscillator
func Aroon ¶
Aroon - Aroon aroondown, aroonup = AROON(high, low, timeperiod=14)
func AroonOsc ¶
AroonOsc - Aroon Oscillator
func Atr ¶
Atr - Average True Range
func AvgPrice ¶
AvgPrice - Average Price (o+h+l+c)/4
func BBands ¶
func BBands(inReal []float64, inTimePeriod int, inNbDevUp float64, inNbDevDn float64, inMAType MaType) ([]float64, []float64, []float64)
BBands - Bollinger Bands upperband, middleband, lowerband = BBands(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)
func Bop ¶
Bop - Balance Of Power
func Cci ¶
Cci - Commodity Channel Index
func Correl ¶
Correl - Pearson's Correlation Coefficient (r)
func Crossover ¶
Crossover returns true if series1 is crossing over series2.
NOTE: Usually this is used with Media Average Series to check if it crosses for buy signals. It assumes first values are the most recent. The crossover function does not use most recent value, since usually it's not a complete candle. The second recent values and the previous are used, instead.
func Crossunder ¶
Crossunder returns true if series1 is crossing under series2.
NOTE: Usually this is used with Media Average Series to check if it crosses for sell signals.
func Dema ¶
Dema - Double Exponential Moving Average
func Div ¶
Div - Vector arithmetic division
func Dx ¶
Dx - Directional Movement Index
func GroupCandles ¶
func GroupCandles(highs []float64, opens []float64, closes []float64, lows []float64, groupingFactor int) ([]float64, []float64, []float64, []float64, error)
GroupCandles groups a set of candles in another set of candles, basing on a grouping factor.
This is pretty useful if you want to transform, for example, 15min candles into 1h candles using same data.
This avoid calling multiple times the exchange for multiple contexts.
Example:
To transform 15 minute candles in 30 minutes candles you have a grouping factor = 2 To transform 15 minute candles in 1 hour candles you have a grouping factor = 4 To transform 30 minute candles in 1 hour candles you have a grouping factor = 2
func HeikinashiCandles ¶
func HeikinashiCandles(highs []float64, opens []float64, closes []float64, lows []float64) ([]float64, []float64, []float64, []float64)
HeikinashiCandles - from candle values extracts heikinashi candle values.
Returns highs, opens, closes and lows of the heikinashi candles (in this order).
NOTE: The number of Heikin-Ashi candles will always be one less than the number of provided candles, due to the fact that a previous candle is necessary to calculate the Heikin-Ashi candle, therefore the first provided candle is not considered as "current candle" in the algorithm, but only as "previous candle".
func Hlc3 ¶
Hlc3 returns the Hlc3 values
NOTE: Every Hlc item is defined as follows : (high + low + close) / 3 It is used as AvgPrice candle.
func HtDcPeriod ¶
HtDcPeriod - Hilbert Transform - Dominant Cycle Period (lookback=32)
func HtDcPhase ¶
HtDcPhase - Hilbert Transform - Dominant Cycle Phase (lookback=63)
func HtPhasor ¶
HtPhasor - Hibert Transform - Phasor Components (lookback=32)
func HtSine ¶
HtSine - Hilbert Transform - SineWave (lookback=63)
func HtTrendMode ¶
HtTrendMode - Hilbert Transform - Trend vs Cycle Mode (lookback=63)
func HtTrendline ¶
HtTrendline - Hilbert Transform - Instantaneous Trendline (lookback=63)
func Kama ¶
Kama - Kaufman Adaptive Moving Average
func LinearReg ¶
LinearReg - Linear Regression
func LinearRegAngle ¶
LinearRegAngle - Linear Regression Angle
func LinearRegIntercept ¶
LinearRegIntercept - Linear Regression Intercept
func LinearRegSlope ¶
LinearRegSlope - Linear Regression Slope
func Ma ¶
Ma - Moving average
func MaVp ¶
func MaVp(inReal []float64, inPeriods []float64, inMinPeriod int, inMaxPeriod int, inMAType MaType) []float64
MaVp - Moving average with variable period
func Macd ¶
func Macd(inReal []float64, inFastPeriod int, inSlowPeriod int, inSignalPeriod int) ([]float64, []float64, []float64)
Macd - Moving Average Convergence/Divergence unstable period ~= 100
func MacdExt ¶
func MacdExt(inReal []float64, inFastPeriod int, inFastMAType MaType, inSlowPeriod int, inSlowMAType MaType, inSignalPeriod int, inSignalMAType MaType) ([]float64, []float64, []float64)
MacdExt - MACD with controllable MA type unstable period ~= 100
func MacdFix ¶
MacdFix - MACD Fix 12/26 unstable period ~= 100
func Mama ¶
Mama - MESA Adaptive Moving Average (lookback=32)
func MaxIndex ¶
MaxIndex - Index of highest value over a specified period
func MedPrice ¶
MedPrice - Median Price (h+l)/2
func Mfi ¶
func Mfi(inHigh []float64, inLow []float64, inClose []float64, inVolume []float64, inTimePeriod int) []float64
Mfi - Money Flow Index
func MidPoint ¶
MidPoint - MidPoint over period
func MidPrice ¶
MidPrice - Midpoint Price over period
func MinIndex ¶
MinIndex - Index of lowest value over a specified period
func MinMax ¶
MinMax - Lowest and highest values over a specified period
func MinMaxIndex ¶
MinMaxIndex - Indexes of lowest and highest values over a specified period
func MinusDI ¶
MinusDI - Minus Directional Indicator
func MinusDM ¶
MinusDM - Minus Directional Movement
func Mult ¶
Mult - Vector arithmetic multiply
func Natr ¶
Natr - Normalized Average True Range
func PlusDI ¶
PlusDI - Plus Directional Indicator
func PlusDM ¶
PlusDM - Plus Directional Movement
func Ppo ¶
Ppo - Percentage Price Oscillator
func Roc ¶
Roc - Rate of change : ((price/prevPrice)-1)*100
func Rocp ¶
Rocp - Rate of change Percentage: (price-prevPrice)/prevPrice
func Rocr ¶
Rocr - Rate of change ratio: (price/prevPrice)
func Rocr100 ¶
Rocr100 - Rate of change ratio 100 scale: (price/prevPrice)*100
func Sar ¶
Sar - Parabolic SAR real = Sar(high, low, acceleration=0, maximum=0)
func SarExt ¶
func SarExt(inHigh []float64, inLow []float64, inStartValue float64, inOffsetOnReverse float64, inAccelerationInitLong float64, inAccelerationLong float64, inAccelerationMaxLong float64, inAccelerationInitShort float64, inAccelerationShort float64, inAccelerationMaxShort float64) []float64
SarExt - Parabolic SAR - Extended real = SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0, accelerationlong=0, accelerationmaxlong=0, accelerationinitshort=0, accelerationshort=0, accelerationmaxshort=0)
func StdDev ¶
StdDev - Standard Deviation
func Stoch ¶
func Stoch(inHigh []float64, inLow []float64, inClose []float64, inFastKPeriod int, inSlowKPeriod int, inSlowKMAType MaType, inSlowDPeriod int, inSlowDMAType MaType) ([]float64, []float64)
Stoch - Stochastic
func StochF ¶
func StochF(inHigh []float64, inLow []float64, inClose []float64, inFastKPeriod int, inFastDPeriod int, inFastDMAType MaType) ([]float64, []float64)
StochF - Stochastic Fast
func StochRsi ¶
func StochRsi(inReal []float64, inTimePeriod int, inFastKPeriod int, inFastDPeriod int, inFastDMAType MaType) ([]float64, []float64)
StochRsi - Stochastic Relative Strength Index
func Sub ¶
Sub - Vector arithmetic subtraction
func T3 ¶
T3 - Triple Exponential Moving Average (T3) (lookback=6*inTimePeriod)
func TRange ¶
TRange - True Range
func Tema ¶
Tema - Triple Exponential Moving Average
func Trima ¶
Trima - Triangular Moving Average
func Trix ¶
Trix - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
func TypPrice ¶
TypPrice - Typical Price (h+l+c)/3
func UltOsc ¶
func UltOsc(inHigh []float64, inLow []float64, inClose []float64, inTimePeriod1 int, inTimePeriod2 int, inTimePeriod3 int) []float64
UltOsc - Ultimate Oscillator
func WclPrice ¶
WclPrice - Weighted Close Price
func WillR ¶
WillR - Williams' %R