Documentation
¶
Index ¶
- func CompareBarWithTimestamp(bar *Bar, t time.Time) int
- func StoreBars(w io.Writer, bars Bars) error
- type Bar
- type BarCollector
- type Bars
- func (bars Bars) BinarySearch(t time.Time) (int, bool)
- func (bars Bars) ClosePrices() []float64
- func (bars Bars) IndexForward(t time.Time) (int, bool)
- func (bars Bars) IndexReverse(t time.Time) (int, bool)
- func (bars Bars) Last() *Bar
- func (bars Bars) LastN(n int) Bars
- func (bars Bars) Localize()
- func (bars Bars) NextN(index, n int) Bars
- func (bars Bars) TimeSpan() timespan.TimeSpan
- func (bars Bars) Timestamps() []time.Time
- type CollectCommand
- type OHLC
- func (ohlc *OHLC) Float64s() []float64
- func (ohlc *OHLC) GetClose() float64
- func (ohlc *OHLC) GetHigh() float64
- func (ohlc *OHLC) GetLow() float64
- func (ohlc *OHLC) GetOpen() float64
- func (ohlc *OHLC) HL2() float64
- func (ohlc *OHLC) HLC3() float64
- func (ohlc *OHLC) HLCC4() float64
- func (ohlc *OHLC) OCC3() float64
- func (ohlc *OHLC) OHLC4() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bar ¶
type Bar struct {
Timestamp time.Time `json:"t"`
Volume uint64 `json:"v"`
TradeCount uint64 `json:"n"`
VWAP float64 `json:"vw"`
*OHLC
}
func NewBarFromAlpaca ¶
func NewBarFromAlpaca(alpacaBar marketdata.Bar) *Bar
func (*Bar) HeikinAshi ¶
type BarCollector ¶
type CollectCommand ¶
type CollectCommand struct {
End, Start date.Date
Dir string
Symbol string
Location *time.Location
Collector BarCollector
}
func (*CollectCommand) Init ¶
func (cmd *CollectCommand) Init() error
func (*CollectCommand) Run ¶
func (cmd *CollectCommand) Run() error
Click to show internal directories.
Click to hide internal directories.