Documentation ¶
Index ¶
Constants ¶
const AverageTrueRange = "Average True Range"
AverageTrueRange is the string constant
const BollingerBands = "Bollinger Bands"
BollingerBands is the string constant
const CorrelationCoefficient = "Correlation Coefficient"
CorrelationCoefficient is the string constant
const ExponentialMovingAverage = "Exponential Moving Average"
ExponentialMovingAverage is the string constant
const MoneyFlowIndex = "Money Flow Index"
MoneyFlowIndex is the string constant
const MovingAverageConvergenceDivergence = "Moving Average Convergence Divergence"
MovingAverageConvergenceDivergence is the string constant
const OHLCV = "OHLCV data"
OHLCV locale string for OHLCV data conversion failure
const OnBalanceVolume = "On Balance Volume"
OnBalanceVolume is the string constant
const RelativeStrengthIndex = "Relative Strength Index"
RelativeStrengthIndex is the string constant
const SimpleMovingAverage = "Simple Moving Average"
SimpleMovingAverage is the string constant
Variables ¶
var AtrModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: atr}, }
AtrModule range indicator commands
var BBandsModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: bbands}, }
BBandsModule bollinger bands indicator commands
var CorrelationCoefficientModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: correlationCoefficient}, }
CorrelationCoefficientModule indicator commands
var EMAModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: ema}, }
EMAModule EMA indicator commands
var MACDModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: macd}, }
MACDModule MACD indicator commands
var MfiModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: mfi}, }
MfiModule index indicator commands
var ObvModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: obv}, }
ObvModule volume indicator commands
var RsiModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: rsi}, }
RsiModule relative strength index indicator commands
var SMAModule = map[string]objects.Object{ "calculate": &objects.UserFunction{Name: "calculate", Value: sma}, }
SMAModule simple moving average indicator commands
Functions ¶
func ParseIndicatorSelector ¶
ParseIndicatorSelector returns indicator number from string for slice selection
func ParseMAType ¶
func ParseMAType(in string) (indicators.MaType, error)
ParseMAType returns moving average from sring
Types ¶
type BBands ¶
type BBands struct { objects.Array Period int STDDevUp, STDDevDown float64 MAType indicators.MaType }
BBands defines a custom Bollinger Bands indicator tengo object
type Correlation ¶
Correlation defines a custom correlation coefficient indicator tengo object
func (*Correlation) TypeName ¶
func (c *Correlation) TypeName() string
TypeName returns the name of the custom type.