entities

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEntityListToModelList

func FromEntityListToModelList(entities []SimpleMovingAverage) (*timeserie.TimeSerie[float64], error)

Types

type SimpleMovingAverage

type SimpleMovingAverage struct {
	ExchangeName string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PairSymbol   string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PeriodSymbol string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PeriodNumber int       `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	PriceType    string    `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Time         time.Time `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
	Price        float64
}

func FromModelListToEntityList

func FromModelListToEntityList(exchange, pair, period string, periodNb int, priceType candlestick.PriceType, ts *timeserie.TimeSerie[float64]) []SimpleMovingAverage

func (*SimpleMovingAverage) FromModel

func (s *SimpleMovingAverage) FromModel(exchange, pair, period string, periodNb int, priceType candlestick.PriceType, t time.Time, price float64)

func (SimpleMovingAverage) ToModel

func (s SimpleMovingAverage) ToModel() (exchange, pair, period string, periodNb int, priceType candlestick.PriceType, t time.Time, price float64)

Jump to

Keyboard shortcuts

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