Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGeneric is a generic error happening for any error on SMA package. ErrGeneric = errors.New("error with SMA") )
Functions ¶
func InvalidValues ¶
InvalidValues returns true if there is at least one invalid value in the timeserie.
Types ¶
type Point ¶
type Point struct {
Exchange string
Pair string
Period period.Symbol
PeriodNb int
PriceType candlestick.PriceType
Time time.Time
Price float64
}
Point is a point of the SMA.
func NewPoint ¶
func NewPoint(params PointParameters) Point
NewPoint creates a new point from the given parameters.
type PointParameters ¶
type PointParameters struct {
Candlesticks *candlestick.List
PriceType candlestick.PriceType
}
PointParameters is the params for the Point function.
type TimeSerieParams ¶
type TimeSerieParams struct {
Candlesticks *candlestick.List
PriceType candlestick.PriceType
Start time.Time
End time.Time
PeriodNumber int
}
TimeSerieParams is the parameters needed to create a timeserie.
Click to show internal directories.
Click to hide internal directories.