tart

package
v0.0.0-...-e3e60e4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNumOfJMA = 5_000
View Source
const MaxNumOfJMATruncateSize = 100

Variables

This section is empty.

Functions

func AdArr

func AdArr(h, l, c, v []float64) []float64

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

func AdOscArr(h, l, c, v []float64, fastN, slowN int64) []float64

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

func AdxArr(h, l, c []float64, n int64) []float64

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

func AdxRArr(h, l, c []float64, n int64) []float64

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

func ApoArr(t MaType, in []float64, fastN, slowN int64) []float64

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

func AroonArr(h, l []float64, n int64) ([]float64, []float64)

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

func AroonOscArr(h, l []float64, n int64) []float64

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

func AtrArr(h, l, c []float64, n int64) []float64

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

func BopArr(o, h, l, c []float64) []float64

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

func CciArr(h, l, c []float64, n int64) []float64

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

func CmoArr(in []float64, n int64) []float64

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

func DemaArr(in []float64, n int64) []float64

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

func DiffArr(in []float64, n int64) []float64

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

func DxArr(h, l, c []float64, n int64) []float64

Refer to ADX.

https://school.stockcharts.com/doku.php?id=technical_indicators:average_directional_index_adx

func EmaArr

func EmaArr(in []float64, n int64) []float64

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

func HmaArr(in []float64, n int64) []float64

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

func KamaArr(in []float64, n int64) []float64

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 MaArr

func MaArr(t MaType, in []float64, n int64) []float64

Convenient wrapper for different moving average types

func MacdArr

func MacdArr(in []float64, fastN, slowN, signalN int64) ([]float64, []float64, []float64)

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 MaxArr

func MaxArr(in []float64, n int64) ([]int64, []float64)

Max value of the selected period.

func MfiArr

func MfiArr(h, l, c, v []float64, n int64) []float64

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 MinArr

func MinArr(in []float64, n int64) ([]int64, []float64)

Min value of the selected period.

func NatrArr

func NatrArr(h, l, c []float64, n int64) []float64

Normalized Average True Range (NATR) attempts to normalize the average true range values across instruments by using the closing price.

func ObvArr

func ObvArr(c, v []float64) []float64

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

func PpoArr(in []float64, t MaType, fastN, slowN int64) []float64

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

func RocArr(in []float64, n int64) []float64

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

func RsiArr(in []float64, n int64) []float64

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

func SmaArr(in []float64, n int64) []float64

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

func StdDevArr(in []float64, n int64) []float64

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

func StochFastArr(h, l, c []float64, kN int64, dt MaType, dN int64) ([]float64, []float64)

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

func StochRsiArr(in []float64, n, kN int64, dt MaType, dN int64) ([]float64, []float64)

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 StochasticKArr(h, l, c []float64, kN int64) []float64

func SumArr

func SumArr(in []float64, n int64) []float64

func TRangeArr

func TRangeArr(h, l, c []float64) []float64

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

func TemaArr(in []float64, n int64) []float64

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

func TrimaArr(in []float64, n int64) []float64

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

func TrixArr(in []float64, n int64) []float64

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

func UltOscArr(h, l, c []float64, n1, n2, n3 int64) []float64

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

func VarArr(in []float64, n int64) []float64

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 VarDev

func VarDev(in []float64, n int64) []float64

func WillRArr

func WillRArr(h, l, c []float64, n int64) []float64

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

func WmaArr(in []float64, n int64) []float64

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 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 NewAd

func NewAd() *Ad

func (*Ad) InitPeriod

func (a *Ad) InitPeriod() int64

func (*Ad) Update

func (a *Ad) Update(h, l, c, v float64) float64

func (*Ad) Valid

func (a *Ad) Valid() bool

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 NewAdOsc

func NewAdOsc(fastN, slowN int64) *AdOsc

func (*AdOsc) InitPeriod

func (a *AdOsc) InitPeriod() int64

func (*AdOsc) Update

func (a *AdOsc) Update(h, l, c, v float64) float64

func (*AdOsc) Valid

func (a *AdOsc) Valid() bool

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 NewAdx

func NewAdx(n int64) *Adx

func (*Adx) InitPeriod

func (a *Adx) InitPeriod() int64

func (*Adx) Update

func (a *Adx) Update(h, l, c float64) float64

func (*Adx) Valid

func (a *Adx) Valid() bool

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 NewAdxR

func NewAdxR(n int64) *AdxR

func (*AdxR) InitPeriod

func (a *AdxR) InitPeriod() int64

func (*AdxR) Update

func (a *AdxR) Update(h, l, c float64) float64

func (*AdxR) Valid

func (a *AdxR) Valid() bool

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 NewApo

func NewApo(t MaType, fastN, slowN int64) *Apo

func (*Apo) InitPeriod

func (a *Apo) InitPeriod() int64

func (*Apo) Update

func (a *Apo) Update(v float64) float64

func (*Apo) Valid

func (a *Apo) Valid() bool

type Aroon

type Aroon struct {
	// contains filtered or unexported fields
}

func NewAroon

func NewAroon(n int64) *Aroon

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

func (a *Aroon) InitPeriod() int64

func (*Aroon) Update

func (a *Aroon) Update(h, l float64) (float64, float64)

func (*Aroon) Valid

func (a *Aroon) Valid() bool

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 NewAroonOsc(n int64) *AroonOsc

func (*AroonOsc) InitPeriod

func (a *AroonOsc) InitPeriod() int64

func (*AroonOsc) Update

func (a *AroonOsc) Update(h, l float64) float64

func (*AroonOsc) Valid

func (a *AroonOsc) Valid() bool

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 NewAtr

func NewAtr(n int64) *Atr

func (*Atr) InitPeriod

func (a *Atr) InitPeriod() int64

func (*Atr) Update

func (a *Atr) Update(h, l, c float64) float64

func (*Atr) Valid

func (a *Atr) Valid() bool

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 NewBBands

func NewBBands(t MaType, n int64, upNStdDev, dnNStdDev float64) *BBands

func (*BBands) InitPeriod

func (b *BBands) InitPeriod() int64

func (*BBands) Update

func (b *BBands) Update(v float64) (float64, float64, float64)

upper, middle, lower

func (*BBands) Valid

func (b *BBands) Valid() bool

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 NewBop

func NewBop() *Bop

func (*Bop) InitPeriod

func (b *Bop) InitPeriod() int64

func (*Bop) Update

func (b *Bop) Update(o, h, l, c float64) float64

func (*Bop) Valid

func (b *Bop) Valid() bool

type CBuf

type CBuf struct {
	// contains filtered or unexported fields
}

circular buffer maintaining fixed sized history

func NewCBuf

func NewCBuf(n int64) *CBuf

func (*CBuf) Append

func (c *CBuf) Append(v float64) float64

Append latest value and return oldest one

func (*CBuf) IndexToSeq

func (c *CBuf) IndexToSeq(idx int64) int64

From circular buf position to total sequence index

func (*CBuf) Iter

func (c *CBuf) Iter(fn func(v float64))

Iterate through buf elements and call function for each

func (*CBuf) Max

func (c *CBuf) Max() (int64, float64)

Max value in buf

func (*CBuf) Min

func (c *CBuf) Min() (int64, float64)

Min value in buf

func (*CBuf) NewestIndex

func (c *CBuf) NewestIndex() int64

Index of the latest value

func (*CBuf) NthNewest

func (c *CBuf) NthNewest(offset int64) float64

nthNewest(0) = newest nthNewest(1) = 2nd newest

func (*CBuf) NthOldest

func (c *CBuf) NthOldest(offset int64) float64

nthOldest(0) = oldest nthOldest(1) = 2nd oldest

func (*CBuf) OldestIndex

func (c *CBuf) OldestIndex() int64

Index of the oldest value

func (*CBuf) Size

func (c *CBuf) Size() int64

Number of values appended

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 NewCci

func NewCci(n int64) *Cci

func (*Cci) InitPeriod

func (d *Cci) InitPeriod() int64

func (*Cci) Update

func (d *Cci) Update(h, l, c float64) float64

func (*Cci) Valid

func (d *Cci) Valid() bool

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 NewCmo

func NewCmo(n int64) *Cmo

func (*Cmo) InitPeriod

func (c *Cmo) InitPeriod() int64

func (*Cmo) Update

func (c *Cmo) Update(v float64) float64

func (*Cmo) Valid

func (c *Cmo) Valid() bool

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 NewDema

func NewDema(n int64, k float64) *Dema

func (*Dema) InitPeriod

func (d *Dema) InitPeriod() int64

func (*Dema) Update

func (d *Dema) Update(v float64) float64

func (*Dema) Valid

func (d *Dema) Valid() bool

type Dev

type Dev struct {
	// contains filtered or unexported fields
}

Average deviation from mean value.

func NewDev

func NewDev(n int64) *Dev

func (*Dev) InitPeriod

func (d *Dev) InitPeriod() int64

func (*Dev) Update

func (d *Dev) Update(v float64) float64

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 NewDiff

func NewDiff(n int64) *Diff

func (*Diff) InitPeriod

func (d *Diff) InitPeriod() int64

func (*Diff) Update

func (d *Diff) Update(v float64) float64

func (*Diff) Valid

func (d *Diff) Valid() bool

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 NewDx

func NewDx(n int64) *Dx

func (*Dx) InitPeriod

func (d *Dx) InitPeriod() int64

func (*Dx) Update

func (d *Dx) Update(h, l, c float64) float64

func (*Dx) Valid

func (d *Dx) Valid() bool

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 NewEma

func NewEma(n int64, k float64) *Ema

func (*Ema) InitPeriod

func (e *Ema) InitPeriod() int64

func (*Ema) Update

func (e *Ema) Update(v float64) float64

func (*Ema) Valid

func (e *Ema) Valid() bool

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 NewHma

func NewHma(n int64) *Hma

func (*Hma) InitPeriod

func (t *Hma) InitPeriod() int64

func (*Hma) Update

func (t *Hma) Update(v float64) float64

func (*Hma) Valid

func (t *Hma) Valid() bool

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

func (*JMA) Index

func (inc *JMA) Index(i int) float64

func (*JMA) Last

func (inc *JMA) Last() float64

func (*JMA) Length

func (inc *JMA) Length() int

func (*JMA) Update

func (inc *JMA) Update(value float64)

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 NewKama

func NewKama(n int64) *Kama

func (*Kama) InitPeriod

func (k *Kama) InitPeriod() int64

func (*Kama) Update

func (k *Kama) Update(v float64) float64

func (*Kama) Valid

func (k *Kama) Valid() bool

type Ma

type Ma struct {
	// contains filtered or unexported fields
}

Convenient wrapper for different moving average types

func NewMa

func NewMa(t MaType, n int64) *Ma

func (*Ma) InitPeriod

func (m *Ma) InitPeriod() int64

func (*Ma) Update

func (m *Ma) Update(v float64) float64

func (*Ma) Valid

func (m *Ma) Valid() bool

type MaType

type MaType int
const (
	SMA MaType = iota
	EMA
	WMA
	DEMA
	TEMA
	TRIMA
	KAMA
)

TODO: support Mama & T3

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

func NewMacd

func NewMacd(fastN, slowN, signalN int64) *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 NewMacdExt(fastT MaType, fastN int64, slowT MaType, slowN int64, signalT MaType, signalN int64) *MacdExt

func (*MacdExt) InitPeriod

func (m *MacdExt) InitPeriod() int64

func (*MacdExt) Update

func (m *MacdExt) Update(v float64) (float64, float64, float64)

func (*MacdExt) Valid

func (m *MacdExt) Valid() bool

type Max

type Max struct {
	// contains filtered or unexported fields
}

Max value of the selected period.

func NewMax

func NewMax(n int64) *Max

func (*Max) InitPeriod

func (m *Max) InitPeriod() int64

func (*Max) Update

func (m *Max) Update(v float64) (int64, float64)

func (*Max) Valid

func (m *Max) Valid() bool

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 NewMfi

func NewMfi(n int64) *Mfi

func (*Mfi) InitPeriod

func (m *Mfi) InitPeriod() int64

func (*Mfi) Update

func (m *Mfi) Update(h, l, c, v float64) float64

func (*Mfi) Valid

func (m *Mfi) Valid() bool

type Min

type Min struct {
	// contains filtered or unexported fields
}

Min value of the selected period.

func NewMin

func NewMin(n int64) *Min

func (*Min) InitPeriod

func (m *Min) InitPeriod() int64

func (*Min) Update

func (m *Min) Update(v float64) (int64, float64)

func (*Min) Valid

func (m *Min) Valid() bool

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 NewNatr

func NewNatr(n int64) *Natr

func (*Natr) InitPeriod

func (a *Natr) InitPeriod() int64

func (*Natr) Update

func (a *Natr) Update(h, l, c float64) float64

func (*Natr) Valid

func (a *Natr) Valid() bool

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 NewObv

func NewObv() *Obv

func (*Obv) InitPeriod

func (o *Obv) InitPeriod() int64

func (*Obv) Update

func (o *Obv) Update(c, v float64) float64

func (*Obv) Valid

func (o *Obv) Valid() bool

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 NewPpo

func NewPpo(t MaType, fastN, slowN int64) *Ppo

func (*Ppo) InitPeriod

func (p *Ppo) InitPeriod() int64

func (*Ppo) Update

func (p *Ppo) Update(v float64) float64

func (*Ppo) Valid

func (p *Ppo) Valid() bool

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 NewRoc

func NewRoc(n int64) *Roc

func (*Roc) InitPeriod

func (r *Roc) InitPeriod() int64

func (*Roc) Update

func (r *Roc) Update(v float64) float64

func (*Roc) Valid

func (r *Roc) Valid() bool

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 NewRsi

func NewRsi(n int64) *Rsi

func (*Rsi) InitPeriod

func (r *Rsi) InitPeriod() int64

func (*Rsi) Update

func (r *Rsi) Update(v float64) float64

func (*Rsi) Valid

func (r *Rsi) Valid() bool

type Series

type Series []any

func NewSeries

func NewSeries(a ...any) Series

func (Series) Filter

func (V Series) Filter(predicate func(item any, index int) bool) Series

func (Series) ForEach

func (collection Series) ForEach(iteratee func(item any, index int))

func (*Series) Index

func (s *Series) Index(i int) any

func (*Series) Last

func (s *Series) Last() any

func (*Series) Length

func (s *Series) Length() int

func (Series) Map

func (V Series) Map(iteratee func(item any, index int) any) Series

func (*Series) Pop

func (s *Series) Pop(i int64) (v any)

func (*Series) Push

func (s *Series) Push(v any)

func (Series) Reduce

func (V Series) Reduce(accumulator func(agg any, item any, index int) any, initial any) any

func (Series) Tail

func (s Series) Tail(size int) Series

func (*Series) Update

func (s *Series) Update(v any)

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 NewSma

func NewSma(n int64) *Sma

func (*Sma) InitPeriod

func (s *Sma) InitPeriod() int64

func (*Sma) Update

func (s *Sma) Update(v float64) float64

func (*Sma) Valid

func (s *Sma) Valid() bool

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 NewStdDev

func NewStdDev(n int64) *StdDev

func (*StdDev) InitPeriod

func (s *StdDev) InitPeriod() int64

func (*StdDev) Update

func (s *StdDev) Update(v float64) float64

func (*StdDev) Valid

func (s *StdDev) Valid() bool

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 NewStochFast

func NewStochFast(kN int64, dt MaType, dN int64) *StochFast

func (*StochFast) InitPeriod

func (s *StochFast) InitPeriod() int64

func (*StochFast) Update

func (s *StochFast) Update(h, l, c float64) (float64, float64)

func (*StochFast) Valid

func (s *StochFast) Valid() bool

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 NewStochRsi

func NewStochRsi(n int64, kN int64, dt MaType, dN int64) *StochRsi

func (*StochRsi) InitPeriod

func (s *StochRsi) InitPeriod() int64

func (*StochRsi) Update

func (s *StochRsi) Update(v float64) (float64, float64)

func (*StochRsi) Valid

func (s *StochRsi) Valid() bool

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 NewStochSlow(fastKN int64, kt MaType, slowKN int64, dt MaType, slowDN int64) *StochSlow

func (*StochSlow) InitPeriod

func (s *StochSlow) InitPeriod() int64

func (*StochSlow) Update

func (s *StochSlow) Update(h, l, c float64) (float64, float64)

func (*StochSlow) Valid

func (s *StochSlow) Valid() bool

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 NewSum

func NewSum(n int64) *Sum

func (*Sum) InitPeriod

func (s *Sum) InitPeriod() int64

func (*Sum) Update

func (s *Sum) Update(v float64) float64

func (*Sum) Valid

func (s *Sum) Valid() bool

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 NewTRange

func NewTRange() *TRange

func (*TRange) InitPeriod

func (t *TRange) InitPeriod() int64

func (*TRange) Update

func (t *TRange) Update(h, l, c float64) float64

func (*TRange) Valid

func (t *TRange) Valid() bool

type Talib

type Talib struct {
}

func (Talib) Adx

func (ta Talib) Adx(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) Apo

func (ta Talib) Apo(t MaType, in floats.Slice, fastN, slowN int64) floats.Slice

func (Talib) Aroon

func (ta Talib) Aroon(h, l floats.Slice, n int64) (floats.Slice, floats.Slice)

func (Talib) AroonOsc

func (ta Talib) AroonOsc(h, l floats.Slice, n int64) floats.Slice

func (Talib) Atr

func (ta Talib) Atr(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) BBands

func (ta Talib) BBands(t MaType, in floats.Slice, n int64, upNStdDev, dnNStdDev float64) (floats.Slice, floats.Slice, floats.Slice)

func (Talib) Cci

func (ta Talib) Cci(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) Cmo

func (ta Talib) Cmo(in floats.Slice, n int64) floats.Slice

func (Talib) Dema

func (ta Talib) Dema(in floats.Slice, n int64) floats.Slice

func (Talib) Dev

func (ta Talib) Dev(in floats.Slice, n int64) floats.Slice

func (Talib) Diff

func (ta Talib) Diff(in floats.Slice, n int64) floats.Slice

func (Talib) Dx

func (ta Talib) Dx(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) Ema

func (ta Talib) Ema(in floats.Slice, n int64) floats.Slice

func (Talib) Kama

func (ta Talib) Kama(in floats.Slice, n int64) floats.Slice

func (Talib) Macd

func (ta Talib) Macd(in floats.Slice, fastN, slowN, signalN int64) (floats.Slice, floats.Slice, floats.Slice)

func (Talib) Natr

func (ta Talib) Natr(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) Obv

func (ta Talib) Obv(c, v floats.Slice) floats.Slice

func (Talib) Ppo

func (ta Talib) Ppo(in floats.Slice, t MaType, fastN, slowN int64) floats.Slice

func (Talib) Roc

func (ta Talib) Roc(in floats.Slice, n int64) floats.Slice

func (Talib) Rsi

func (ta Talib) Rsi(in floats.Slice, n int64) floats.Slice

func (Talib) Sma

func (ta Talib) Sma(in floats.Slice, n int64) floats.Slice

func (Talib) StdDev

func (ta Talib) StdDev(in floats.Slice, n int64) floats.Slice

func (Talib) StochRsi

func (ta Talib) StochRsi(in floats.Slice, n, kN int64, dt MaType, dN int64) (floats.Slice, floats.Slice)

func (Talib) TRange

func (ta Talib) TRange(h, l, c floats.Slice) floats.Slice

func (Talib) Trima

func (ta Talib) Trima(in floats.Slice, n int64) floats.Slice

func (Talib) Trix

func (ta Talib) Trix(in floats.Slice, n int64) floats.Slice

func (Talib) UltOsc

func (ta Talib) UltOsc(h, l, c floats.Slice, n1, n2, n3 int64) floats.Slice

func (Talib) Var

func (ta Talib) Var(in floats.Slice, n int64) floats.Slice

func (Talib) WillR

func (ta Talib) WillR(h, l, c floats.Slice, n int64) floats.Slice

func (Talib) Wma

func (ta Talib) Wma(in floats.Slice, n int64) floats.Slice

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 NewTema

func NewTema(n int64, k float64) *Tema

func (*Tema) InitPeriod

func (t *Tema) InitPeriod() int64

func (*Tema) Update

func (t *Tema) Update(v float64) float64

func (*Tema) Valid

func (t *Tema) Valid() bool

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 NewTrima

func NewTrima(n int64) *Trima

func (*Trima) InitPeriod

func (t *Trima) InitPeriod() int64

func (*Trima) Update

func (t *Trima) Update(v float64) float64

func (*Trima) Valid

func (t *Trima) Valid() bool

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 NewTrix

func NewTrix(n int64) *Trix

func (*Trix) InitPeriod

func (t *Trix) InitPeriod() int64

func (*Trix) Update

func (t *Trix) Update(v float64) float64

func (*Trix) Valid

func (t *Trix) Valid() bool

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 NewUltOsc

func NewUltOsc(n1, n2, n3 int64) *UltOsc

func (*UltOsc) InitPeriod

func (u *UltOsc) InitPeriod() int64

func (*UltOsc) Update

func (u *UltOsc) Update(h, l, c float64) float64

func (*UltOsc) Valid

func (u *UltOsc) Valid() bool

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 NewVar

func NewVar(n int64) *Var

func (*Var) InitPeriod

func (r *Var) InitPeriod() int64

func (*Var) Update

func (r *Var) Update(v float64) float64

func (*Var) Valid

func (r *Var) Valid() bool

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 NewWillR

func NewWillR(n int64) *WillR

func (*WillR) InitPeriod

func (w *WillR) InitPeriod() int64

func (*WillR) Update

func (w *WillR) Update(h, l, c float64) float64

func (*WillR) Valid

func (w *WillR) Valid() bool

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 NewWma

func NewWma(n int64) *Wma

func (*Wma) InitPeriod

func (w *Wma) InitPeriod() int64

func (*Wma) Update

func (w *Wma) Update(v float64) float64

func (*Wma) Valid

func (w *Wma) Valid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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