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)
Click to show internal directories.
Click to hide internal directories.