indicators

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AverageTrueRange = "Average True Range"

AverageTrueRange is the string constant

View Source
const BollingerBands = "Bollinger Bands"

BollingerBands is the string constant

View Source
const CorrelationCoefficient = "Correlation Coefficient"

CorrelationCoefficient is the string constant

View Source
const ExponentialMovingAverage = "Exponential Moving Average"

ExponentialMovingAverage is the string constant

View Source
const MoneyFlowIndex = "Money Flow Index"

MoneyFlowIndex is the string constant

View Source
const MovingAverageConvergenceDivergence = "Moving Average Convergence Divergence"

MovingAverageConvergenceDivergence is the string constant

View Source
const OHLCV = "OHLCV data"

OHLCV locale string for OHLCV data conversion failure

View Source
const OnBalanceVolume = "On Balance Volume"

OnBalanceVolume is the string constant

View Source
const RelativeStrengthIndex = "Relative Strength Index"

RelativeStrengthIndex is the string constant

View Source
const SimpleMovingAverage = "Simple Moving Average"

SimpleMovingAverage is the string constant

Variables

View Source
var AtrModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: atr},
}

AtrModule range indicator commands

View Source
var BBandsModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: bbands},
}

BBandsModule bollinger bands indicator commands

View Source
var CorrelationCoefficientModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: correlationCoefficient},
}

CorrelationCoefficientModule indicator commands

View Source
var EMAModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: ema},
}

EMAModule EMA indicator commands

View Source
var MACDModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: macd},
}

MACDModule MACD indicator commands

View Source
var MfiModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: mfi},
}

MfiModule index indicator commands

View Source
var ObvModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: obv},
}

ObvModule volume indicator commands

View Source
var RsiModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: rsi},
}

RsiModule relative strength index indicator commands

View Source
var SMAModule = map[string]objects.Object{
	"calculate": &objects.UserFunction{Name: "calculate", Value: sma},
}

SMAModule simple moving average indicator commands

Functions

func ParseIndicatorSelector

func ParseIndicatorSelector(in string) (int, error)

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 ATR

type ATR struct {
	objects.Array
	Period int
}

ATR defines a custom Average True Range indicator tengo object

func (*ATR) TypeName

func (o *ATR) TypeName() string

TypeName returns the name of the custom type.

type BBands

type BBands struct {
	objects.Array
	Period               int
	STDDevUp, STDDevDown float64
	MAType               indicators.MaType
}

BBands defines a custom Bollinger Bands indicator tengo object

func (*BBands) TypeName

func (o *BBands) TypeName() string

TypeName returns the name of the custom type.

type Correlation

type Correlation struct {
	objects.Array
	Period int
}

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.

type EMA

type EMA struct {
	objects.Array
	Period int
}

EMA defines a custom Exponential Moving Average indicator tengo object

func (*EMA) TypeName

func (o *EMA) TypeName() string

TypeName returns the name of the custom type.

type MACD

type MACD struct {
	objects.Array
	Period, PeriodSlow, PeriodFast int
}

MACD defines a custom Moving Average Convergence Divergence tengo indicator object type

func (*MACD) TypeName

func (o *MACD) TypeName() string

TypeName returns the name of the custom type.

type MFI

type MFI struct {
	objects.Array
	Period int
}

MFI defines a custom Money Flow Index tengo indicator object type

func (*MFI) TypeName

func (o *MFI) TypeName() string

TypeName returns the name of the custom type.

type OBV

type OBV struct {
	objects.Array
}

OBV defines a custom On Balance Volume tengo indicator object type

func (*OBV) TypeName

func (o *OBV) TypeName() string

TypeName returns the name of the custom type.

type RSI

type RSI struct {
	objects.Array
	Period int
}

RSI defines a custom Relative Strength Index indicator tengo object type

func (*RSI) TypeName

func (o *RSI) TypeName() string

TypeName returns the name of the custom type.

type SMA

type SMA struct {
	objects.Array
	Period int
}

SMA defines a custom Simple Moving Average indicator tengo object type

func (*SMA) TypeName

func (o *SMA) TypeName() string

TypeName returns the name of the custom type.

Jump to

Keyboard shortcuts

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