Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
UniversalTicker string `yaml:"universal_ticker"`
Interval string `yaml:"interval"` // e.g. 1m, 5m, 1h
Period int `yaml:"period"` // window length n
}
Config is the YAML configuration for the SMA strategy.
type SMA ¶
type SMA struct {
strategy.StrategyActorBase
// contains filtered or unexported fields
}
SMA computes a simple moving average over the last n closed kline closes. On the first live kline it requests the previous n-1 bars, seeds a circular buffer, then overwrites the oldest close on each subsequent closed bar.
Click to show internal directories.
Click to hide internal directories.