TalibEx (talib_ex_nif v0.1.0)

Interface for talib

Link to this section Summary

Functions

Vector Trigonometric ACos

Chaikin A/D Line

Vector Arithmetic Add

Chaikin A/D Oscillator

Average Directional Movement Index

Average Directional Movement Index Rating

Absolute Price Oscillator

Aroon Oscillator

Vector Trigonometric ASin

Vector Trigonometric ATan

Average True Range

Average Price

Bollinger Bands

Balance Of Power

Commodity Channel Index

Two Crows

Three Black Crows

Three Inside Up/Down

Three-Line Strike

Three Outside Up/Down

Three Stars In The South

Three Advancing White Soldiers

Closing Marubozu

Concealing Baby Swallow

Dark Cloud Cover

Engulfing Pattern

Evening Doji Star

Up/Down-gap side-by-side white lines

Gravestone Doji

Harami Pattern

Harami Cross Pattern

High-Wave Candle

Hikkake Pattern

Modified Hikkake Pattern

Identical Three Crows

In-Neck Pattern

Inverted Hammer

Kicking - bull/bear determined by the longer marubozu

Long Legged Doji

Long Line Candle

Morning Doji Star

On-Neck Pattern

Piercing Pattern

Separating Lines

Short Line Candle

Stalled Pattern

Takuri (Dragonfly Doji with very long lower shadow)

Thrusting Pattern

Tristar Pattern

Upside/Downside Gap Three Methods

Upside Gap Two Crows

Vector Ceil

Chande Momentum Oscillator

Pearson's Correlation Coefficient (r)

Vector Trigonometric Cos

Vector Trigonometric Cosh

Double Exponential Moving Average

Vector Arithmetic Div

Directional Movement Index

Exponential Moving Average

Vector Arithmetic Exp

Vector Floor

Hilbert Transform - Dominant Cycle Period

Hilbert Transform - Dominant Cycle Phase

Hilbert Transform - Phasor Components

Hilbert Transform - SineWave

Hilbert Transform - Instantaneous Trendline

Hilbert Transform - Trend vs Cycle Mode

Kaufman Adaptive Moving Average

Linear Regression

Linear Regression Angle

Linear Regression Intercept

Linear Regression Slope

Vector Log Natural

Vector Log10

Moving average

Moving Average Convergence/Divergence

MACD with controllable MA type

Moving Average Convergence/Divergence Fix 12/26

MESA Adaptive Moving Average

Moving average with variable period

Highest value over a specified period

Index of highest value over a specified period

Median Price

Money Flow Index

MidPoint over period

Midpoint Price over period

Lowest value over a specified period

Index of lowest value over a specified period

Lowest and highest values over a specified period

Indexes of lowest and highest values over a specified period

Minus Directional Indicator

Minus Directional Movement

Momentum

Vector Arithmetic Mult

Normalized Average True Range

On Balance Volume

Plus Directional Indicator

Plus Directional Movement

Percentage Price Oscillator

Rate of change : ((price/prevPrice)-1)*100

Rate of change Percentage: (price-prevPrice)/prevPrice

Rate of change ratio 100 scale: (price/prevPrice)*100

Rate of change ratio: (price/prevPrice)

Relative Strength Index

Parabolic SAR

Parabolic SAR - Extended

Vector Trigonometric Sin

Vector Trigonometric Sinh

Simple Moving Average

Vector Square Root

Standard Deviation

Stochastic

Stochastic Fast

Stochastic Relative Strength Index

Vector Arithmetic Substraction

Summation

Triple Exponential Moving Average (T3)

Vector Trigonometric Tan

Vector Trigonometric Tanh

Triple Exponential Moving Average

True Range

Triangular Moving Average

1-day Rate-Of-Change (ROC) of a Triple Smooth EMA

Time Series Forecast

Typical Price

Ultimate Oscillator

Variance

Weighted Close Price

Williams' %R

Weighted Moving Average

Link to this section Functions

@spec acos([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric ACos


Inputs

  • values

Outputs

  • result

TA-LIB src TA_ACOS

@spec ad(high: [number()], low: [number()], close: [number()], volume: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Chaikin A/D Line


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • volume: Volume List

Outputs

  • result

TA-LIB src TA_AD

@spec add(values0: [number()], values1: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Arithmetic Add


Inputs

  • values0
  • values1

Outputs

  • result

TA-LIB src TA_ADD

@spec adosc(
  high: [number()],
  low: [number()],
  close: [number()],
  volume: [number()],
  fast_period: pos_integer(),
  slow_period: pos_integer()
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Chaikin A/D Oscillator


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • volume: Volume List
  • fast_period (default 5): Number of period for the fast MA (between 2 and 100000)
  • slow_period (default 15): Number of period for the slow MA (between 2 and 100000)

Outputs

  • result

TA-LIB src TA_ADOSC

@spec adx(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Average Directional Movement Index


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ADX

@spec adxr(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Average Directional Movement Index Rating


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ADXR

@spec apo(
  values: [number()],
  fast_period: pos_integer(),
  slow_period: pos_integer(),
  moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Absolute Price Oscillator


Inputs

  • values
  • fast_period (default 5): Number of period for the fast MA (between 2 and 100000)
  • slow_period (default 15): Number of period for the slow MA (between 2 and 100000)
  • moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • result

TA-LIB src TA_APO

@spec aroon(high: [number()], low: [number()], time_period: pos_integer()) ::
  {:ok, down :: [number() | :nan], up :: [number() | :nan]} | {:error, term()}

Aroon


Inputs

  • high: High Price List
  • low: Low Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • down: Arron Down
  • up: Arron Up

TA-LIB src TA_AROON

Link to this function

aroonosc(params)

@spec aroonosc(high: [number()], low: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Aroon Oscillator


Inputs

  • high: High Price List
  • low: Low Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_AROONOSC

@spec asin([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric ASin


Inputs

  • values

Outputs

  • result

TA-LIB src TA_ASIN

@spec atan([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric ATan


Inputs

  • values

Outputs

  • result

TA-LIB src TA_ATAN

@spec atr(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Average True Range


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ATR

Link to this function

avgprice(params)

@spec avgprice(open: [number()], high: [number()], low: [number()], close: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Average Price


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • result

TA-LIB src TA_AVGPRICE

@spec bbands(
  values: [number()],
  time_period: pos_integer(),
  np_dev_up: number(),
  np_dev_down: number(),
  moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) ::
  {:ok, upper :: [number() | :nan], middle :: [number() | :nan],
   lower :: [number() | :nan]}
  | {:error, term()}

Bollinger Bands


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • np_dev_up: Deviation multiplier for upper band
  • np_dev_down: Deviation multiplier for lower band
  • moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • upper: Upper Band
  • middle: Middle Band
  • lower: Lower Band

TA-LIB src TA_BBANDS

@spec beta(values0: [number()], values1: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Beta


Inputs

  • values0
  • values1
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_BETA

@spec bop(open: [number()], high: [number()], low: [number()], close: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Balance Of Power


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • result

TA-LIB src TA_BOP

@spec cci(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Commodity Channel Index


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_CCI

Link to this function

cdl2_crows(params)

@spec cdl2_crows(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Two Crows


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL2CROWS

Link to this function

cdl3_black_crows(params)

@spec cdl3_black_crows(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three Black Crows


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3BLACKCROWS

Link to this function

cdl3_inside(params)

@spec cdl3_inside(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three Inside Up/Down


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3INSIDE

Link to this function

cdl3_line_strike(params)

@spec cdl3_line_strike(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three-Line Strike


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3LINESTRIKE

Link to this function

cdl3_outside(params)

@spec cdl3_outside(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three Outside Up/Down


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3OUTSIDE

Link to this function

cdl3_stars_in_south(params)

@spec cdl3_stars_in_south(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three Stars In The South


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3STARSINSOUTH

Link to this function

cdl3_white_soldiers(params)

@spec cdl3_white_soldiers(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Three Advancing White Soldiers


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDL3WHITESOLDIERS

Link to this function

cdl_abandoned_baby(params)

@spec cdl_abandoned_baby(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  pentration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Abandoned Baby


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • pentration: Percentage of penetration of a candle within another candle (minuimum 0)

Outputs

  • list

TA-LIB src TA_CDLABANDONEDBABY

Link to this function

cdl_advance_block(params)

@spec cdl_advance_block(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Advance Block


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLADVANCEBLOCK

Link to this function

cdl_belt_hold(params)

@spec cdl_belt_hold(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Belt-hold


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLBELTHOLD

Link to this function

cdl_breakaway(params)

@spec cdl_breakaway(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Breakaway


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLBREAKAWAY

Link to this function

cdl_closing_marubozu(params)

@spec cdl_closing_marubozu(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Closing Marubozu


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLCLOSINGMARUBOZU

Link to this function

cdl_conceal_baby_swallow(params)

@spec cdl_conceal_baby_swallow(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Concealing Baby Swallow


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLCONCEALBABYSWALL

Link to this function

cdl_counterattack(params)

@spec cdl_counterattack(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Counterattack


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLCOUNTERATTACK

Link to this function

cdl_dark_cloud_cover(params)

@spec cdl_dark_cloud_cover(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  peneration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Dark Cloud Cover


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • peneration

Outputs

  • list

TA-LIB src TA_CDLDARKCLOUDCOVER

Link to this function

cdl_doji(params)

@spec cdl_doji(open: [number()], high: [number()], low: [number()], close: [number()]) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Doji


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLDOJI

Link to this function

cdl_doji_star(params)

@spec cdl_doji_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Doji Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLDOJISTAR

Link to this function

cdl_dragonfly_doji(params)

@spec cdl_dragonfly_doji(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Dragonfly Doji


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLDRAGONFLYDOJI

Link to this function

cdl_engulfing(params)

@spec cdl_engulfing(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Engulfing Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLENGULFING

Link to this function

cdl_evening_doji_star(params)

@spec cdl_evening_doji_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  peneration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Evening Doji Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • peneration

Outputs

  • list

TA-LIB src TA_CDLEVENINGDOJISTAR

Link to this function

cdl_evening_star(params)

@spec cdl_evening_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  peneration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Evening Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • peneration

Outputs

  • list

TA-LIB src TA_CDLEVENINGSTAR

Link to this function

cdl_gap_side_side_white(params)

@spec cdl_gap_side_side_white(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Up/Down-gap side-by-side white lines


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLGAPSIDESIDEWHITE

Link to this function

cdl_gravestone_doji(params)

@spec cdl_gravestone_doji(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Gravestone Doji


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLGRAVESTONEDOJI

Link to this function

cdl_hammer(params)

@spec cdl_hammer(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Hammer


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHAMMER

Link to this function

cdl_hanging_man(params)

@spec cdl_hanging_man(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Hanging Man


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHANGINGMAN

Link to this function

cdl_harami(params)

@spec cdl_harami(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Harami Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHARAMI

Link to this function

cdl_harami_cross(params)

@spec cdl_harami_cross(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Harami Cross Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHARAMICROSS

Link to this function

cdl_highwave(params)

@spec cdl_highwave(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

High-Wave Candle


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHIGHWAVE

Link to this function

cdl_hikkake(params)

@spec cdl_hikkake(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Hikkake Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHIKKAKE

Link to this function

cdl_hikkake_mod(params)

@spec cdl_hikkake_mod(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Modified Hikkake Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHIKKAKEMOD

Link to this function

cdl_homing_pigeon(params)

@spec cdl_homing_pigeon(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Homing Pigeon


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLHOMINGPIGEON

Link to this function

cdl_identical_3_crows(params)

@spec cdl_identical_3_crows(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Identical Three Crows


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLIDENTICAL3CROWS

Link to this function

cdl_inneck(params)

@spec cdl_inneck(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

In-Neck Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLINNECK

Link to this function

cdl_inverted_hammer(params)

@spec cdl_inverted_hammer(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Inverted Hammer


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLINVERTEDHAMMER

Link to this function

cdl_kicking(params)

@spec cdl_kicking(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Kicking


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLKICKING

Link to this function

cdl_kicking_by_length(params)

@spec cdl_kicking_by_length(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Kicking - bull/bear determined by the longer marubozu


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLKICKINGBYLENGTH

Link to this function

cdl_ladder_bottom(params)

@spec cdl_ladder_bottom(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Ladder Bottom


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLLADDERBOTTOM

Link to this function

cdl_long_legged_doji(params)

@spec cdl_long_legged_doji(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Long Legged Doji


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLLONGLEGGEDDOJI

Link to this function

cdl_long_line(params)

@spec cdl_long_line(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Long Line Candle


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLLONGLINE

Link to this function

cdl_marubozu(params)

@spec cdl_marubozu(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Marubozu


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLMARUBOZU

Link to this function

cdl_mat_hold(params)

@spec cdl_mat_hold(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  pentration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Mat Hold


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • pentration: Percentage of penetration of a candle within another candle (minuimum 0)

Outputs

  • list

TA-LIB src TA_CDLMATHOLD

Link to this function

cdl_matching_low(params)

@spec cdl_matching_low(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Matching Low


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLMATCHINGLOW

Link to this function

cdl_morning_doji_star(params)

@spec cdl_morning_doji_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  pentration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Morning Doji Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • pentration: Percentage of penetration of a candle within another candle (minuimum 0)

Outputs

  • list

TA-LIB src TA_CDLMORNINGDOJISTAR

Link to this function

cdl_morning_star(params)

@spec cdl_morning_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()],
  pentration: number()
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Morning Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • pentration: Percentage of penetration of a candle within another candle (minuimum 0)

Outputs

  • list

TA-LIB src TA_CDLMORNINGSTAR

Link to this function

cdl_on_neck(params)

@spec cdl_on_neck(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

On-Neck Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLONNECK

Link to this function

cdl_piercing(params)

@spec cdl_piercing(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Piercing Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLPIERCING

Link to this function

cdl_rickshaw_man(params)

@spec cdl_rickshaw_man(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Rickshaw Man


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLRICKSHAWMAN

Link to this function

cdl_rise_fall_3_methods(params)

@spec cdl_rise_fall_3_methods(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Rickshaw Man


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLRISEFALL3METHODS

Link to this function

cdl_separating_lines(params)

@spec cdl_separating_lines(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Separating Lines


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSEPARATINGLINES

Link to this function

cdl_shooting_star(params)

@spec cdl_shooting_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Shooting Star


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSHOOTINGSTAR

Link to this function

cdl_short_line(params)

@spec cdl_short_line(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Short Line Candle


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSHORTLINE

Link to this function

cdl_spinning_top(params)

@spec cdl_spinning_top(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Spinning Top


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSPINNINGTOP

Link to this function

cdl_stalled_pattern(params)

@spec cdl_stalled_pattern(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Stalled Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSTALLEDPATTERN

Link to this function

cdl_stick_sandwich(params)

@spec cdl_stick_sandwich(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Stick Sandwich


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLSTICKSANDWICH

Link to this function

cdl_takuri(params)

@spec cdl_takuri(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Takuri (Dragonfly Doji with very long lower shadow)


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLTAKURI

Link to this function

cdl_tasuki_gap(params)

@spec cdl_tasuki_gap(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Tasuki Gap


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLTASUKIGAP

Link to this function

cdl_thrusting(params)

@spec cdl_thrusting(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Thrusting Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLTHRUSTING

Link to this function

cdl_tri_star(params)

@spec cdl_tri_star(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Tristar Pattern


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLTRISTAR

Link to this function

cdl_unique_3_river(params)

@spec cdl_unique_3_river(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Unique 3 River


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLUNIQUE3RIVER

Link to this function

cdl_upside_downside_gap_3_methods(params)

@spec cdl_upside_downside_gap_3_methods(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) :: {:ok, list :: [integer() | :nan]} | {:error, term()}

Upside/Downside Gap Three Methods


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLXSIDEGAP3METHODS

Link to this function

cdl_upside_gap_2_crows(params)

@spec cdl_upside_gap_2_crows(
  open: [number()],
  high: [number()],
  low: [number()],
  close: [number()]
) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Upside Gap Two Crows


Inputs

  • open: Open Price List
  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • list

TA-LIB src TA_CDLUPSIDEGAP2CROWS

@spec ceil([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Ceil


Inputs

  • values

Outputs

  • result

TA-LIB src TA_CEIL

@spec cmo(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Chande Momentum Oscillator


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_CMO

@spec correl(values0: [number()], values1: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Pearson's Correlation Coefficient (r)


Inputs

  • values0
  • values1
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_CORREL

@spec cos([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Cos


Inputs

  • values

Outputs

  • result

TA-LIB src TA_COS

@spec cosh([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Cosh


Inputs

  • values

Outputs

  • result

TA-LIB src TA_COSH

@spec dema(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Double Exponential Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_DEMA

@spec div(values0: [number()], values1: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Arithmetic Div


Inputs

  • values0
  • values1

Outputs

  • result

TA-LIB src TA_DIV

@spec dx(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Directional Movement Index


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_DX

@spec ema(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Exponential Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_EMA

@spec exp([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Arithmetic Exp


Inputs

  • values

Outputs

  • result

TA-LIB src TA_EXP

@spec floor([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Floor


Inputs

  • values

Outputs

  • result

TA-LIB src TA_FLOOR

Link to this function

ht_dcperiod(params)

@spec ht_dcperiod([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Hilbert Transform - Dominant Cycle Period


Inputs

  • values

Outputs

  • result

TA-LIB src TA_HT_DCPERIOD

Link to this function

ht_dcphase(params)

@spec ht_dcphase([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Hilbert Transform - Dominant Cycle Phase


Inputs

  • values

Outputs

  • result

TA-LIB src TA_HT_DCPHASE

Link to this function

ht_phasor(params)

@spec ht_phasor([{:values, [number()]}]) ::
  {:ok, in_phase :: [number() | :nan], quadrature :: [number() | :nan]}
  | {:error, term()}

Hilbert Transform - Phasor Components


Inputs

  • values

Outputs

  • in_phase
  • quadrature

TA-LIB src TA_HT_PHASOR

Link to this function

ht_sine(params)

@spec ht_sine([{:values, [number()]}]) ::
  {:ok, sine :: [number() | :nan], leadSine :: [number() | :nan]}
  | {:error, term()}

Hilbert Transform - SineWave


Inputs

  • values

Outputs

  • sine
  • leadSine

TA-LIB src TA_HT_SINE

Link to this function

ht_trendline(params)

@spec ht_trendline([{:values, [number()]}]) ::
  {:ok, list :: [number() | :nan]} | {:error, term()}

Hilbert Transform - Instantaneous Trendline


Inputs

  • values

Outputs

  • list

TA-LIB src TA_HT_TRENDLINE

Link to this function

ht_trendmode(params)

@spec ht_trendmode([{:values, [number()]}]) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Hilbert Transform - Trend vs Cycle Mode


Inputs

  • values

Outputs

  • list

TA-LIB src TA_HT_TRENDMODE

@spec kama(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Kaufman Adaptive Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_KAMA

Link to this function

linear_reg(params)

@spec linear_reg(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Linear Regression


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_LINEARREG

Link to this function

linear_reg_angle(params)

@spec linear_reg_angle(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Linear Regression Angle


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_LINEARREG_ANGLE

Link to this function

linear_reg_intercept(params)

@spec linear_reg_intercept(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Linear Regression Intercept


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_LINEARREG_INTERCEPT

Link to this function

linear_reg_slope(params)

@spec linear_reg_slope(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Linear Regression Slope


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_LINEARREG_SLOPE

@spec ln([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Log Natural


Inputs

  • values

Outputs

  • result

TA-LIB src TA_LN

@spec log10([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Log10


Inputs

  • values

Outputs

  • result

TA-LIB src TA_LOG10

@spec ma(
  values: [number()],
  time_period: pos_integer(),
  moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Moving average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • result

TA-LIB src TA_MA

@spec macd(
  values: [number()],
  fast_period: pos_integer(),
  slow_period: pos_integer(),
  signal_period: pos_integer()
) ::
  {:ok, macd :: [number() | :nan], macd_signal :: [number() | :nan],
   macd_hist :: [number() | :nan]}
  | {:error, term()}

Moving Average Convergence/Divergence


Inputs

  • values
  • fast_period (default 5): Number of period for the fast MA (between 2 and 100000)
  • slow_period (default 15): Number of period for the slow MA (between 2 and 100000)
  • signal_period (default 1): Smoothing for the signal line (between 1 and 100000)

Outputs

  • macd
  • macd_signal
  • macd_hist

TA-LIB src TA_MACD

Link to this function

macdext(params)

@spec macdext(
  values: [number()],
  fast_period: pos_integer(),
  fast_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3,
  slow_period: pos_integer(),
  slow_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3,
  signal_period: pos_integer(),
  single_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) ::
  {:ok, macd :: [number() | :nan], macd_signal :: [number() | :nan],
   macd_hist :: [number() | :nan]}
  | {:error, term()}

MACD with controllable MA type


Inputs

  • values
  • fast_period (default 5): Number of period for the fast MA (between 2 and 100000)
  • fast_moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3

  • slow_period (default 15): Number of period for the slow MA (between 2 and 100000)
  • slow_moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3

  • signal_period (default 1): Smoothing for the signal line (between 1 and 100000)
  • single_moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • macd
  • macd_signal
  • macd_hist

TA-LIB src TA_MACDEXT

Link to this function

macdfix(params)

@spec macdfix(values: [number()], signal_period: pos_integer()) ::
  {:ok, macd :: [number() | :nan], macd_signal :: [number() | :nan],
   macd_hist :: [number() | :nan]}
  | {:error, term()}

Moving Average Convergence/Divergence Fix 12/26


Inputs

  • values
  • signal_period (default 1): Smoothing for the signal line (between 1 and 100000)

Outputs

  • macd
  • macd_signal
  • macd_hist

TA-LIB src TA_MACDFIX

@spec mama(values: [number()], fast_limit: number(), slow_limit: number()) ::
  {:ok, mama :: [number() | :nan], fama :: [number() | :nan]} | {:error, term()}

MESA Adaptive Moving Average


Inputs

  • values
  • fast_limit (default 0.75): Upper limit use in the adaptive algorithm (between 0.01 and 0.99)
  • slow_limit (default 0.25): Lower limit use in the adaptive algorithm (between 0.01 and 0.99)

Outputs

  • mama
  • fama

TA-LIB src TA_MAMA

@spec mavp(
  values: [number()],
  periods: [number()],
  min_period: pos_integer(),
  max_period: pos_integer(),
  moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) :: {:ok, list :: [number() | :nan]} | {:error, term()}

Moving average with variable period


Inputs

  • values
  • periods
  • min_period (default 5): Value less than minimum will be changed to Minimum period (between 2 and 100000)
  • max_period (default 15): Value higher than maximum will be changed to Maximum period (between 2 and 100000)
  • moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • list

TA-LIB src TA_MAVP

@spec max(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Highest value over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_MAX

Link to this function

max_index(params)

@spec max_index(values: [number()], time_period: pos_integer()) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Index of highest value over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • list

TA-LIB src TA_MAXINDEX

Link to this function

med_price(params)

@spec med_price(high: [number()], low: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Median Price


Inputs

  • high: High Price List
  • low: Low Price List

Outputs

  • result

TA-LIB src TA_MEDPRICE

@spec mfi(
  high: [number()],
  low: [number()],
  close: [number()],
  volume: [number()],
  time_period: pos_integer()
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Money Flow Index


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • volume: Volume List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_MFI

Link to this function

mid_point(params)

@spec mid_point(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

MidPoint over period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_MIDPOINT

Link to this function

mid_price(params)

@spec mid_price(high: [number()], low: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Midpoint Price over period


Inputs

  • high: High Price List
  • low: Low Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_MIDPRICE

@spec min(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Lowest value over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_MIN

Link to this function

min_index(params)

@spec min_index(values: [number()], time_period: pos_integer()) ::
  {:ok, list :: [integer() | :nan]} | {:error, term()}

Index of lowest value over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • list

TA-LIB src TA_MININDEX

Link to this function

min_max(params)

@spec min_max(values: [number()], time_period: pos_integer()) ::
  {:ok, min :: [number() | :nan], max :: [number() | :nan]} | {:error, term()}

Lowest and highest values over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • min
  • max

TA-LIB src TA_MINMAX

Link to this function

min_max_index(params)

@spec min_max_index(values: [number()], time_period: pos_integer()) ::
  {:ok, min :: [integer() | :nan], max :: [integer() | :nan]} | {:error, term()}

Indexes of lowest and highest values over a specified period


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • min
  • max

TA-LIB src TA_MINMAXINDEX

Link to this function

minus_di(params)

@spec minus_di(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, list :: [number() | :nan]} | {:error, term()}

Minus Directional Indicator


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • list

TA-LIB src TA_MINUS_DI

Link to this function

minus_dm(params)

@spec minus_dm(high: [number()], low: [number()], time_period: pos_integer()) ::
  {:ok, list :: [number() | :nan]} | {:error, term()}

Minus Directional Movement


Inputs

  • high: High Price List
  • low: Low Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • list

TA-LIB src TA_MINUS_DM

@spec mom(values: [number()], time_period: pos_integer()) ::
  {:ok, list :: [number() | :nan]} | {:error, term()}

Momentum


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • list

TA-LIB src TA_MOM

@spec mult(values0: [number()], values1: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Arithmetic Mult


Inputs

  • values0
  • values1

Outputs

  • result

TA-LIB src TA_MULT

@spec natr(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Normalized Average True Range


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_NATR

@spec obv(values: [number()], volume: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

On Balance Volume


Inputs

  • values
  • volume: Volume List

Outputs

  • result

TA-LIB src TA_OBV

Link to this function

plus_di(params)

@spec plus_di(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Plus Directional Indicator


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_PLUS_DI

Link to this function

plus_dm(params)

@spec plus_dm(high: [number()], low: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Plus Directional Movement


Inputs

  • high: High Price List
  • low: Low Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_PLUS_DM

@spec ppo(
  values: [number()],
  fast_period: pos_integer(),
  slow_period: pos_integer(),
  moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Percentage Price Oscillator


Inputs

  • values
  • fast_period (default 5): Number of period for the fast MA (between 2 and 100000)
  • slow_period (default 15): Number of period for the slow MA (between 2 and 100000)
  • moving_average_type (default :sma): Type of moving average. sma | ema | wma | dema | tema | trima | kama | mama | t3


Outputs

  • result

TA-LIB src TA_PPO

@spec roc(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Rate of change : ((price/prevPrice)-1)*100


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ROC

@spec rocp(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Rate of change Percentage: (price-prevPrice)/prevPrice


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ROCP

Link to this function

rocr100(params)

@spec rocr100(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Rate of change ratio 100 scale: (price/prevPrice)*100


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ROCR100

@spec rocr(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Rate of change ratio: (price/prevPrice)


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ROCR

@spec rsi(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Relative Strength Index


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_RSI

@spec sar(
  high: [number()],
  low: [number()],
  acceleration: number(),
  maximum: number()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Parabolic SAR


Inputs

  • high: High Price List
  • low: Low Price List
  • acceleration (default 0): Acceleration Factor used up to the Maximum value (minuimum 0)
  • maximum (default 0): Acceleration Factor Maximum value (minuimum 0)

Outputs

  • result

TA-LIB src TA_SAR

@spec sarext(
  high: [number()],
  low: [number()],
  start_value: number(),
  offset_on_reverse: number(),
  acceleration_init_long: number(),
  acceleration_long: number(),
  acceleration_max_long: number(),
  acceleration_init_short: number(),
  acceleration_short: number(),
  acceleration_max_short: number()
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Parabolic SAR - Extended


Inputs

  • high: High Price List
  • low: Low Price List
  • start_value (default 0): Start value and direction. 0 for Auto, >0 for Long, <0 for Short
  • offset_on_reverse (default 0): Percent offset added/removed to initial stop on short/long reversal (minuimum 0)
  • acceleration_init_long (default 0): Acceleration Factor initial value for the Long direction (minuimum 0)
  • acceleration_long (default 0): Acceleration Factor for the Long direction (minuimum 0)
  • acceleration_max_long (default 0): Acceleration Factor maximum value for the Long direction (minuimum 0)
  • acceleration_init_short (default 0): Acceleration Factor initial value for the Short direction (minuimum 0)
  • acceleration_short (default 0): Acceleration Factor for the Short direction (minuimum 0)
  • acceleration_max_short (default 0): Acceleration Factor maximum value for the Short direction (minuimum 0)

Outputs

  • result

TA-LIB src TA_SAREXT

@spec sin([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Sin


Inputs

  • values

Outputs

  • result

TA-LIB src TA_SIN

@spec sinh([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Sinh


Inputs

  • values

Outputs

  • result

TA-LIB src TA_SINH

@spec sma(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Simple Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_SMA

@spec sqrt([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Square Root


Inputs

  • values

Outputs

  • result

TA-LIB src TA_SQRT

@spec stddev(
  values: [number()],
  time_period: pos_integer(),
  number_of_deviations: number()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Standard Deviation


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • number_of_deviations: Number of deviations

Outputs

  • result

TA-LIB src TA_STDDEV

@spec stoch(
  high: [number()],
  low: [number()],
  close: [number()],
  fast_k_period: pos_integer(),
  slow_k_period: pos_integer(),
  slow_k_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3,
  slow_d_period: pos_integer(),
  slow_d_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) ::
  {:ok, slow_k :: [number() | :nan], slow_d :: [number() | :nan]}
  | {:error, term()}

Stochastic


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • fast_k_period: Time period for building the Fast-K line (between 1 and 100000)
  • slow_k_period: Smoothing for making the Slow-K line. Usually set to 3 (between 1 and 100000)
  • slow_k_moving_average_type (default :sma): Type of Moving Average for Slow-K
  • slow_d_period: Smoothing for making the Slow-D line (between 1 and 100000)
  • slow_d_moving_average_type (default :sma): Type of Moving Average for Slow-K

Outputs

  • slow_k
  • slow_d

TA-LIB src TA_STOCH

@spec stochf(
  high: [number()],
  low: [number()],
  close: [number()],
  fast_k_period: pos_integer(),
  fast_d_period: pos_integer(),
  fast_d_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) ::
  {:ok, fast_k :: [number() | :nan], fast_d :: [number() | :nan]}
  | {:error, term()}

Stochastic Fast


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • fast_k_period: Time period for building the Fast-K line (between 1 and 100000)
  • fast_d_period: Smoothing for making the Fast-D line. Usually set to 3 (between 1 and 100000)
  • fast_d_moving_average_type (default :sma): Type of Moving Average for Fast-D

Outputs

  • fast_k
  • fast_d

TA-LIB src TA_STOCHF

Link to this function

stochrsi(params)

@spec stochrsi(
  values: [number()],
  time_period: pos_integer(),
  fast_k_period: pos_integer(),
  fast_d_period: pos_integer(),
  fast_d_moving_average_type:
    :sma | :ema | :wma | :dema | :tema | :trima | :kama | :mama | :t3
) ::
  {:ok, fast_k :: [number() | :nan], fast_d :: [number() | :nan]}
  | {:error, term()}

Stochastic Relative Strength Index


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • fast_k_period: Time period for building the Fast-K line (between 1 and 100000)
  • fast_d_period: Smoothing for making the Fast-D line. Usually set to 3 (between 1 and 100000)
  • fast_d_moving_average_type (default :sma): Type of Moving Average for Fast-D

Outputs

  • fast_k
  • fast_d

TA-LIB src TA_STOCHRSI

@spec sub(values0: [number()], values1: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Arithmetic Substraction


Inputs

  • values0
  • values1

Outputs

  • result

TA-LIB src TA_SUB

@spec sum(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Summation


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_SUM

@spec t3(values: [number()], time_period: pos_integer(), v_factor: number()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Triple Exponential Moving Average (T3)


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • v_factor: Volume Factor (between 0 and 1)

Outputs

  • result

TA-LIB src TA_T3

@spec tan([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Tan


Inputs

  • values

Outputs

  • result

TA-LIB src TA_TAN

@spec tanh([{:values, [number()]}]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Vector Trigonometric Tanh


Inputs

  • values

Outputs

  • result

TA-LIB src TA_TANH

@spec tema(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Triple Exponential Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_TEMA

@spec trange(high: [number()], low: [number()], close: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

True Range


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • result

TA-LIB src TA_TRANGE

@spec trima(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Triangular Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_TRIMA

@spec trix(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

1-day Rate-Of-Change (ROC) of a Triple Smooth EMA


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_TRIX

@spec tsf(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Time Series Forecast


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_TSF

Link to this function

typprice(params)

@spec typprice(high: [number()], low: [number()], close: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Typical Price


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • result

TA-LIB src TA_TYPPRICE

@spec ultosc(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period1: pos_integer(),
  time_period2: pos_integer(),
  time_period3: pos_integer()
) :: {:ok, result :: [number() | :nan]} | {:error, term()}

Ultimate Oscillator


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period1: Number of bars for 1st period (between 1 and 100000)
  • time_period2: Number of bars for 2nd period (between 1 and 100000)
  • time_period3: Number of bars for 3rd period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_ULTOSC

@spec var(
  values: [number()],
  time_period: pos_integer(),
  number_of_deviations: number()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Variance


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)
  • number_of_deviations: Number of deviations

Outputs

  • result

TA-LIB src TA_VAR

Link to this function

wclprice(params)

@spec wclprice(high: [number()], low: [number()], close: [number()]) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Weighted Close Price


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List

Outputs

  • result

TA-LIB src TA_WCLPRICE

@spec willr(
  high: [number()],
  low: [number()],
  close: [number()],
  time_period: pos_integer()
) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Williams' %R


Inputs

  • high: High Price List
  • low: Low Price List
  • close: Close Price List
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_WILLR

@spec wma(values: [number()], time_period: pos_integer()) ::
  {:ok, result :: [number() | :nan]} | {:error, term()}

Weighted Moving Average


Inputs

  • values
  • time_period (default 5): Number of period (between 1 and 100000)

Outputs

  • result

TA-LIB src TA_WMA