Documentation ¶
Index ¶
- Constants
- func New(initial [LongEMA]ad.Input) (*Chaikin, Result)
- func NewBig(initial [LongEMA]ad.BigInput) (*BigChaikin, BigResult)
- func NewBigCustom(initial []ad.BigInput, shortPeriod uint, ...) (*BigChaikin, BigResult)
- func NewCustom(initial []ad.Input, shortPeriod uint, shortSmoothing, longSmoothing float64) (*Chaikin, Result)
- type BigChaikin
- type BigResult
- type Chaikin
- type Result
Constants ¶
const ( // ShortEMA is the number of periods in the short EMA of the Accumulation Distribution Line results. For the Chaikin // Oscillator. ShortEMA = 3 // LongEMA is the number of periods in the long EMA of the Accumulation Distribution Line results. For the Chaikin // Oscillator. LongEMA = 10 )
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new Chaikin Oscillator and returns its first point along with the corresponding Accumulation Distribution Line point.
func NewBig ¶
func NewBig(initial [LongEMA]ad.BigInput) (*BigChaikin, BigResult)
NewBig creates a new Chaikin Oscillator and returns its first point along with the corresponding Accumulation Distribution Line point.
func NewBigCustom ¶ added in v0.2.2
func NewBigCustom(initial []ad.BigInput, shortPeriod uint, shortSmoothing, longSmoothing *big.Float) (*BigChaikin, BigResult)
NewBigCustom creates a new Chaikin Oscillator and returns its first point along with the corresponding Accumulation Distribution Line point. Custom (non-Chaikin approved) inputs are allowed. The length of the initial input slice is the length of the long EMA period.
func NewCustom ¶ added in v0.2.2
func NewCustom(initial []ad.Input, shortPeriod uint, shortSmoothing, longSmoothing float64) (*Chaikin, Result)
NewCustom creates a new Chaikin Oscillator and returns its first point along with the corresponding Accumulation Distribution Line point. Custom (non-Chaikin approved) inputs are allowed. The length of the initial input slice is the length of the long EMA period.
Types ¶
type BigChaikin ¶
type BigChaikin struct {
// contains filtered or unexported fields
}
BigChaikin represents the state of the Chaikin Oscillator.
func (*BigChaikin) Calculate ¶
func (c *BigChaikin) Calculate(next ad.BigInput) BigResult
Calculate produces the next point on the Chaikin Oscillator given the current period's information.