Documentation
¶
Index ¶
- type Engine
- func (e *Engine) AddExchanger(ex Exchanger)
- func (e *Engine) AddStrategy(strategy *Strategy)
- func (e *Engine) AddSymbol(symbol string, quotes chan Quote, trades chan Trade)
- func (e *Engine) LoadHistory(symbol string, tf Timeframe, reader io.Reader) error
- func (e *Engine) Run()
- func (e *Engine) Stop()
- type Exchanger
- type History
- type Level
- type OHLC
- type Order
- type OrderType
- type Position
- type Quote
- type Signal
- type Strategy
- type Timeframe
- type Trade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine that runs strategies
func (*Engine) LoadHistory ¶
LoadHistory of instrument
type Exchanger ¶
type Exchanger interface {
Orders() []Order
Positions() []Position
NewOrder(Order) (string, error)
CancelOrder(string) (bool, error)
}
Exchanger interface
type Strategy ¶
type Strategy struct {
Symbol string
Code string
Title string
Parts int
Size int
Decimal int
OnTick func(*Engine) (Signal, error)
Init func(*Engine) error
}
Strategy struct
Source Files
¶
Click to show internal directories.
Click to hide internal directories.