candle

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candle

type Candle struct {
	// contains filtered or unexported fields
}

func NewCandle

func NewCandle(period int64, cap int) *Candle

func (*Candle) Add

func (c *Candle) Add(t platform.Trade) (filled bool)

func (*Candle) AppendRaw

func (c *Candle) AppendRaw(time int64, open, high, low, close, volume Fixed)

func (*Candle) BufLen

func (c *Candle) BufLen() int

func (*Candle) Count

func (c *Candle) Count() int64

func (*Candle) History

func (c *Candle) History() History

func (*Candle) HistoryFloat32

func (c *Candle) HistoryFloat32() HistoryFloat32

func (*Candle) Last

func (c *Candle) Last() (time int64, open, high, low, close, volume Fixed)

type Fixed

type Fixed = fixed.Fixed

type History

type History struct {
	Time   []int64
	Open   []Fixed
	High   []Fixed
	Low    []Fixed
	Close  []Fixed
	Volume []Fixed
}

func MakeHistory

func MakeHistory(cap int) History

func (History) Slice

func (h History) Slice(l, r int) History

type HistoryFloat32

type HistoryFloat32 struct {
	Time   []int64
	Open   []float32
	High   []float32
	Low    []float32
	Close  []float32
	Volume []float32
}

func MakeHistoryFloat32

func MakeHistoryFloat32(cap int) HistoryFloat32

func (HistoryFloat32) Slice

func (h HistoryFloat32) Slice(l, r int) HistoryFloat32

type OHLCV

type OHLCV struct {
	Date   ringi64.Ring
	Open   ringfixed.Ring
	High   ringfixed.Ring
	Low    ringfixed.Ring
	Close  ringfixed.Ring
	Volume ringfixed.Ring
}

func NewOHLCV

func NewOHLCV(cap int) *OHLCV

Jump to

Keyboard shortcuts

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