candlestick_chart

package module
v0.0.0-...-87ee96e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2017 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-candlesticks

Provides a candlestick chart data type in Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candle

type Candle struct {
	Time   time.Time
	Open   float64
	Close  float64
	High   float64
	Low    float64
	Volume float64
}

func NewCandle

func NewCandle(ti time.Time, value float64, volume float64) *Candle

func (*Candle) Add

func (candle *Candle) Add(value float64, volume float64)

type CandlestickChart

type CandlestickChart struct {
	Candles          []*Candle
	Resolution       time.Duration
	TimeSeries       map[time.Time]*Candle
	LastCandle       *Candle
	CurrentCandle    *Candle
	CurrentCandleNew bool
	StartTime        time.Time
	EndTime          time.Time
}

func NewCandlestickChart

func NewCandlestickChart(res time.Duration) *CandlestickChart

func (*CandlestickChart) AddCandle

func (chart *CandlestickChart) AddCandle(candle *Candle)

func (*CandlestickChart) AddTrade

func (chart *CandlestickChart) AddTrade(ti time.Time, value float64, volume float64)

Jump to

Keyboard shortcuts

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