Documentation ¶
Index ¶
- func ADL(high, low, close series.Data) (adl series.Data)
- func BBANDS(column series.Data, ma series.Data, period int, stdMultiplier float64) (upper, lower series.Data)
- func CHAIKIN(high, low, close series.Data, adjust bool) (chaikin series.Data)
- func CRSI(close series.Data, period int, periodUpDown int, periodrRoc int, adjust bool) (crsi series.Data)
- func EMA(column series.Data, period int, adjust bool) (ema series.Data)
- func FISH(low, high series.Data, period int, adjust bool) (fish series.Data)
- func HMA(column series.Data, period int) (hma series.Data)
- func KST(column series.Data, r1, r2, r3, r4 int) (k, signal series.Data)
- func MACD(column series.Data, periodFast float64, periodSlow float64, signal float64, ...) (macd, macdSignal series.Data)
- func PSAR(high, low, close series.Data, iaf float64, maxaf float64) (psarSeries, bullSeries, bearSeries series.Data)
- func PercentB(column series.Data, ma series.Data, period int, stdMultiplier float64) (percentB series.Data)
- func ROC(column series.Data, period int) (roc series.Data)
- func RSI(column series.Data, period int, adjust bool) (rsi series.Data)
- func SMA(column series.Data, period int) (sma series.Data)
- func SMM(column series.Data, period int) (smm series.Data)
- func SSMA(column series.Data, period int, adjust bool) (ssma series.Data)
- func STOCH(high, low, close series.Data, period int) (stoch series.Data)
- func STOCHD(high, low, close series.Data, period int) (stochd series.Data)
- func StochRSI(price series.Data, rsiPeriod, stochPeriod int, adjust bool) (stochRSI series.Data)
- func VZO(price, volume series.Data, period int, adjust bool) (vzo series.Data)
- func WMA(column series.Data, period int) (wma series.Data)
- type DType
- type OHLCV
- type UnixTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADL ¶ added in v0.3.1
The accumulation/distribution line was created by Marc Chaikin to determine the flow of money into or out of a security. It should not be confused with the advance/decline line. While their initials might be the same, these are entirely different indicators, and their uses are different as well. Whereas the advance/decline line can provide insight into market movements, the accumulation/distribution line is of use to traders looking to measure buy/sell pressure on a security or confirm the strength of a trend.
func BBANDS ¶
func BBANDS(column series.Data, ma series.Data, period int, stdMultiplier float64) (upper, lower series.Data)
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 narrow when volatility decreases.
func CHAIKIN ¶ added in v0.3.1
Chaikin Oscillator, named after its creator, Marc Chaikin, the Chaikin oscillator is an oscillator that measures the accumulation/distribution line of the moving average convergence divergence (MACD). The Chaikin oscillator is calculated by subtracting a 10-day exponential moving average (EMA) of the accumulation/distribution line from a three-day EMA of the accumulation/distribution line, and highlights the momentum implied by the accumulation/distribution line.
func CRSI ¶
func CRSI(close series.Data, period int, periodUpDown int, periodrRoc int, adjust bool) (crsi series.Data)
Connors RSI (CRSI) is a technical analysis indicator created by Larry Connors that is actually a composite of three separate components. The Relative Strength Index (RSI), developed by J. Welles Wilder, plays an integral role in Connors RSI. Connors RSI outputs a value between 0 and 100, which is then used to identify short-term overbought and oversold conditions.
func EMA ¶ added in v0.1.2
Exponential Weighted Moving Average - Like all moving average indicators, they are much better suited for trending markets. When the market is in a strong and sustained uptrend, the EMA indicator line will also show an uptrend and vice-versa for a down trend. EMAs are commonly used in conjunction with other indicators to confirm significant market moves and to gauge their validity.
func FISH ¶
Fisher Transform was presented by John Ehlers. It assumes that price distributions behave like square waves.
func HMA ¶ added in v0.1.3
HMA indicator is a common abbreviation of Hull Moving Average. The average was developed by Allan Hull and is used mainly to identify the current market trend. Unlike SMA (simple moving average) the curve of Hull moving average is considerably smoother. Moreover, because its aim is to minimize the lag between HMA and price it does follow the price activity much closer. It is used especially for middle-term and long-term trading.
func KST ¶
Know Sure Thing (KST) is a momentum oscillator based on the smoothed rate-of-change for four different time frames. KST measures price momentum for four different price cycles. It can be used just like any momentum oscillator. Chartists can look for divergences, overbought/oversold readings, signal line crossovers and centerline crossovers.
func MACD ¶
func MACD(column series.Data, periodFast float64, periodSlow float64, signal float64, adjust bool) (macd, macdSignal series.Data)
MACD, MACD Signal and MACD difference. The MACD Line oscillates above and below the zero line, which is also known as the centerline. These crossovers signal that the 12-day EMA has crossed the 26-day EMA. The direction, of course, depends on the direction of the moving average cross. Positive MACD indicates that the 12-day EMA is above the 26-day EMA. Positive values increase as the shorter EMA diverges further from the longer EMA. This means upside momentum is increasing. Negative MACD values indicates that the 12-day EMA is below the 26-day EMA.
Negative values increase as the shorter EMA diverges further below the longer EMA. This means downside momentum is increasing. Signal line crossovers are the most common MACD signals. The signal line is a 9-day EMA of the MACD Line. As a moving average of the indicator, it trails the MACD and makes it easier to spot MACD turns. A bullish crossover occurs when the MACD turns up and crosses above the signal line. A bearish crossover occurs when the MACD turns down and crosses below the signal line.
func PSAR ¶ added in v0.5.0
func PSAR(high, low, close series.Data, iaf float64, maxaf float64) (psarSeries, bullSeries, bearSeries series.Data)
The parabolic SAR indicator, developed by J. Wells Wilder, is used by traders to determine trend direction and potential reversals in price. The indicator uses a trailing stop and reverse method called "SAR," or stop and reverse, to identify suitable exit and entry points. Traders also refer to the indicator as the parabolic stop and reverse, parabolic SAR, or PSAR. https://www.investopedia.com/terms/p/parabolicindicator.asp https://virtualizedfrog.wordpress.com/2014/12/09/parabolic-sar-implementation-in-python/
func PercentB ¶
func PercentB(column series.Data, ma series.Data, period int, stdMultiplier float64) (percentB series.Data)
%b (pronounced 'percent b') is derived from the formula for Stochastics and shows where price is in relation to the bands. %b equals 1 at the upper band and 0 at the lower band.
func ROC ¶
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.
func RSI ¶
Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. RSI oscillates between zero and 100. Traditionally, and 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.
func SMA ¶
Simple moving average - rolling mean in pandas lingo. Also known as 'MA'. The simple moving average (SMA) is the most basic of the moving averages used for trading.
func SMM ¶ added in v0.1.2
Simple moving median, an alternative to moving average. SMA, when used to estimate the underlying trend in a time series, is susceptible to rare events such as rapid shocks or other anomalies. A more robust estimate of the trend is the simple moving median over n time periods.
func STOCH ¶ added in v0.2.1
Stochastic oscillator %K The stochastic oscillator is a momentum indicator comparing the closing price of a security to the range of its prices over a certain period of time. The sensitivity of the oscillator to market movements is reducible by adjusting that time period or by taking a moving average of the result.
func STOCHD ¶ added in v0.2.1
Stochastic oscillator %D STOCH%D is a 3 period simple moving average of %K.
func StochRSI ¶ added in v0.2.1
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, instead of price values. This makes it an indicator of an indicator. The result is an oscillator that fluctuates between 0 and 1.
func VZO ¶ added in v0.2.1
VZO uses price, previous price and moving averages to compute its oscillating value. It is a leading indicator that calculates buy and sell signals based on oversold / overbought conditions. Oscillations between the 5% and 40% levels mark a bullish trend zone, while oscillations between -40% and 5% mark a bearish trend zone. Meanwhile, readings above 40% signal an overbought condition, while readings above 60% signal an extremely overbought condition. Alternatively, readings below -40% indicate an oversold condition, which becomes extremely oversold below -60%.
Types ¶
type OHLCV ¶ added in v0.3.0
OHLCV is a data frame of open, high, close, volume columns. Implements github.com/pplcc/plotext.TOHLCVer interface.
func ReadCSV ¶ added in v0.3.0
ReadCSV parses ohlcv from csv reader. The columns are read at this order: Time Open High Low Close Volume. freq is a sample size, usually it's time.Second or time.Millisecond.
func (OHLCV) Len ¶ added in v0.4.0
Len returns the number of time, open, high, low, close, volume tuples.
func (OHLCV) Resample ¶ added in v0.3.0
Resample returns resampled copy of ohlcv. Interval is the length of one sample in seconds.