Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromEntitiesToMap ¶
func FromEntitiesToMap(entities []SimpleMovingAverage) []map[string]interface{}
FromEntitiesToMap converts a list of entities to a map.
func FromEntityListToModelList ¶
func FromEntityListToModelList(entities []SimpleMovingAverage) (*timeseries.TimeSerie[float64], error)
FromEntityListToModelList converts a list of entities to a timeserie.
Types ¶
type SimpleMovingAverage ¶
type SimpleMovingAverage struct {
Exchange string `db:"exchange"`
Pair string `db:"pair"`
Period string `db:"period"`
PeriodNumber int `db:"period_number"`
PriceType string `db:"price_type"`
Time time.Time `db:"time"`
Data []byte `db:"data"`
}
SimpleMovingAverage is the entity for the simple moving average.
func FromModelListToEntityList ¶
func FromModelListToEntityList( exchange, pair string, period period.Symbol, periodNb int, priceType candlestick.PriceType, ts *timeseries.TimeSerie[float64], ) ([]SimpleMovingAverage, error)
FromModelListToEntityList converts a timeserie to a list of entities.
type SimpleMovingAverageData ¶
type SimpleMovingAverageData struct {
Price float64 `db:"price"`
}
SimpleMovingAverageData is the entity for the simple moving average data.
Click to show internal directories.
Click to hide internal directories.