Documentation ¶
Index ¶
Constants ¶
View Source
const (
// "https://datafeed.dukascopy.com/datafeed/{currency}/{year}/{month:02d}/{day:02d}/{hour:02d}h_ticks.bi5"
DukaTmplURL = "https://datafeed.dukascopy.com/datafeed/%s/%04d/%02d/%02d/%02dh_ticks.bi5"
)
Variables ¶
View Source
var (
TimeframeRegx = regexp.MustCompile(`(M|H|D|W|MN)(\d+)`)
)
Functions ¶
func ParseTimeframe ¶
ParseTimeframe from input string
Types ¶
type Converter ¶
type Converter interface { // PackTicks by timeframe M1,M5... // `barTimestamp` is the timeframe in seconds // `ticks` is all the ticks data within timeframe PackTicks(barTimestamp uint32, ticks []*tickdata.TickData) error // Finish current timeframe Finish() error }
Converter convert raw tick data into different file format such as fxt, hst, csv
func NewTimeframe ¶
func NewTimeframe(period string, instrument *instrument.Metadata, out Converter) Converter
NewTimeframe create an new timeframe
type Downloader ¶
type Downloader interface {
Download(URL string, toFilePath string) (httpStatusCode int, filesize int64, err error)
}
Downloader interface...
func NewDownloader ¶
func NewDownloader() Downloader
type HTTPDownload ¶
type HTTPDownload struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.