Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IIndicator ¶
type IIndicator interface {
GetID() string
GetName() string
SetCallback(*StrategyCallback)
Run() (IndicatorResults, error)
}
IIndicator -
type IndicatorOptions ¶
type IndicatorOptions struct {
Candle int `json:"candle"`
CalculationEverySecond bool `json:"calculationEverySecond"`
FullResults bool `json:"fullResults"`
Others map[string]interface{} `json:"others"`
Triggers IndicatorTrigger `json:"triggers"`
}
type IndicatorResults ¶
type IndicatorResults struct {
Values interface{} `json:"values"`
Signal IndicatorSignal `json:"signal"`
TriggerBy int `json:"triggerBy"`
Others interface{} `json:"others"`
}
type IndicatorSignal ¶
type IndicatorSignal int
IndicatorSignal -
const ( IndicatorSignalCall IndicatorSignal = iota + 1 IndicatorSignalPut IndicatorSignalNeutral )
type IndicatorTrigger ¶
type Indicators ¶
type Indicators struct {
ID string `json:"id"`
Options IndicatorOptions `json:"options"`
}
Indicators -
type IndicatorsGroup ¶
type IndicatorsGroup struct {
ID string `json:"id"`
Name string `json:"name"`
Indicators []Indicators `json:"indicators"`
SignalTrigger int `json:"signalTrigger"`
}
IndicatorsGroup -
type Strategy ¶
type Strategy struct {
ID string `json:"id"`
Name string `json:"name"`
Group []IndicatorsGroup `json:"group"`
}
Strategy -
Source Files
¶
- indicator.go
- models.go
Click to show internal directories.
Click to hide internal directories.