Documentation ¶
Index ¶
- Constants
- func AdArr(h, l, c, v []float64) []float64
- func AdOscArr(h, l, c, v []float64, fastN, slowN int64) []float64
- func AdxArr(h, l, c []float64, n int64) []float64
- func AdxRArr(h, l, c []float64, n int64) []float64
- func ApoArr(t MaType, in []float64, fastN, slowN int64) []float64
- func AroonArr(h, l []float64, n int64) ([]float64, []float64)
- func AroonOscArr(h, l []float64, n int64) []float64
- func AtrArr(h, l, c []float64, n int64) []float64
- func BBandsArr(t MaType, in []float64, n int64, upNStdDev, dnNStdDev float64) ([]float64, []float64, []float64)
- func BopArr(o, h, l, c []float64) []float64
- func CciArr(h, l, c []float64, n int64) []float64
- func CmoArr(in []float64, n int64) []float64
- func DemaArr(in []float64, n int64) []float64
- func DiffArr(in []float64, n int64) []float64
- func DxArr(h, l, c []float64, n int64) []float64
- func EmaArr(in []float64, n int64) []float64
- func HmaArr(in []float64, n int64) []float64
- func KamaArr(in []float64, n int64) []float64
- func MaArr(t MaType, in []float64, n int64) []float64
- func MacdArr(in []float64, fastN, slowN, signalN int64) ([]float64, []float64, []float64)
- func MacdExtArr(in []float64, fastT MaType, fastN int64, slowT MaType, slowN int64, ...) ([]float64, []float64, []float64)
- func MaxArr(in []float64, n int64) ([]int64, []float64)
- func MfiArr(h, l, c, v []float64, n int64) []float64
- func MinArr(in []float64, n int64) ([]int64, []float64)
- func NatrArr(h, l, c []float64, n int64) []float64
- func ObvArr(c, v []float64) []float64
- func PpoArr(in []float64, t MaType, fastN, slowN int64) []float64
- func RocArr(in []float64, n int64) []float64
- func RsiArr(in []float64, n int64) []float64
- func SmaArr(in []float64, n int64) []float64
- func StdDevArr(in []float64, n int64) []float64
- func StochFastArr(h, l, c []float64, kN int64, dt MaType, dN int64) ([]float64, []float64)
- func StochRsiArr(in []float64, n, kN int64, dt MaType, dN int64) ([]float64, []float64)
- func StochSlowArr(h, l, c []float64, fastKN int64, kt MaType, slowKN int64, dt MaType, ...) ([]float64, []float64)
- func StochasticKArr(h, l, c []float64, kN int64) []float64
- func SumArr(in []float64, n int64) []float64
- func TRangeArr(h, l, c []float64) []float64
- func TemaArr(in []float64, n int64) []float64
- func TrimaArr(in []float64, n int64) []float64
- func TrixArr(in []float64, n int64) []float64
- func UltOscArr(h, l, c []float64, n1, n2, n3 int64) []float64
- func VarArr(in []float64, n int64) []float64
- func VarDev(in []float64, n int64) []float64
- func WillRArr(h, l, c []float64, n int64) []float64
- func WmaArr(in []float64, n int64) []float64
- type Ad
- type AdOsc
- type Adx
- type AdxR
- type Apo
- type Aroon
- type AroonOsc
- type Atr
- type BBands
- type Bop
- type CBuf
- func (c *CBuf) Append(v float64) float64
- func (c *CBuf) IndexToSeq(idx int64) int64
- func (c *CBuf) Iter(fn func(v float64))
- func (c *CBuf) Max() (int64, float64)
- func (c *CBuf) Min() (int64, float64)
- func (c *CBuf) NewestIndex() int64
- func (c *CBuf) NthNewest(offset int64) float64
- func (c *CBuf) NthOldest(offset int64) float64
- func (c *CBuf) OldestIndex() int64
- func (c *CBuf) Size() int64
- type Cci
- type Cmo
- type Dema
- type Dev
- type Diff
- type Dx
- type Ema
- type Hma
- type JMA
- type Kama
- type Ma
- type MaType
- type Macd
- type MacdExt
- type Max
- type Mfi
- type Min
- type Natr
- type Obv
- type Ppo
- type Roc
- type Rsi
- type Series
- func (V Series) Filter(predicate func(item any, index int) bool) Series
- func (collection Series) ForEach(iteratee func(item any, index int))
- func (s *Series) Index(i int) any
- func (s *Series) Last() any
- func (s *Series) Length() int
- func (V Series) Map(iteratee func(item any, index int) any) Series
- func (s *Series) Pop(i int64) (v any)
- func (s *Series) Push(v any)
- func (V Series) Reduce(accumulator func(agg any, item any, index int) any, initial any) any
- func (s Series) Tail(size int) Series
- func (s *Series) Update(v any)
- type Sma
- type StdDev
- type StochFast
- type StochRsi
- type StochSlow
- type StochasticK
- type Sum
- type TRange
- type Talib
- func (ta Talib) Adx(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) Apo(t MaType, in floats.Slice, fastN, slowN int64) floats.Slice
- func (ta Talib) Aroon(h, l floats.Slice, n int64) (floats.Slice, floats.Slice)
- func (ta Talib) AroonOsc(h, l floats.Slice, n int64) floats.Slice
- func (ta Talib) Atr(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) BBands(t MaType, in floats.Slice, n int64, upNStdDev, dnNStdDev float64) (floats.Slice, floats.Slice, floats.Slice)
- func (ta Talib) Cci(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) Cmo(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Dema(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Dev(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Diff(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Dx(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) Ema(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Kama(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Macd(in floats.Slice, fastN, slowN, signalN int64) (floats.Slice, floats.Slice, floats.Slice)
- func (ta Talib) Natr(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) Obv(c, v floats.Slice) floats.Slice
- func (ta Talib) Ppo(in floats.Slice, t MaType, fastN, slowN int64) floats.Slice
- func (ta Talib) Roc(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Rsi(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Sma(in floats.Slice, n int64) floats.Slice
- func (ta Talib) StdDev(in floats.Slice, n int64) floats.Slice
- func (ta Talib) StochRsi(in floats.Slice, n, kN int64, dt MaType, dN int64) (floats.Slice, floats.Slice)
- func (ta Talib) TRange(h, l, c floats.Slice) floats.Slice
- func (ta Talib) Trima(in floats.Slice, n int64) floats.Slice
- func (ta Talib) Trix(in floats.Slice, n int64) floats.Slice
- func (ta Talib) UltOsc(h, l, c floats.Slice, n1, n2, n3 int64) floats.Slice
- func (ta Talib) Var(in floats.Slice, n int64) floats.Slice
- func (ta Talib) WillR(h, l, c floats.Slice, n int64) floats.Slice
- func (ta Talib) Wma(in floats.Slice, n int64) floats.Slice
- type Tema
- type Trima
- type Trix
- type UltOsc
- type Var
- type WillR
- type Wma
Constants ¶
const MaxNumOfJMA = 5_000
const MaxNumOfJMATruncateSize = 100
Variables ¶
This section is empty.
Functions ¶
func AdArr ¶
Developed by Marc Chaikin, the Accumulation Distribution Line is a volume-based indicator designed to measure the cumulative flow of money into and out of a security. Chaikin originally referred to the indicator as the Cumulative Money Flow Line. As with cumulative indicators, the Accumulation Distribution Line is a running total of each period's Money Flow Volume. First, a multiplier is calculated based on the relationship of the close to the high-low range. Second, the Money Flow Multiplier is multiplied by the period's volume to come up with a Money Flow Volume. A running total of the Money Flow Volume forms the Accumulation Distribution Line. Chartists can use this indicator to affirm a security's underlying trend or anticipate reversals when the indicator diverges from the security price.
https://school.stockcharts.com/doku.php?id=technical_indicators:accumulation_distribution_line https://www.investopedia.com/terms/a/accumulationdistribution.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/accumulation-distribution
func AdOscArr ¶
Developed by Marc Chaikin, the Chaikin Oscillator measures the momentum of the Accumulation Distribution Line using the MACD formula. (This makes it an indicator of an indicator.) The Chaikin Oscillator is the difference between the 3-day and 10-day EMAs of the Accumulation Distribution Line. Like other momentum indicators, this indicator is designed to anticipate directional changes in the Accumulation Distribution Line by measuring the momentum behind the movements. A momentum change is the first step to a trend change. Anticipating trend changes in the Accumulation Distribution Line can help chartists anticipate trend changes in the underlying security. The Chaikin Oscillator generates signals with crosses above/below the zero line or with bullish/bearish divergences.
https://school.stockcharts.com/doku.php?id=technical_indicators:chaikin_oscillator https://www.investopedia.com/terms/c/chaikinoscillator.asp
func AdxArr ¶
The Average Directional Index (ADX), Minus Directional Indicator (-DI) and Plus Directional Indicator (+DI) represent a group of directional movement indicators that form a trading system developed by Welles Wilder. Although Wilder designed his Directional Movement System with commodities and daily prices in mind, these indicators can also be applied to stocks.
Positive and negative directional movement form the backbone of the Directional Movement System. Wilder determined directional movement by comparing the difference between two consecutive lows with the difference between their respective highs.
The Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI) are derived from smoothed averages of these differences and measure trend direction over time. These two indicators are often collectively referred to as the Directional Movement Indicator (DMI).
The Average Directional Index (ADX) is in turn derived from the smoothed averages of the difference between +DI and -DI; it measures the strength of the trend (regardless of direction) over time.
Using these three indicators together, chartists can determine both the direction and strength of the trend.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx https://www.investopedia.com/articles/trading/07/adx-trend-indicator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/adx
func AdxRArr ¶
Average Directional Movement Index Rating (ADXR) is a simple average of today’s ADX value and the ADX from N periods ago.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/dmi
func ApoArr ¶
The Absolute Price Oscillator displays the difference between two exponential moving averages of a security's price and is expressed as an absolute value.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/apo
func AroonArr ¶
Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. “Aroon” means “Dawn's Early Light” in Sanskrit. Chande chose this name because the indicators are designed to reveal the beginning of a new trend. The Aroon indicators measure the number of periods since price recorded an x-day high or low. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low. In this sense, the Aroon indicators are quite different from typical momentum oscillators, which focus on price relative to time. Aroon is unique because it focuses on time relative to price. Chartists can use the Aroon indicators to spot emerging trends, identify consolidations, define correction periods and anticipate reversals.
https://school.stockcharts.com/doku.php?id=technical_indicators:aroon https://www.investopedia.com/terms/a/aroon.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/aroon-indicator
func AroonOscArr ¶
The Aroon Oscillator is the difference between Aroon-Up and Aroon-Down. These two indicators are usually plotted together for easy comparison, but chartists can also view the difference between these two indicators with the Aroon Oscillator. This indicator fluctuates between -100 and +100 with zero as the middle line. An upward trend bias is present when the oscillator is positive, while a downward trend bias exists when the oscillator is negative. Chartists can also expand the bull-bear threshold to identify stronger signals. See our ChartSchool article for more details on Aroon-Up and Aroon-Down.
https://school.stockcharts.com/doku.php?id=technical_indicators:aroon_oscillator https://www.investopedia.com/terms/a/aroonoscillator.asp
func AtrArr ¶
Developed by J. Welles Wilder, the Average True Range (ATR) is an indicator that measures volatility. As with most of his indicators, Wilder designed ATR with commodities and daily prices in mind. Commodities are frequently more volatile than stocks. They were are often subject to gaps and limit moves, which occur when a commodity opens up or down its maximum allowed move for the session. A volatility formula based only on the high-low range would fail to capture volatility from gap or limit moves. Wilder created Average True Range to capture this “missing” volatility. It is important to remember that ATR does not provide an indication of price direction, just volatility.
Wilder features ATR in his 1978 book, New Concepts in Technical Trading Systems. This book also includes the Parabolic SAR, RSI and the Directional Movement Concept (ADX). Despite being developed before the computer age, Wilder's indicators have stood the test of time and remain extremely popular.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_true_range_atr https://www.investopedia.com/terms/a/atr.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/atr
func BBandsArr ¶
func BBandsArr(t MaType, in []float64, n int64, upNStdDev, dnNStdDev float64) ([]float64, []float64, []float64)
Developed by John Bollinger, Bollinger Bands are volatility bands placed above and below a moving average. Volatility is based on the standard deviation, which changes as volatility increases and decreases. The bands automatically widen when volatility increases and contract when volatility decreases. Their dynamic nature allows them to be used on different securities with the standard settings. Bollinger Bands can be used to identify M-Tops and W-Bottoms or to determine the strength of the trend. Signals based on the distance between the upper and lower band, including the popular Bollinger Band Squeeze, are identified using the related Bollinger BandWidth indicator.
https://school.stockcharts.com/doku.php?id=technical_indicators:bollinger_bands https://www.investopedia.com/terms/b/bollingerbands.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/bollinger-bands
func BopArr ¶
Balance of Power (BOP) is an oscillator that measures the strength of buying and selling pressure. Introduced by Igor Levshin in the August 2001 issue of Technical Analysis of Stocks & Commodities magazine, this indicator compares the power of buyers to push prices to higher extremes with the power of sellers to move prices to lower extremes. When the indicator is in positive territory, the bulls are in charge; and sellers dominate when the indicator is negative. A reading near the zero line indicates a balance between the two and can mean a trend reversal.
https://school.stockcharts.com/doku.php?id=technical_indicators:balance_of_power https://www.investopedia.com/terms/b/bop.asp
func CciArr ¶
Developed by Donald Lambert and featured in Commodities magazine in 1980, the Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions. Lambert originally developed CCI to identify cyclical turns in commodities, but the indicator can be successfully applied to indices, ETFs, stocks and other securities. In general, CCI measures the current price level relative to an average price level over a given period of time. CCI is relatively high when prices are far above their average, but is relatively low when prices are far below their average. In this manner, CCI can be used to identify overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:commodity_channel_index_cci https://www.investopedia.com/terms/c/commoditychannelindex.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cci
func CmoArr ¶
The Chande momentum oscillator is a technical momentum indicator introduced by Tushar Chande in his 1994 book The New Technical Trader. The formula calculates the difference between the sum of recent gains and the sum of recent losses and then divides the result by the sum of all price movements over the same period.
https://www.investopedia.com/terms/c/chandemomentumoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmo
func DemaArr ¶
The Double Exponential Moving Average (DEMA) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term traders. DEMA was developed by Patrick Mulloy, and introduced in the January 1994 issue of Technical Analysis of Stocks & Commodities magazine. The overlay uses the lag difference between a single-smoothed EMA and a double-smoothed EMA to offset the single-smoothed EMA. This offset produces a moving average that remains smooth, but stays closer to the price bars than either the single- or double-smoothed traditional EMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:dema https://www.investopedia.com/terms/d/double-exponential-moving-average.asp
func DiffArr ¶
This is also known as Momentum (MOM). The Momentum (MOM) indicator compares the current price with the previous price from a selected number of periods ago. This indicator is similar to the “Rate of Change” indicator, but the MOM does not normalize the price, so different instruments can have different indicator values based on their point values.
func DxArr ¶
Refer to ADX.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx
func EmaArr ¶
Exponential moving averages (EMAs) reduce the lag by applying more weight to recent prices. The weighting applied to the most recent price depends on the number of periods in the moving average. EMAs differ from simple moving averages in that a given day's EMA calculation depends on the EMA calculations for all the days prior to that day. You need far more than 10 days of data to calculate a reasonably accurate 10-day EMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_averages
func HmaArr ¶
The Triple Exponential Moving Average (Hma) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term trading. Shortly after developing the Double Exponential Moving Average (DEMA) in 1994, Patrick Mulloy took the concept a step further and created the Triple Exponential Moving Average (Hma). Like its predecessor DEMA, the Hma overlay uses the lag difference between different EMAs to adjust a traditional EMA. However, Hma's formula uses a triple-smoothed EMA in addition to the single- and double-smoothed EMAs employed in the formula for DEMA. The offset created using these three EMAs produces a moving average that stays even closer to the price bars than DEMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:Hma https://www.investopedia.com/terms/t/triple-exponential-moving-average.asp
func KamaArr ¶
Developed by Perry Kaufman, Kaufman's Adaptive Moving Average (KAMA) is a moving average designed to account for market noise or volatility. KAMA will closely follow prices when the price swings are relatively small and the noise is low. KAMA will adjust when the price swings widen and follow prices from a greater distance. This trend-following indicator can be used to identify the overall trend, time turning points and filter price movements.
https://school.stockcharts.com/doku.php?id=technical_indicators:kaufman_s_adaptive_moving_average
func MacdArr ¶
Developed by Gerald Appel in the late seventies, the Moving Average Convergence/Divergence oscillator (MACD) is one of the simplest and most effective momentum indicators available. The MACD turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter one. As a result, the MACD offers the best of both worlds: trend following and momentum. The MACD fluctuates above and below the zero line as the moving averages converge, cross and diverge. Traders can look for signal line crossovers, centerline crossovers and divergences to generate signals. Because the MACD is unbounded, it is not particularly useful for identifying overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_average_convergence_divergence_macd https://www.investopedia.com/terms/m/macd.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/macd
func MacdExtArr ¶
func MacdExtArr(in []float64, fastT MaType, fastN int64, slowT MaType, slowN int64, signalT MaType, signalN int64) ([]float64, []float64, []float64)
Refer to MACD. This is a general version of MACD with moving average types for fast, slow, and signal lines as paremters.
func MfiArr ¶
The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure. Created by Gene Quong and Avrum Soudack, MFI is also known as volume-weighted RSI. MFI starts with the typical price for each period. Money flow is positive when the typical price rises (buying pressure) and negative when the typical price declines (selling pressure). A ratio of positive and negative money flow is then plugged into an RSI formula to create an oscillator that moves between zero and one hundred. As a momentum oscillator tied to volume, MFI is best suited to identify reversals and price extremes with a variety of signals.
https://school.stockcharts.com/doku.php?id=technical_indicators:money_flow_index_mfi https://www.investopedia.com/terms/m/mfi.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/MFI
func NatrArr ¶
Normalized Average True Range (NATR) attempts to normalize the average true range values across instruments by using the closing price.
func ObvArr ¶
On Balance Volume (OBV) measures buying and selling pressure as a cumulative indicator, adding volume on up days and subtracting it on down days. OBV was developed by Joe Granville and introduced in his 1963 book Granville's New Key to Stock Market Profits. It was one of the first indicators to measure positive and negative volume flow. Chartists can look for divergences between OBV and price to predict price movements or use OBV to confirm price trends.
https://school.stockcharts.com/doku.php?id=technical_indicators:on_balance_volume_obv https://www.investopedia.com/terms/o/onbalancevolume.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/obv
func PpoArr ¶
The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. These signals are no different than those associated with MACD, with a few differences between the two: first, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
https://school.stockcharts.com/doku.php?id=technical_indicators:price_oscillators_ppo https://www.investopedia.com/terms/p/ppo.asp
func RocArr ¶
The Rate-of-Change (ROC) indicator, which is also referred to as simply Momentum, is a pure momentum oscillator that measures the percent change in price from one period to the next. The ROC calculation compares the current price with the price “n” periods ago. The plot forms an oscillator that fluctuates above and below the zero line as the Rate-of-Change moves from positive to negative. As a momentum oscillator, ROC signals include centerline crossovers, divergences and overbought-oversold readings. Divergences fail to foreshadow reversals more often than not, so this article will forgo a detailed discussion on them. Even though centerline crossovers are prone to whipsaw, especially short-term, these crossovers can be used to identify the overall trend. Identifying overbought or oversold extremes comes naturally to the Rate-of-Change oscillator.
https://school.stockcharts.com/doku.php?id=technical_indicators:rate_of_change_roc_and_momentum https://www.investopedia.com/terms/p/pricerateofchange.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/roc
func RsiArr ¶
Developed by J. Welles Wilder, the Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. RSI oscillates between zero and 100. According to Wilder, RSI is considered overbought when above 70 and oversold when below 30. Signals can also be generated by looking for divergences, failure swings and centerline crossovers. RSI can also be used to identify the general trend. RSI is an extremely popular momentum indicator that has been featured in a number of articles, interviews and books over the years. In particular, Constance Brown's book, Technical Analysis for the Trading Professional, features the concept of bull market and bear market ranges for RSI. Andrew Cardwell, Brown's RSI mentor, introduced positive and negative reversals for RSI and, additionally, turned the notion of divergence, literally and figuratively, on its head. Wilder features RSI in his 1978 book, New Concepts in Technical Trading Systems. This book also includes the Parabolic SAR, Average True Range and the Directional Movement Concept (ADX). Despite being developed before the computer age, Wilder's indicators have stood the test of time and remain extremely popular.
https://school.stockcharts.com/doku.php?id=technical_indicators:relative_strength_index_rsi https://www.investopedia.com/terms/r/rsi.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/RSI
func SmaArr ¶
A simple moving average is formed by computing the average price of a security over a specific number of periods. Most moving averages are based on closing prices; for example, a 5-day simple moving average is the five-day sum of closing prices divided by five. As its name implies, a moving average is an average that moves. Old data is dropped as new data becomes available, causing the average to move along the time scale. The example below shows a 5-day moving average evolving over three days.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_averages https://www.investopedia.com/terms/s/sma.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/sma
func StdDevArr ¶
Standard deviation is a statistical term that measures the amount of variability or dispersion around an average. Standard deviation is also a measure of volatility. Generally speaking, dispersion is the difference between the actual value and the average value. The larger this dispersion or variability is, the higher the standard deviation. The smaller this dispersion or variability is, the lower the standard deviation. Chartists can use the standard deviation to measure expected risk and determine the significance of certain price movements.
https://school.stockcharts.com/doku.php?id=technical_indicators:standard_deviation_volatility https://www.investopedia.com/terms/s/standarddeviation.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/standard-deviation
func StochFastArr ¶
Developed by George C. Lane in the late 1950s, the Stochastic Oscillator is a momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. According to an interview with Lane, the Stochastic Oscillator “doesn't follow price, it doesn't follow volume or anything like that. It follows the speed or the momentum of price. As a rule, the momentum changes direction before price.” As such, bullish and bearish divergences in the Stochastic Oscillator can be used to foreshadow reversals. This was the first, and most important, signal that Lane identified. Lane also used this oscillator to identify bull and bear set-ups to anticipate a future reversal. As the Stochastic Oscillator is range-bound, it is also useful for identifying overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:stochastic_oscillator_fast_slow_and_full https://www.investopedia.com/terms/s/stochasticoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/fast-stochastic
func StochRsiArr ¶
Developed by Tushar Chande and Stanley Kroll, StochRSI is an oscillator that measures the level of RSI relative to its high-low range over a set time period. StochRsi applies the Stochastics formula to RSI values, rather than price values, making it an indicator of an indicator. The result is an oscillator that fluctuates between 0 and 1. In their 1994 book, The New Technical Trader, Chande and Kroll explain that RSI can oscillate between 80 and 20 for extended periods without reaching extreme levels. Notice that 80 and 20 are used for overbought and oversold instead of the more traditional 70 and 30. Traders looking to enter a stock based on an overbought or oversold reading in RSI might find themselves continuously on the sidelines. Chande and Kroll developed StochRSI to increase sensitivity and generate more overbought/oversold signals.
https://school.stockcharts.com/doku.php?id=technical_indicators:stochrsi https://www.investopedia.com/terms/s/stochrsi.asp
func StochSlowArr ¶
func StochSlowArr(h, l, c []float64, fastKN int64, kt MaType, slowKN int64, dt MaType, slowDN int64) ([]float64, []float64)
The Slow Stochastic Oscillator is a momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. The indicator can range from 0 to 100. The difference between the Slow and Fast Stochastic Oscillator is the Slow %K incorporates a %K slowing period of 3 that controls the internal smoothing of %K. Setting the smoothing period to 1 is equivalent to plotting the Fast Stochastic Oscillator.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/slow-stochastic
func StochasticKArr ¶
func TRangeArr ¶
Welles Wilder described these calculations to determine the trading range for a stock or commodity. True Range is defined as the largest of the following: (1) The distance from today's high to today's low. (2) The distance from yesterday's close to today's high. (3) The distance from yesterday's close to today's low. Wilder included price comparisons among subsequent bars in order to account for gaps in his range calculation.
func TemaArr ¶
The Triple Exponential Moving Average (TEMA) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term trading. Shortly after developing the Double Exponential Moving Average (DEMA) in 1994, Patrick Mulloy took the concept a step further and created the Triple Exponential Moving Average (TEMA). Like its predecessor DEMA, the TEMA overlay uses the lag difference between different EMAs to adjust a traditional EMA. However, TEMA's formula uses a triple-smoothed EMA in addition to the single- and double-smoothed EMAs employed in the formula for DEMA. The offset created using these three EMAs produces a moving average that stays even closer to the price bars than DEMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:tema https://www.investopedia.com/terms/t/triple-exponential-moving-average.asp
func TrimaArr ¶
The triangular moving average (TMA) is a technical indicator that is similar to other moving averages. The TMA shows the average (or mean) price of an asset over a specified number of data points—usually a number of price bars. However, the triangular moving average differs in that it is double smoothed—which also means averaged twice.
https://www.thebalance.com/triangular-moving-average-tma-description-and-uses-1031203 https://www.fidelity.com/viewpoints/active-investor/moving-averages
func TrixArr ¶
TRIX is a momentum oscillator that displays the percent rate of change of a triple exponentially smoothed moving average. It was developed in the early 1980's by Jack Hutson, an editor for Technical Analysis of Stocks and Commodities magazine. With its triple smoothing, TRIX is designed to filter out insignificant price movements. Chartists can use TRIX to generate signals similar to MACD. A signal line can be applied to look for signal line crossovers. A directional bias can be determined with the absolute level. Bullish and bearish divergences can be used to anticipate reversals.
https://school.stockcharts.com/doku.php?id=technical_indicators:trix https://www.investopedia.com/terms/t/trix.asp
func UltOscArr ¶
Developed by Larry Williams in 1976 and featured in Stocks & Commodities Magazine in 1985, the Ultimate Oscillator is a momentum oscillator designed to capture momentum across three different timeframes. The multiple timeframe objective seeks to avoid the pitfalls of other oscillators. Many momentum oscillators surge at the beginning of a strong advance, only to form a bearish divergence as the advance continues. This is because they are stuck with one timeframe. The Ultimate Oscillator attempts to correct this fault by incorporating longer timeframes into the basic formula. Williams identified a buy signal a based on a bullish divergence and a sell signal based on a bearish divergence.
https://school.stockcharts.com/doku.php?id=technical_indicators:ultimate_oscillator https://www.investopedia.com/terms/u/ultimateoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/ultimate-oscillator
func VarArr ¶
The term variance refers to a statistical measurement of the spread between numbers in a data set. More specifically, variance measures how far each number in the set is from the mean and thus from every other number in the set. Variance is often depicted by this symbol: σ2. It is used by both analysts and traders to determine volatility and market security. The square root of the variance is the standard deviation (σ), which helps determine the consistency of an investment’s returns over a period of time.
https://www.investopedia.com/terms/v/variance.asp
func WillRArr ¶
Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period. In contrast, the Stochastic Oscillator reflects the level of the close relative to the lowest low. %R corrects for the inversion by multiplying the raw value by -100. As a result, the Fast Stochastic Oscillator and Williams %R produce the exact same lines, but with different scaling. Williams %R oscillates from 0 to -100; readings from 0 to -20 are considered overbought, while readings from -80 to -100 are considered oversold. Unsurprisingly, signals derived from the Stochastic Oscillator are also applicable to Williams %R.
https://school.stockcharts.com/doku.php?id=technical_indicators:williams_r https://www.investopedia.com/terms/w/williamsr.asp
func WmaArr ¶
A Weighted Moving Average puts more weight on recent data and less on past data. This is done by multiplying each bar’s price by a weighting factor. Because of its unique calculation, WMA will follow prices more closely than a corresponding Simple Moving Average.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/wma
Types ¶
type Ad ¶
type Ad struct {
// contains filtered or unexported fields
}
Developed by Marc Chaikin, the Accumulation Distribution Line is a volume-based indicator designed to measure the cumulative flow of money into and out of a security. Chaikin originally referred to the indicator as the Cumulative Money Flow Line. As with cumulative indicators, the Accumulation Distribution Line is a running total of each period's Money Flow Volume. First, a multiplier is calculated based on the relationship of the close to the high-low range. Second, the Money Flow Multiplier is multiplied by the period's volume to come up with a Money Flow Volume. A running total of the Money Flow Volume forms the Accumulation Distribution Line. Chartists can use this indicator to affirm a security's underlying trend or anticipate reversals when the indicator diverges from the security price.
https://school.stockcharts.com/doku.php?id=technical_indicators:accumulation_distribution_line https://www.investopedia.com/terms/a/accumulationdistribution.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/accumulation-distribution
func (*Ad) InitPeriod ¶
type AdOsc ¶
type AdOsc struct {
// contains filtered or unexported fields
}
Developed by Marc Chaikin, the Chaikin Oscillator measures the momentum of the Accumulation Distribution Line using the MACD formula. (This makes it an indicator of an indicator.) The Chaikin Oscillator is the difference between the 3-day and 10-day EMAs of the Accumulation Distribution Line. Like other momentum indicators, this indicator is designed to anticipate directional changes in the Accumulation Distribution Line by measuring the momentum behind the movements. A momentum change is the first step to a trend change. Anticipating trend changes in the Accumulation Distribution Line can help chartists anticipate trend changes in the underlying security. The Chaikin Oscillator generates signals with crosses above/below the zero line or with bullish/bearish divergences.
https://school.stockcharts.com/doku.php?id=technical_indicators:chaikin_oscillator https://www.investopedia.com/terms/c/chaikinoscillator.asp
func (*AdOsc) InitPeriod ¶
type Adx ¶
type Adx struct {
// contains filtered or unexported fields
}
The Average Directional Index (ADX), Minus Directional Indicator (-DI) and Plus Directional Indicator (+DI) represent a group of directional movement indicators that form a trading system developed by Welles Wilder. Although Wilder designed his Directional Movement System with commodities and daily prices in mind, these indicators can also be applied to stocks.
Positive and negative directional movement form the backbone of the Directional Movement System. Wilder determined directional movement by comparing the difference between two consecutive lows with the difference between their respective highs.
The Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI) are derived from smoothed averages of these differences and measure trend direction over time. These two indicators are often collectively referred to as the Directional Movement Indicator (DMI).
The Average Directional Index (ADX) is in turn derived from the smoothed averages of the difference between +DI and -DI; it measures the strength of the trend (regardless of direction) over time.
Using these three indicators together, chartists can determine both the direction and strength of the trend.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx https://www.investopedia.com/articles/trading/07/adx-trend-indicator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/adx
func (*Adx) InitPeriod ¶
type AdxR ¶
type AdxR struct {
// contains filtered or unexported fields
}
Average Directional Movement Index Rating (ADXR) is a simple average of today’s ADX value and the ADX from N periods ago.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/dmi
func (*AdxR) InitPeriod ¶
type Apo ¶
type Apo struct {
// contains filtered or unexported fields
}
The Absolute Price Oscillator displays the difference between two exponential moving averages of a security's price and is expressed as an absolute value.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/apo
func (*Apo) InitPeriod ¶
type Aroon ¶
type Aroon struct {
// contains filtered or unexported fields
}
func NewAroon ¶
Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. “Aroon” means “Dawn's Early Light” in Sanskrit. Chande chose this name because the indicators are designed to reveal the beginning of a new trend. The Aroon indicators measure the number of periods since price recorded an x-day high or low. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low. In this sense, the Aroon indicators are quite different from typical momentum oscillators, which focus on price relative to time. Aroon is unique because it focuses on time relative to price. Chartists can use the Aroon indicators to spot emerging trends, identify consolidations, define correction periods and anticipate reversals.
https://school.stockcharts.com/doku.php?id=technical_indicators:aroon https://www.investopedia.com/terms/a/aroon.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/aroon-indicator
func (*Aroon) InitPeriod ¶
type AroonOsc ¶
type AroonOsc struct {
// contains filtered or unexported fields
}
The Aroon Oscillator is the difference between Aroon-Up and Aroon-Down. These two indicators are usually plotted together for easy comparison, but chartists can also view the difference between these two indicators with the Aroon Oscillator. This indicator fluctuates between -100 and +100 with zero as the middle line. An upward trend bias is present when the oscillator is positive, while a downward trend bias exists when the oscillator is negative. Chartists can also expand the bull-bear threshold to identify stronger signals. See our ChartSchool article for more details on Aroon-Up and Aroon-Down.
https://school.stockcharts.com/doku.php?id=technical_indicators:aroon_oscillator https://www.investopedia.com/terms/a/aroonoscillator.asp
func NewAroonOsc ¶
func (*AroonOsc) InitPeriod ¶
type Atr ¶
type Atr struct {
// contains filtered or unexported fields
}
Developed by J. Welles Wilder, the Average True Range (ATR) is an indicator that measures volatility. As with most of his indicators, Wilder designed ATR with commodities and daily prices in mind. Commodities are frequently more volatile than stocks. They were are often subject to gaps and limit moves, which occur when a commodity opens up or down its maximum allowed move for the session. A volatility formula based only on the high-low range would fail to capture volatility from gap or limit moves. Wilder created Average True Range to capture this “missing” volatility. It is important to remember that ATR does not provide an indication of price direction, just volatility.
Wilder features ATR in his 1978 book, New Concepts in Technical Trading Systems. This book also includes the Parabolic SAR, RSI and the Directional Movement Concept (ADX). Despite being developed before the computer age, Wilder's indicators have stood the test of time and remain extremely popular.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_true_range_atr https://www.investopedia.com/terms/a/atr.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/atr
func (*Atr) InitPeriod ¶
type BBands ¶
type BBands struct {
// contains filtered or unexported fields
}
Developed by John Bollinger, Bollinger Bands are volatility bands placed above and below a moving average. Volatility is based on the standard deviation, which changes as volatility increases and decreases. The bands automatically widen when volatility increases and contract when volatility decreases. Their dynamic nature allows them to be used on different securities with the standard settings. Bollinger Bands can be used to identify M-Tops and W-Bottoms or to determine the strength of the trend. Signals based on the distance between the upper and lower band, including the popular Bollinger Band Squeeze, are identified using the related Bollinger BandWidth indicator.
https://school.stockcharts.com/doku.php?id=technical_indicators:bollinger_bands https://www.investopedia.com/terms/b/bollingerbands.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/bollinger-bands
func (*BBands) InitPeriod ¶
type Bop ¶
type Bop struct { }
Balance of Power (BOP) is an oscillator that measures the strength of buying and selling pressure. Introduced by Igor Levshin in the August 2001 issue of Technical Analysis of Stocks & Commodities magazine, this indicator compares the power of buyers to push prices to higher extremes with the power of sellers to move prices to lower extremes. When the indicator is in positive territory, the bulls are in charge; and sellers dominate when the indicator is negative. A reading near the zero line indicates a balance between the two and can mean a trend reversal.
https://school.stockcharts.com/doku.php?id=technical_indicators:balance_of_power https://www.investopedia.com/terms/b/bop.asp
func (*Bop) InitPeriod ¶
type CBuf ¶
type CBuf struct {
// contains filtered or unexported fields
}
circular buffer maintaining fixed sized history
func (*CBuf) IndexToSeq ¶
From circular buf position to total sequence index
type Cci ¶
type Cci struct {
// contains filtered or unexported fields
}
Developed by Donald Lambert and featured in Commodities magazine in 1980, the Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions. Lambert originally developed CCI to identify cyclical turns in commodities, but the indicator can be successfully applied to indices, ETFs, stocks and other securities. In general, CCI measures the current price level relative to an average price level over a given period of time. CCI is relatively high when prices are far above their average, but is relatively low when prices are far below their average. In this manner, CCI can be used to identify overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:commodity_channel_index_cci https://www.investopedia.com/terms/c/commoditychannelindex.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cci
func (*Cci) InitPeriod ¶
type Cmo ¶
type Cmo struct {
// contains filtered or unexported fields
}
The Chande momentum oscillator is a technical momentum indicator introduced by Tushar Chande in his 1994 book The New Technical Trader. The formula calculates the difference between the sum of recent gains and the sum of recent losses and then divides the result by the sum of all price movements over the same period.
https://www.investopedia.com/terms/c/chandemomentumoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmo
func (*Cmo) InitPeriod ¶
type Dema ¶
type Dema struct {
// contains filtered or unexported fields
}
The Double Exponential Moving Average (DEMA) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term traders. DEMA was developed by Patrick Mulloy, and introduced in the January 1994 issue of Technical Analysis of Stocks & Commodities magazine. The overlay uses the lag difference between a single-smoothed EMA and a double-smoothed EMA to offset the single-smoothed EMA. This offset produces a moving average that remains smooth, but stays closer to the price bars than either the single- or double-smoothed traditional EMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:dema https://www.investopedia.com/terms/d/double-exponential-moving-average.asp
func (*Dema) InitPeriod ¶
type Dev ¶
type Dev struct {
// contains filtered or unexported fields
}
Average deviation from mean value.
func (*Dev) InitPeriod ¶
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
This is also known as Momentum (MOM). The Momentum (MOM) indicator compares the current price with the previous price from a selected number of periods ago. This indicator is similar to the “Rate of Change” indicator, but the MOM does not normalize the price, so different instruments can have different indicator values based on their point values.
func (*Diff) InitPeriod ¶
type Dx ¶
type Dx struct {
// contains filtered or unexported fields
}
Refer to ADX.
https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx
func (*Dx) InitPeriod ¶
type Ema ¶
type Ema struct {
// contains filtered or unexported fields
}
Exponential moving averages (EMAs) reduce the lag by applying more weight to recent prices. The weighting applied to the most recent price depends on the number of periods in the moving average. EMAs differ from simple moving averages in that a given day's EMA calculation depends on the EMA calculations for all the days prior to that day. You need far more than 10 days of data to calculate a reasonably accurate 10-day EMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_averages
func (*Ema) InitPeriod ¶
type Hma ¶
type Hma struct {
// contains filtered or unexported fields
}
The Triple Exponential Moving Average (Hma) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term trading. Shortly after developing the Double Exponential Moving Average (DEMA) in 1994, Patrick Mulloy took the concept a step further and created the Triple Exponential Moving Average (Hma). Like its predecessor DEMA, the Hma overlay uses the lag difference between different EMAs to adjust a traditional EMA. However, Hma's formula uses a triple-smoothed EMA in addition to the single- and double-smoothed EMAs employed in the formula for DEMA. The offset created using these three EMAs produces a moving average that stays even closer to the price bars than DEMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:Hma https://www.investopedia.com/terms/t/triple-exponential-moving-average.asp
func (*Hma) InitPeriod ¶
type JMA ¶
type JMA struct { types.SeriesBase types.IntervalWindow // required Phase float64 // required: recommend to be 0.5 Power float64 // required: recommend to be 5 E0 floats.Slice E1 floats.Slice E2 floats.Slice E3 floats.Slice PhaseRatio float64 Values floats.Slice UpdateCallbacks []func(value float64) // contains filtered or unexported fields }
Refer: Arnaud Legoux Moving Average Refer: https://capital.com/arnaud-legoux-moving-average Also check https://github.com/DaveSkender/Stock.Indicators/blob/main/src/a-d/Alma/Alma.cs @param offset: Gaussian applied to the combo line. 1->ema, 0->sma @param sigma: the standard deviation applied to the combo line. This makes the combo line sharper
type Kama ¶
type Kama struct {
// contains filtered or unexported fields
}
Developed by Perry Kaufman, Kaufman's Adaptive Moving Average (KAMA) is a moving average designed to account for market noise or volatility. KAMA will closely follow prices when the price swings are relatively small and the noise is low. KAMA will adjust when the price swings widen and follow prices from a greater distance. This trend-following indicator can be used to identify the overall trend, time turning points and filter price movements.
https://school.stockcharts.com/doku.php?id=technical_indicators:kaufman_s_adaptive_moving_average
func (*Kama) InitPeriod ¶
type Ma ¶
type Ma struct {
// contains filtered or unexported fields
}
Convenient wrapper for different moving average types
func (*Ma) InitPeriod ¶
type Macd ¶
type Macd struct {
*MacdExt
}
Developed by Gerald Appel in the late seventies, the Moving Average Convergence/Divergence oscillator (MACD) is one of the simplest and most effective momentum indicators available. The MACD turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter one. As a result, the MACD offers the best of both worlds: trend following and momentum. The MACD fluctuates above and below the zero line as the moving averages converge, cross and diverge. Traders can look for signal line crossovers, centerline crossovers and divergences to generate signals. Because the MACD is unbounded, it is not particularly useful for identifying overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_average_convergence_divergence_macd https://www.investopedia.com/terms/m/macd.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/macd
type MacdExt ¶
type MacdExt struct {
// contains filtered or unexported fields
}
Refer to MACD. This is a general version of MACD with moving average types for fast, slow, and signal lines as paremters.
func NewMacdExt ¶
func (*MacdExt) InitPeriod ¶
type Max ¶
type Max struct {
// contains filtered or unexported fields
}
Max value of the selected period.
func (*Max) InitPeriod ¶
type Mfi ¶
type Mfi struct {
// contains filtered or unexported fields
}
The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure. Created by Gene Quong and Avrum Soudack, MFI is also known as volume-weighted RSI. MFI starts with the typical price for each period. Money flow is positive when the typical price rises (buying pressure) and negative when the typical price declines (selling pressure). A ratio of positive and negative money flow is then plugged into an RSI formula to create an oscillator that moves between zero and one hundred. As a momentum oscillator tied to volume, MFI is best suited to identify reversals and price extremes with a variety of signals.
https://school.stockcharts.com/doku.php?id=technical_indicators:money_flow_index_mfi https://www.investopedia.com/terms/m/mfi.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/MFI
func (*Mfi) InitPeriod ¶
type Min ¶
type Min struct {
// contains filtered or unexported fields
}
Min value of the selected period.
func (*Min) InitPeriod ¶
type Natr ¶
type Natr struct {
// contains filtered or unexported fields
}
Normalized Average True Range (NATR) attempts to normalize the average true range values across instruments by using the closing price.
func (*Natr) InitPeriod ¶
type Obv ¶
type Obv struct {
// contains filtered or unexported fields
}
On Balance Volume (OBV) measures buying and selling pressure as a cumulative indicator, adding volume on up days and subtracting it on down days. OBV was developed by Joe Granville and introduced in his 1963 book Granville's New Key to Stock Market Profits. It was one of the first indicators to measure positive and negative volume flow. Chartists can look for divergences between OBV and price to predict price movements or use OBV to confirm price trends.
https://school.stockcharts.com/doku.php?id=technical_indicators:on_balance_volume_obv https://www.investopedia.com/terms/o/onbalancevolume.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/obv
func (*Obv) InitPeriod ¶
type Ppo ¶
type Ppo struct {
// contains filtered or unexported fields
}
The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. These signals are no different than those associated with MACD, with a few differences between the two: first, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
https://school.stockcharts.com/doku.php?id=technical_indicators:price_oscillators_ppo https://www.investopedia.com/terms/p/ppo.asp
func (*Ppo) InitPeriod ¶
type Roc ¶
type Roc struct {
// contains filtered or unexported fields
}
The Rate-of-Change (ROC) indicator, which is also referred to as simply Momentum, is a pure momentum oscillator that measures the percent change in price from one period to the next. The ROC calculation compares the current price with the price “n” periods ago. The plot forms an oscillator that fluctuates above and below the zero line as the Rate-of-Change moves from positive to negative. As a momentum oscillator, ROC signals include centerline crossovers, divergences and overbought-oversold readings. Divergences fail to foreshadow reversals more often than not, so this article will forgo a detailed discussion on them. Even though centerline crossovers are prone to whipsaw, especially short-term, these crossovers can be used to identify the overall trend. Identifying overbought or oversold extremes comes naturally to the Rate-of-Change oscillator.
https://school.stockcharts.com/doku.php?id=technical_indicators:rate_of_change_roc_and_momentum https://www.investopedia.com/terms/p/pricerateofchange.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/roc
func (*Roc) InitPeriod ¶
type Rsi ¶
type Rsi struct {
// contains filtered or unexported fields
}
Developed by J. Welles Wilder, the Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. RSI oscillates between zero and 100. According to Wilder, RSI is considered overbought when above 70 and oversold when below 30. Signals can also be generated by looking for divergences, failure swings and centerline crossovers. RSI can also be used to identify the general trend. RSI is an extremely popular momentum indicator that has been featured in a number of articles, interviews and books over the years. In particular, Constance Brown's book, Technical Analysis for the Trading Professional, features the concept of bull market and bear market ranges for RSI. Andrew Cardwell, Brown's RSI mentor, introduced positive and negative reversals for RSI and, additionally, turned the notion of divergence, literally and figuratively, on its head. Wilder features RSI in his 1978 book, New Concepts in Technical Trading Systems. This book also includes the Parabolic SAR, Average True Range and the Directional Movement Concept (ADX). Despite being developed before the computer age, Wilder's indicators have stood the test of time and remain extremely popular.
https://school.stockcharts.com/doku.php?id=technical_indicators:relative_strength_index_rsi https://www.investopedia.com/terms/r/rsi.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/RSI
func (*Rsi) InitPeriod ¶
type Sma ¶
type Sma struct {
// contains filtered or unexported fields
}
A simple moving average is formed by computing the average price of a security over a specific number of periods. Most moving averages are based on closing prices; for example, a 5-day simple moving average is the five-day sum of closing prices divided by five. As its name implies, a moving average is an average that moves. Old data is dropped as new data becomes available, causing the average to move along the time scale. The example below shows a 5-day moving average evolving over three days.
https://school.stockcharts.com/doku.php?id=technical_indicators:moving_averages https://www.investopedia.com/terms/s/sma.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/sma
func (*Sma) InitPeriod ¶
type StdDev ¶
type StdDev struct {
// contains filtered or unexported fields
}
Standard deviation is a statistical term that measures the amount of variability or dispersion around an average. Standard deviation is also a measure of volatility. Generally speaking, dispersion is the difference between the actual value and the average value. The larger this dispersion or variability is, the higher the standard deviation. The smaller this dispersion or variability is, the lower the standard deviation. Chartists can use the standard deviation to measure expected risk and determine the significance of certain price movements.
https://school.stockcharts.com/doku.php?id=technical_indicators:standard_deviation_volatility https://www.investopedia.com/terms/s/standarddeviation.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/standard-deviation
func (*StdDev) InitPeriod ¶
type StochFast ¶
type StochFast struct {
// contains filtered or unexported fields
}
Developed by George C. Lane in the late 1950s, the Stochastic Oscillator is a momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. According to an interview with Lane, the Stochastic Oscillator “doesn't follow price, it doesn't follow volume or anything like that. It follows the speed or the momentum of price. As a rule, the momentum changes direction before price.” As such, bullish and bearish divergences in the Stochastic Oscillator can be used to foreshadow reversals. This was the first, and most important, signal that Lane identified. Lane also used this oscillator to identify bull and bear set-ups to anticipate a future reversal. As the Stochastic Oscillator is range-bound, it is also useful for identifying overbought and oversold levels.
https://school.stockcharts.com/doku.php?id=technical_indicators:stochastic_oscillator_fast_slow_and_full https://www.investopedia.com/terms/s/stochasticoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/fast-stochastic
func (*StochFast) InitPeriod ¶
type StochRsi ¶
type StochRsi struct {
// contains filtered or unexported fields
}
Developed by Tushar Chande and Stanley Kroll, StochRSI is an oscillator that measures the level of RSI relative to its high-low range over a set time period. StochRsi applies the Stochastics formula to RSI values, rather than price values, making it an indicator of an indicator. The result is an oscillator that fluctuates between 0 and 1. In their 1994 book, The New Technical Trader, Chande and Kroll explain that RSI can oscillate between 80 and 20 for extended periods without reaching extreme levels. Notice that 80 and 20 are used for overbought and oversold instead of the more traditional 70 and 30. Traders looking to enter a stock based on an overbought or oversold reading in RSI might find themselves continuously on the sidelines. Chande and Kroll developed StochRSI to increase sensitivity and generate more overbought/oversold signals.
https://school.stockcharts.com/doku.php?id=technical_indicators:stochrsi https://www.investopedia.com/terms/s/stochrsi.asp
func (*StochRsi) InitPeriod ¶
type StochSlow ¶
type StochSlow struct {
// contains filtered or unexported fields
}
The Slow Stochastic Oscillator is a momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. The indicator can range from 0 to 100. The difference between the Slow and Fast Stochastic Oscillator is the Slow %K incorporates a %K slowing period of 3 that controls the internal smoothing of %K. Setting the smoothing period to 1 is equivalent to plotting the Fast Stochastic Oscillator.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/slow-stochastic
func NewStochSlow ¶
func (*StochSlow) InitPeriod ¶
type StochasticK ¶
type StochasticK struct {
// contains filtered or unexported fields
}
func NewStochasticK ¶
func NewStochasticK(kN int64) *StochasticK
func (*StochasticK) Update ¶
func (s *StochasticK) Update(h, l, c float64) float64
type Sum ¶
type Sum struct {
// contains filtered or unexported fields
}
Sum of the last N values.
func (*Sum) InitPeriod ¶
type TRange ¶
type TRange struct {
// contains filtered or unexported fields
}
Welles Wilder described these calculations to determine the trading range for a stock or commodity. True Range is defined as the largest of the following: (1) The distance from today's high to today's low. (2) The distance from yesterday's close to today's high. (3) The distance from yesterday's close to today's low. Wilder included price comparisons among subsequent bars in order to account for gaps in his range calculation.
func (*TRange) InitPeriod ¶
type Talib ¶
type Talib struct { }
type Tema ¶
type Tema struct {
// contains filtered or unexported fields
}
The Triple Exponential Moving Average (TEMA) reduces the lag of traditional EMAs, making it more responsive and better-suited for short-term trading. Shortly after developing the Double Exponential Moving Average (DEMA) in 1994, Patrick Mulloy took the concept a step further and created the Triple Exponential Moving Average (TEMA). Like its predecessor DEMA, the TEMA overlay uses the lag difference between different EMAs to adjust a traditional EMA. However, TEMA's formula uses a triple-smoothed EMA in addition to the single- and double-smoothed EMAs employed in the formula for DEMA. The offset created using these three EMAs produces a moving average that stays even closer to the price bars than DEMA.
https://school.stockcharts.com/doku.php?id=technical_indicators:tema https://www.investopedia.com/terms/t/triple-exponential-moving-average.asp
func (*Tema) InitPeriod ¶
type Trima ¶
type Trima struct {
// contains filtered or unexported fields
}
The triangular moving average (TMA) is a technical indicator that is similar to other moving averages. The TMA shows the average (or mean) price of an asset over a specified number of data points—usually a number of price bars. However, the triangular moving average differs in that it is double smoothed—which also means averaged twice.
https://www.thebalance.com/triangular-moving-average-tma-description-and-uses-1031203 https://www.fidelity.com/viewpoints/active-investor/moving-averages
func (*Trima) InitPeriod ¶
type Trix ¶
type Trix struct {
// contains filtered or unexported fields
}
TRIX is a momentum oscillator that displays the percent rate of change of a triple exponentially smoothed moving average. It was developed in the early 1980's by Jack Hutson, an editor for Technical Analysis of Stocks and Commodities magazine. With its triple smoothing, TRIX is designed to filter out insignificant price movements. Chartists can use TRIX to generate signals similar to MACD. A signal line can be applied to look for signal line crossovers. A directional bias can be determined with the absolute level. Bullish and bearish divergences can be used to anticipate reversals.
https://school.stockcharts.com/doku.php?id=technical_indicators:trix https://www.investopedia.com/terms/t/trix.asp
func (*Trix) InitPeriod ¶
type UltOsc ¶
type UltOsc struct {
// contains filtered or unexported fields
}
Developed by Larry Williams in 1976 and featured in Stocks & Commodities Magazine in 1985, the Ultimate Oscillator is a momentum oscillator designed to capture momentum across three different timeframes. The multiple timeframe objective seeks to avoid the pitfalls of other oscillators. Many momentum oscillators surge at the beginning of a strong advance, only to form a bearish divergence as the advance continues. This is because they are stuck with one timeframe. The Ultimate Oscillator attempts to correct this fault by incorporating longer timeframes into the basic formula. Williams identified a buy signal a based on a bullish divergence and a sell signal based on a bearish divergence.
https://school.stockcharts.com/doku.php?id=technical_indicators:ultimate_oscillator https://www.investopedia.com/terms/u/ultimateoscillator.asp https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/ultimate-oscillator
func (*UltOsc) InitPeriod ¶
type Var ¶
type Var struct {
// contains filtered or unexported fields
}
The term variance refers to a statistical measurement of the spread between numbers in a data set. More specifically, variance measures how far each number in the set is from the mean and thus from every other number in the set. Variance is often depicted by this symbol: σ2. It is used by both analysts and traders to determine volatility and market security. The square root of the variance is the standard deviation (σ), which helps determine the consistency of an investment’s returns over a period of time.
https://www.investopedia.com/terms/v/variance.asp
func (*Var) InitPeriod ¶
type WillR ¶
type WillR struct {
// contains filtered or unexported fields
}
Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period. In contrast, the Stochastic Oscillator reflects the level of the close relative to the lowest low. %R corrects for the inversion by multiplying the raw value by -100. As a result, the Fast Stochastic Oscillator and Williams %R produce the exact same lines, but with different scaling. Williams %R oscillates from 0 to -100; readings from 0 to -20 are considered overbought, while readings from -80 to -100 are considered oversold. Unsurprisingly, signals derived from the Stochastic Oscillator are also applicable to Williams %R.
https://school.stockcharts.com/doku.php?id=technical_indicators:williams_r https://www.investopedia.com/terms/w/williamsr.asp
func (*WillR) InitPeriod ¶
type Wma ¶
type Wma struct {
// contains filtered or unexported fields
}
A Weighted Moving Average puts more weight on recent data and less on past data. This is done by multiplying each bar’s price by a weighting factor. Because of its unique calculation, WMA will follow prices more closely than a corresponding Simple Moving Average.
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/wma
func (*Wma) InitPeriod ¶
Source Files ¶
- ad.go
- adosc.go
- adx.go
- adxr.go
- apo.go
- aroon.go
- aroonosc.go
- atr.go
- bbands.go
- bop.go
- cbuf.go
- cci.go
- cmo.go
- dema.go
- dev.go
- diff.go
- dx.go
- ema.go
- hma.go
- jma.go
- kama.go
- ma.go
- macd.go
- macdext.go
- max.go
- mfi.go
- min.go
- natr.go
- obv.go
- ppo.go
- roc.go
- rsi.go
- series.go
- sma.go
- stddev.go
- stochfast.go
- stochk.go
- stochrsi.go
- stochslow.go
- sum.go
- ta.go
- tema.go
- trange.go
- trima.go
- trix.go
- ultosc.go
- util.go
- var.go
- willr.go
- wma.go