wickra

package module
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0, MIT Imports: 6 Imported by: 0

README

CI codecov Go module

Wickra — Go


▶ Live demo: all 514 indicators over real Binance market data, computed live in your browser — live.wickra.org · zero backend, powered by wickra-wasm.

Streaming-first technical indicators for Go, over the Wickra C ABI hub via cgo.

Wickra is a multi-language technical-analysis library with a Rust core and bindings for Python, Node.js and WASM, plus a C ABI for C, C++, C#, Go, Java, R and any other C-capable language. Every indicator is an incremental streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the Go binding; it consumes the C ABI hub through cgo and exposes all 515 streaming-first indicators as idiomatic types.

Install

Use the published wickra-go module, which bundles the prebuilt C ABI library for every platform, so go get + go build works with no extra steps (a C compiler is still required, as the binding uses cgo):

go get github.com/wickra-lib/wickra-go/v2
import wickra "github.com/wickra-lib/wickra-go/v2"

From 2.0 the module path carries the major version (/v2), as Go's semantic import versioning requires; 1.x stays at the bare path.

wickra-go is generated from this directory by the release pipeline: it mirrors the Go sources, the vendored C ABI header (include/wickra.h) and the prebuilt libraries under lib/<goos>_<goarch>/. On Linux/macOS the library path is baked in via rpath; on Windows the DLL must be discoverable at run time (next to the executable or on PATH).

Building from this repository (contributors)

This bindings/go directory is the development source. To build it directly, compile the C ABI and stage the library into the per-platform directory cgo links against:

cargo build -p wickra-c --release
mkdir -p bindings/go/lib/linux_amd64                 # match your GOOS_GOARCH
cp target/release/libwickra.so    bindings/go/lib/linux_amd64/    # Linux
cp target/release/libwickra.dylib bindings/go/lib/darwin_arm64/   # macOS (arm64)
cp target/release/wickra.dll      bindings/go/lib/windows_amd64/  # Windows

Quick start

package main

import (
	"fmt"

	wickra "github.com/wickra-lib/wickra-go/v2"
)

func main() {
	// Batch: run an indicator over a whole series (NaN at warmup positions).
	prices := make([]float64, 1000)
	for i := range prices {
		prices[i] = 100.0 + float64(i)*0.1
	}
	sma, _ := wickra.NewSma(20)
	defer sma.Close()
	values := sma.Batch(prices)

	// Streaming: the same indicator, fed tick by tick.
	rsi, _ := wickra.NewRsi(14)
	defer rsi.Close()
	for _, price := range prices {
		value := rsi.Update(price) // NaN during warmup, no recomputation
		if value > 70 {
			fmt.Println("overbought")
		}
	}
	_ = values
}

Batch(prices) and feeding the same prices through Update() produce identical values — the equivalence is enforced by the test suite. Multi-output indicators (MACD, Bollinger, ADX, …) return (Output, bool), with false while warming up. Every indicator owns a native handle freed by Close(); a finalizer is wired as a backstop, but call Close() (e.g. with defer) to release memory promptly.

Reusing a buffer, and the opt-in fast batch

Every single-output Batch has a BatchInto(dst, ...) form that writes into a caller slice (destination first, as copy does) and allocates nothing, and a BatchFast / BatchFastInto twin:

out := make([]float64, len(prices))
exact, _ := wickra.NewSma(20)
defer exact.Close()
exact.BatchInto(out, prices) // the same bits as a fresh Sma's Batch(prices)

fast, _ := wickra.NewEma(20)
defer fast.Close()
fast.BatchFastInto(out, prices) // or: values := fast.BatchFast(prices)

BatchFast runs a SIMD kernel where the indicator has one (moving averages, RSI, ATR, MACD, Bollinger, Chaikin, skewness, Pearson and more). The kernel reassociates the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Where there is no kernel, BatchFast is Batch exactly. An indicator keeps its state across calls, so a second batch on the same instance continues the series.

Benchmark

benchmarks/throughput.go reports streaming and batch updates-per-second for SMA, ATR and MACD. It measures this binding's FFI overhead, not a cross-library ratio (the same Rust core runs under every binding) — see the repository BENCHMARKS.md §3.

cd benchmarks && go run .

Documentation

The full indicator catalogue, guides, quickstarts, and API reference live in the main repository and documentation site:

Wickra ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — all exposing the same indicators from the shared, unsafe-forbidden Rust core.

Security

Found a security issue? Please don't open a public issue. Report it privately via the affected repository's Security tab ("Report a vulnerability") or email support@wickra.org with a subject line starting [wickra security]. Full policy: https://github.com/wickra-lib/wickra/blob/main/SECURITY.md.

Disclaimer

Wickra is an indicator toolkit, not a trading system. The values it computes are deterministic transforms of the input data — they are not financial advice and do not predict the market. Any use in a live trading context is at your own risk. The library is provided as is, without warranty of any kind.

License

Licensed under either of Apache-2.0 or MIT at your option.

Documentation

Overview

Package wickra provides idiomatic Go bindings for the Wickra technical-analysis library over its C ABI hub.

Each indicator is an opaque-handle type with a New<Indicator> constructor and Update/Batch/Reset/Close methods. Handles are freed by Close and, as a backstop, by a finalizer; call Close explicitly to release native memory promptly. The binding links against the prebuilt Wickra C ABI library, staged per platform under ./lib/<goos>_<goarch>/, with the C ABI header vendored under ./include. For distribution the libraries are committed alongside the source in the wickra-go module, so `go get` + `go build` works with no extra steps — see the package README.

Index

Constants

This section is empty.

Variables

View Source
var ErrFeedClosed = errors.New("wickra: binance feed closed")

ErrFeedClosed is returned by BinanceFeed.Next once the stream has been closed or has errored out and exhausted its reconnect attempts.

View Source
var ErrInvalidParams = errors.New("wickra: invalid indicator parameters")

ErrInvalidParams is returned by a New<Indicator> constructor when the native constructor rejects the supplied parameters (for example a zero period).

Functions

This section is empty.

Types

type AbandonedBaby

type AbandonedBaby struct {
	// contains filtered or unexported fields
}

AbandonedBaby wraps the AbandonedBaby indicator over the Wickra C ABI.

func NewAbandonedBaby

func NewAbandonedBaby() (*AbandonedBaby, error)

NewAbandonedBaby constructs a AbandonedBaby. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AbandonedBaby) Batch

func (ind *AbandonedBaby) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AbandonedBaby) BatchInto

func (ind *AbandonedBaby) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AbandonedBaby) Close

func (ind *AbandonedBaby) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AbandonedBaby) IsReady

func (ind *AbandonedBaby) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AbandonedBaby) Name

func (ind *AbandonedBaby) Name() string

Name returns the indicator's canonical name.

func (*AbandonedBaby) Reset

func (ind *AbandonedBaby) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AbandonedBaby) Update

func (ind *AbandonedBaby) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AbandonedBaby) WarmupPeriod

func (ind *AbandonedBaby) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Abcd

type Abcd struct {
	// contains filtered or unexported fields
}

Abcd wraps the Abcd indicator over the Wickra C ABI.

func NewAbcd

func NewAbcd() (*Abcd, error)

NewAbcd constructs a Abcd. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Abcd) Batch

func (ind *Abcd) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Abcd) BatchInto

func (ind *Abcd) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Abcd) Close

func (ind *Abcd) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Abcd) IsReady

func (ind *Abcd) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Abcd) Name

func (ind *Abcd) Name() string

Name returns the indicator's canonical name.

func (*Abcd) Reset

func (ind *Abcd) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Abcd) Update

func (ind *Abcd) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Abcd) WarmupPeriod

func (ind *Abcd) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AbsoluteBreadthIndex

type AbsoluteBreadthIndex struct {
	// contains filtered or unexported fields
}

AbsoluteBreadthIndex wraps the AbsoluteBreadthIndex indicator over the Wickra C ABI.

func NewAbsoluteBreadthIndex

func NewAbsoluteBreadthIndex() (*AbsoluteBreadthIndex, error)

NewAbsoluteBreadthIndex constructs a AbsoluteBreadthIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AbsoluteBreadthIndex) Batch

func (ind *AbsoluteBreadthIndex) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*AbsoluteBreadthIndex) Close

func (ind *AbsoluteBreadthIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AbsoluteBreadthIndex) IsReady

func (ind *AbsoluteBreadthIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AbsoluteBreadthIndex) Name

func (ind *AbsoluteBreadthIndex) Name() string

Name returns the indicator's canonical name.

func (*AbsoluteBreadthIndex) Reset

func (ind *AbsoluteBreadthIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AbsoluteBreadthIndex) Update

func (ind *AbsoluteBreadthIndex) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*AbsoluteBreadthIndex) WarmupPeriod

func (ind *AbsoluteBreadthIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AccelerationBands

type AccelerationBands struct {
	// contains filtered or unexported fields
}

AccelerationBands wraps the AccelerationBands indicator over the Wickra C ABI.

func NewAccelerationBands

func NewAccelerationBands(period int, factor float64) (*AccelerationBands, error)

NewAccelerationBands constructs a AccelerationBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AccelerationBands) Batch

func (ind *AccelerationBands) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AccelerationBandsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*AccelerationBands) Close

func (ind *AccelerationBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AccelerationBands) IsReady

func (ind *AccelerationBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AccelerationBands) Name

func (ind *AccelerationBands) Name() string

Name returns the indicator's canonical name.

func (*AccelerationBands) Reset

func (ind *AccelerationBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AccelerationBands) Update

func (ind *AccelerationBands) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AccelerationBandsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*AccelerationBands) WarmupPeriod

func (ind *AccelerationBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AccelerationBandsOutput

type AccelerationBandsOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

AccelerationBandsOutput is the output of the AccelerationBands indicator.

type AcceleratorOscillator

type AcceleratorOscillator struct {
	// contains filtered or unexported fields
}

AcceleratorOscillator wraps the AcceleratorOscillator indicator over the Wickra C ABI.

func NewAcceleratorOscillator

func NewAcceleratorOscillator(aoFast int, aoSlow int, signalPeriod int) (*AcceleratorOscillator, error)

NewAcceleratorOscillator constructs a AcceleratorOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AcceleratorOscillator) Batch

func (ind *AcceleratorOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AcceleratorOscillator) BatchInto

func (ind *AcceleratorOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AcceleratorOscillator) Close

func (ind *AcceleratorOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AcceleratorOscillator) IsReady

func (ind *AcceleratorOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AcceleratorOscillator) Name

func (ind *AcceleratorOscillator) Name() string

Name returns the indicator's canonical name.

func (*AcceleratorOscillator) Reset

func (ind *AcceleratorOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AcceleratorOscillator) Update

func (ind *AcceleratorOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AcceleratorOscillator) WarmupPeriod

func (ind *AcceleratorOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdOscillator

type AdOscillator struct {
	// contains filtered or unexported fields
}

AdOscillator wraps the AdOscillator indicator over the Wickra C ABI.

func NewAdOscillator

func NewAdOscillator() (*AdOscillator, error)

NewAdOscillator constructs a AdOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdOscillator) Batch

func (ind *AdOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdOscillator) BatchInto

func (ind *AdOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdOscillator) Close

func (ind *AdOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdOscillator) IsReady

func (ind *AdOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdOscillator) Name

func (ind *AdOscillator) Name() string

Name returns the indicator's canonical name.

func (*AdOscillator) Reset

func (ind *AdOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdOscillator) Update

func (ind *AdOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdOscillator) WarmupPeriod

func (ind *AdOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdVolumeLine

type AdVolumeLine struct {
	// contains filtered or unexported fields
}

AdVolumeLine wraps the AdVolumeLine indicator over the Wickra C ABI.

func NewAdVolumeLine

func NewAdVolumeLine() (*AdVolumeLine, error)

NewAdVolumeLine constructs a AdVolumeLine. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdVolumeLine) Batch

func (ind *AdVolumeLine) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*AdVolumeLine) Close

func (ind *AdVolumeLine) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdVolumeLine) IsReady

func (ind *AdVolumeLine) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdVolumeLine) Name

func (ind *AdVolumeLine) Name() string

Name returns the indicator's canonical name.

func (*AdVolumeLine) Reset

func (ind *AdVolumeLine) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdVolumeLine) Update

func (ind *AdVolumeLine) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*AdVolumeLine) WarmupPeriod

func (ind *AdVolumeLine) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdaptiveCci

type AdaptiveCci struct {
	// contains filtered or unexported fields
}

AdaptiveCci wraps the AdaptiveCci indicator over the Wickra C ABI.

func NewAdaptiveCci

func NewAdaptiveCci(period int) (*AdaptiveCci, error)

NewAdaptiveCci constructs a AdaptiveCci. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdaptiveCci) Batch

func (ind *AdaptiveCci) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdaptiveCci) BatchInto

func (ind *AdaptiveCci) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveCci) Close

func (ind *AdaptiveCci) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdaptiveCci) IsReady

func (ind *AdaptiveCci) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdaptiveCci) Name

func (ind *AdaptiveCci) Name() string

Name returns the indicator's canonical name.

func (*AdaptiveCci) Reset

func (ind *AdaptiveCci) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdaptiveCci) Update

func (ind *AdaptiveCci) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdaptiveCci) WarmupPeriod

func (ind *AdaptiveCci) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdaptiveCycle

type AdaptiveCycle struct {
	// contains filtered or unexported fields
}

AdaptiveCycle wraps the AdaptiveCycle indicator over the Wickra C ABI.

func NewAdaptiveCycle

func NewAdaptiveCycle() (*AdaptiveCycle, error)

NewAdaptiveCycle constructs a AdaptiveCycle. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdaptiveCycle) Batch

func (ind *AdaptiveCycle) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdaptiveCycle) BatchFast

func (ind *AdaptiveCycle) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AdaptiveCycle) BatchFastInto

func (ind *AdaptiveCycle) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveCycle) BatchInto

func (ind *AdaptiveCycle) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveCycle) Close

func (ind *AdaptiveCycle) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdaptiveCycle) IsReady

func (ind *AdaptiveCycle) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdaptiveCycle) Name

func (ind *AdaptiveCycle) Name() string

Name returns the indicator's canonical name.

func (*AdaptiveCycle) Reset

func (ind *AdaptiveCycle) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdaptiveCycle) Update

func (ind *AdaptiveCycle) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdaptiveCycle) WarmupPeriod

func (ind *AdaptiveCycle) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdaptiveLaguerreFilter

type AdaptiveLaguerreFilter struct {
	// contains filtered or unexported fields
}

AdaptiveLaguerreFilter wraps the AdaptiveLaguerreFilter indicator over the Wickra C ABI.

func NewAdaptiveLaguerreFilter

func NewAdaptiveLaguerreFilter(period int) (*AdaptiveLaguerreFilter, error)

NewAdaptiveLaguerreFilter constructs a AdaptiveLaguerreFilter. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdaptiveLaguerreFilter) Batch

func (ind *AdaptiveLaguerreFilter) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdaptiveLaguerreFilter) BatchFast

func (ind *AdaptiveLaguerreFilter) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AdaptiveLaguerreFilter) BatchFastInto

func (ind *AdaptiveLaguerreFilter) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveLaguerreFilter) BatchInto

func (ind *AdaptiveLaguerreFilter) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveLaguerreFilter) Close

func (ind *AdaptiveLaguerreFilter) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdaptiveLaguerreFilter) IsReady

func (ind *AdaptiveLaguerreFilter) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdaptiveLaguerreFilter) Name

func (ind *AdaptiveLaguerreFilter) Name() string

Name returns the indicator's canonical name.

func (*AdaptiveLaguerreFilter) Reset

func (ind *AdaptiveLaguerreFilter) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdaptiveLaguerreFilter) Update

func (ind *AdaptiveLaguerreFilter) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdaptiveLaguerreFilter) WarmupPeriod

func (ind *AdaptiveLaguerreFilter) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdaptiveRsi

type AdaptiveRsi struct {
	// contains filtered or unexported fields
}

AdaptiveRsi wraps the AdaptiveRsi indicator over the Wickra C ABI.

func NewAdaptiveRsi

func NewAdaptiveRsi(period int) (*AdaptiveRsi, error)

NewAdaptiveRsi constructs a AdaptiveRsi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdaptiveRsi) Batch

func (ind *AdaptiveRsi) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdaptiveRsi) BatchFast

func (ind *AdaptiveRsi) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AdaptiveRsi) BatchFastInto

func (ind *AdaptiveRsi) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveRsi) BatchInto

func (ind *AdaptiveRsi) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdaptiveRsi) Close

func (ind *AdaptiveRsi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdaptiveRsi) IsReady

func (ind *AdaptiveRsi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdaptiveRsi) Name

func (ind *AdaptiveRsi) Name() string

Name returns the indicator's canonical name.

func (*AdaptiveRsi) Reset

func (ind *AdaptiveRsi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdaptiveRsi) Update

func (ind *AdaptiveRsi) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdaptiveRsi) WarmupPeriod

func (ind *AdaptiveRsi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Adl

type Adl struct {
	// contains filtered or unexported fields
}

Adl wraps the Adl indicator over the Wickra C ABI.

func NewAdl

func NewAdl() (*Adl, error)

NewAdl constructs a Adl. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Adl) Batch

func (ind *Adl) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Adl) BatchInto

func (ind *Adl) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Adl) Close

func (ind *Adl) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Adl) IsReady

func (ind *Adl) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Adl) Name

func (ind *Adl) Name() string

Name returns the indicator's canonical name.

func (*Adl) Reset

func (ind *Adl) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Adl) Update

func (ind *Adl) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Adl) WarmupPeriod

func (ind *Adl) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdvanceBlock

type AdvanceBlock struct {
	// contains filtered or unexported fields
}

AdvanceBlock wraps the AdvanceBlock indicator over the Wickra C ABI.

func NewAdvanceBlock

func NewAdvanceBlock() (*AdvanceBlock, error)

NewAdvanceBlock constructs a AdvanceBlock. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdvanceBlock) Batch

func (ind *AdvanceBlock) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AdvanceBlock) BatchInto

func (ind *AdvanceBlock) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AdvanceBlock) Close

func (ind *AdvanceBlock) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdvanceBlock) IsReady

func (ind *AdvanceBlock) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdvanceBlock) Name

func (ind *AdvanceBlock) Name() string

Name returns the indicator's canonical name.

func (*AdvanceBlock) Reset

func (ind *AdvanceBlock) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdvanceBlock) Update

func (ind *AdvanceBlock) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AdvanceBlock) WarmupPeriod

func (ind *AdvanceBlock) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdvanceDecline

type AdvanceDecline struct {
	// contains filtered or unexported fields
}

AdvanceDecline wraps the AdvanceDecline indicator over the Wickra C ABI.

func NewAdvanceDecline

func NewAdvanceDecline() (*AdvanceDecline, error)

NewAdvanceDecline constructs a AdvanceDecline. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdvanceDecline) Batch

func (ind *AdvanceDecline) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*AdvanceDecline) Close

func (ind *AdvanceDecline) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdvanceDecline) IsReady

func (ind *AdvanceDecline) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdvanceDecline) Name

func (ind *AdvanceDecline) Name() string

Name returns the indicator's canonical name.

func (*AdvanceDecline) Reset

func (ind *AdvanceDecline) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdvanceDecline) Update

func (ind *AdvanceDecline) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*AdvanceDecline) WarmupPeriod

func (ind *AdvanceDecline) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdvanceDeclineRatio

type AdvanceDeclineRatio struct {
	// contains filtered or unexported fields
}

AdvanceDeclineRatio wraps the AdvanceDeclineRatio indicator over the Wickra C ABI.

func NewAdvanceDeclineRatio

func NewAdvanceDeclineRatio() (*AdvanceDeclineRatio, error)

NewAdvanceDeclineRatio constructs a AdvanceDeclineRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AdvanceDeclineRatio) Batch

func (ind *AdvanceDeclineRatio) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*AdvanceDeclineRatio) Close

func (ind *AdvanceDeclineRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AdvanceDeclineRatio) IsReady

func (ind *AdvanceDeclineRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AdvanceDeclineRatio) Name

func (ind *AdvanceDeclineRatio) Name() string

Name returns the indicator's canonical name.

func (*AdvanceDeclineRatio) Reset

func (ind *AdvanceDeclineRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AdvanceDeclineRatio) Update

func (ind *AdvanceDeclineRatio) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*AdvanceDeclineRatio) WarmupPeriod

func (ind *AdvanceDeclineRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Adx

type Adx struct {
	// contains filtered or unexported fields
}

Adx wraps the Adx indicator over the Wickra C ABI.

func NewAdx

func NewAdx(period int) (*Adx, error)

NewAdx constructs a Adx. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Adx) Batch

func (ind *Adx) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AdxOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Adx) Close

func (ind *Adx) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Adx) IsReady

func (ind *Adx) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Adx) Name

func (ind *Adx) Name() string

Name returns the indicator's canonical name.

func (*Adx) Reset

func (ind *Adx) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Adx) Update

func (ind *Adx) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AdxOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Adx) WarmupPeriod

func (ind *Adx) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AdxOutput

type AdxOutput struct {
	PlusDi  float64
	MinusDi float64
	Adx     float64
}

AdxOutput is the output of the Adx indicator.

type Adxr

type Adxr struct {
	// contains filtered or unexported fields
}

Adxr wraps the Adxr indicator over the Wickra C ABI.

func NewAdxr

func NewAdxr(period int) (*Adxr, error)

NewAdxr constructs a Adxr. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Adxr) Batch

func (ind *Adxr) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Adxr) BatchInto

func (ind *Adxr) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Adxr) Close

func (ind *Adxr) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Adxr) IsReady

func (ind *Adxr) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Adxr) Name

func (ind *Adxr) Name() string

Name returns the indicator's canonical name.

func (*Adxr) Reset

func (ind *Adxr) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Adxr) Update

func (ind *Adxr) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Adxr) WarmupPeriod

func (ind *Adxr) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Alligator

type Alligator struct {
	// contains filtered or unexported fields
}

Alligator wraps the Alligator indicator over the Wickra C ABI.

func NewAlligator

func NewAlligator(jawPeriod int, teethPeriod int, lipsPeriod int) (*Alligator, error)

NewAlligator constructs a Alligator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Alligator) Batch

func (ind *Alligator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AlligatorOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Alligator) Close

func (ind *Alligator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Alligator) IsReady

func (ind *Alligator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Alligator) Name

func (ind *Alligator) Name() string

Name returns the indicator's canonical name.

func (*Alligator) Reset

func (ind *Alligator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Alligator) Update

func (ind *Alligator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AlligatorOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Alligator) WarmupPeriod

func (ind *Alligator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AlligatorOutput

type AlligatorOutput struct {
	Jaw   float64
	Teeth float64
	Lips  float64
}

AlligatorOutput is the output of the Alligator indicator.

type Alma

type Alma struct {
	// contains filtered or unexported fields
}

Alma wraps the Alma indicator over the Wickra C ABI.

func NewAlma

func NewAlma(period int, offset float64, sigma float64) (*Alma, error)

NewAlma constructs a Alma. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Alma) Batch

func (ind *Alma) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Alma) BatchFast

func (ind *Alma) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Alma) BatchFastInto

func (ind *Alma) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Alma) BatchInto

func (ind *Alma) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Alma) Close

func (ind *Alma) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Alma) IsReady

func (ind *Alma) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Alma) Name

func (ind *Alma) Name() string

Name returns the indicator's canonical name.

func (*Alma) Reset

func (ind *Alma) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Alma) Update

func (ind *Alma) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Alma) WarmupPeriod

func (ind *Alma) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Alpha

type Alpha struct {
	// contains filtered or unexported fields
}

Alpha wraps the Alpha indicator over the Wickra C ABI.

func NewAlpha

func NewAlpha(period int, riskFree float64) (*Alpha, error)

NewAlpha constructs a Alpha. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Alpha) Batch

func (ind *Alpha) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Alpha) BatchInto

func (ind *Alpha) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Alpha) Close

func (ind *Alpha) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Alpha) IsReady

func (ind *Alpha) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Alpha) Name

func (ind *Alpha) Name() string

Name returns the indicator's canonical name.

func (*Alpha) Reset

func (ind *Alpha) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Alpha) Update

func (ind *Alpha) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Alpha) WarmupPeriod

func (ind *Alpha) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AmihudIlliquidity

type AmihudIlliquidity struct {
	// contains filtered or unexported fields
}

AmihudIlliquidity wraps the AmihudIlliquidity indicator over the Wickra C ABI.

func NewAmihudIlliquidity

func NewAmihudIlliquidity(period int) (*AmihudIlliquidity, error)

NewAmihudIlliquidity constructs a AmihudIlliquidity. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AmihudIlliquidity) Batch

func (ind *AmihudIlliquidity) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AmihudIlliquidity) BatchInto

func (ind *AmihudIlliquidity) BatchInto(dst []float64, price []float64, size []float64, isBuy []bool, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AmihudIlliquidity) Close

func (ind *AmihudIlliquidity) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AmihudIlliquidity) IsReady

func (ind *AmihudIlliquidity) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AmihudIlliquidity) Name

func (ind *AmihudIlliquidity) Name() string

Name returns the indicator's canonical name.

func (*AmihudIlliquidity) Reset

func (ind *AmihudIlliquidity) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AmihudIlliquidity) Update

func (ind *AmihudIlliquidity) Update(price float64, size float64, isBuy bool, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AmihudIlliquidity) WarmupPeriod

func (ind *AmihudIlliquidity) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AnchoredRsi

type AnchoredRsi struct {
	// contains filtered or unexported fields
}

AnchoredRsi wraps the AnchoredRsi indicator over the Wickra C ABI.

func NewAnchoredRsi

func NewAnchoredRsi() (*AnchoredRsi, error)

NewAnchoredRsi constructs a AnchoredRsi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AnchoredRsi) Batch

func (ind *AnchoredRsi) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AnchoredRsi) BatchFast

func (ind *AnchoredRsi) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AnchoredRsi) BatchFastInto

func (ind *AnchoredRsi) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AnchoredRsi) BatchInto

func (ind *AnchoredRsi) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AnchoredRsi) Close

func (ind *AnchoredRsi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AnchoredRsi) IsReady

func (ind *AnchoredRsi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AnchoredRsi) Name

func (ind *AnchoredRsi) Name() string

Name returns the indicator's canonical name.

func (*AnchoredRsi) Reset

func (ind *AnchoredRsi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AnchoredRsi) Update

func (ind *AnchoredRsi) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AnchoredRsi) WarmupPeriod

func (ind *AnchoredRsi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AnchoredVwap

type AnchoredVwap struct {
	// contains filtered or unexported fields
}

AnchoredVwap wraps the AnchoredVwap indicator over the Wickra C ABI.

func NewAnchoredVwap

func NewAnchoredVwap() (*AnchoredVwap, error)

NewAnchoredVwap constructs a AnchoredVwap. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AnchoredVwap) Batch

func (ind *AnchoredVwap) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AnchoredVwap) BatchInto

func (ind *AnchoredVwap) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AnchoredVwap) Close

func (ind *AnchoredVwap) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AnchoredVwap) IsReady

func (ind *AnchoredVwap) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AnchoredVwap) Name

func (ind *AnchoredVwap) Name() string

Name returns the indicator's canonical name.

func (*AnchoredVwap) Reset

func (ind *AnchoredVwap) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AnchoredVwap) Update

func (ind *AnchoredVwap) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AnchoredVwap) WarmupPeriod

func (ind *AnchoredVwap) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AndrewsPitchfork

type AndrewsPitchfork struct {
	// contains filtered or unexported fields
}

AndrewsPitchfork wraps the AndrewsPitchfork indicator over the Wickra C ABI.

func NewAndrewsPitchfork

func NewAndrewsPitchfork(strength int) (*AndrewsPitchfork, error)

NewAndrewsPitchfork constructs a AndrewsPitchfork. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AndrewsPitchfork) Batch

func (ind *AndrewsPitchfork) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AndrewsPitchforkOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*AndrewsPitchfork) Close

func (ind *AndrewsPitchfork) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AndrewsPitchfork) IsReady

func (ind *AndrewsPitchfork) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AndrewsPitchfork) Name

func (ind *AndrewsPitchfork) Name() string

Name returns the indicator's canonical name.

func (*AndrewsPitchfork) Reset

func (ind *AndrewsPitchfork) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AndrewsPitchfork) Update

func (ind *AndrewsPitchfork) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AndrewsPitchforkOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*AndrewsPitchfork) WarmupPeriod

func (ind *AndrewsPitchfork) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AndrewsPitchforkOutput

type AndrewsPitchforkOutput struct {
	Median float64
	Upper  float64
	Lower  float64
}

AndrewsPitchforkOutput is the output of the AndrewsPitchfork indicator.

type Apo

type Apo struct {
	// contains filtered or unexported fields
}

Apo wraps the Apo indicator over the Wickra C ABI.

func NewApo

func NewApo(fast int, slow int) (*Apo, error)

NewApo constructs a Apo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Apo) Batch

func (ind *Apo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Apo) BatchFast

func (ind *Apo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Apo) BatchFastInto

func (ind *Apo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Apo) BatchInto

func (ind *Apo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Apo) Close

func (ind *Apo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Apo) IsReady

func (ind *Apo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Apo) Name

func (ind *Apo) Name() string

Name returns the indicator's canonical name.

func (*Apo) Reset

func (ind *Apo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Apo) Update

func (ind *Apo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Apo) WarmupPeriod

func (ind *Apo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Aroon

type Aroon struct {
	// contains filtered or unexported fields
}

Aroon wraps the Aroon indicator over the Wickra C ABI.

func NewAroon

func NewAroon(period int) (*Aroon, error)

NewAroon constructs a Aroon. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Aroon) Batch

func (ind *Aroon) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AroonOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Aroon) Close

func (ind *Aroon) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Aroon) IsReady

func (ind *Aroon) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Aroon) Name

func (ind *Aroon) Name() string

Name returns the indicator's canonical name.

func (*Aroon) Reset

func (ind *Aroon) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Aroon) Update

func (ind *Aroon) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AroonOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Aroon) WarmupPeriod

func (ind *Aroon) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AroonOscillator

type AroonOscillator struct {
	// contains filtered or unexported fields
}

AroonOscillator wraps the AroonOscillator indicator over the Wickra C ABI.

func NewAroonOscillator

func NewAroonOscillator(period int) (*AroonOscillator, error)

NewAroonOscillator constructs a AroonOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AroonOscillator) Batch

func (ind *AroonOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AroonOscillator) BatchInto

func (ind *AroonOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AroonOscillator) Close

func (ind *AroonOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AroonOscillator) IsReady

func (ind *AroonOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AroonOscillator) Name

func (ind *AroonOscillator) Name() string

Name returns the indicator's canonical name.

func (*AroonOscillator) Reset

func (ind *AroonOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AroonOscillator) Update

func (ind *AroonOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AroonOscillator) WarmupPeriod

func (ind *AroonOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AroonOutput

type AroonOutput struct {
	Up   float64
	Down float64
}

AroonOutput is the output of the Aroon indicator.

type Atr

type Atr struct {
	// contains filtered or unexported fields
}

Atr wraps the Atr indicator over the Wickra C ABI.

func NewAtr

func NewAtr(period int) (*Atr, error)

NewAtr constructs a Atr. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Atr) Batch

func (ind *Atr) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Atr) BatchFast

func (ind *Atr) BatchFast(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Atr) BatchFastInto

func (ind *Atr) BatchFastInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Atr) BatchInto

func (ind *Atr) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Atr) Close

func (ind *Atr) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Atr) IsReady

func (ind *Atr) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Atr) Name

func (ind *Atr) Name() string

Name returns the indicator's canonical name.

func (*Atr) Reset

func (ind *Atr) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Atr) Update

func (ind *Atr) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Atr) WarmupPeriod

func (ind *Atr) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AtrBands

type AtrBands struct {
	// contains filtered or unexported fields
}

AtrBands wraps the AtrBands indicator over the Wickra C ABI.

func NewAtrBands

func NewAtrBands(period int, multiplier float64) (*AtrBands, error)

NewAtrBands constructs a AtrBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AtrBands) Batch

func (ind *AtrBands) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AtrBandsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*AtrBands) Close

func (ind *AtrBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AtrBands) IsReady

func (ind *AtrBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AtrBands) Name

func (ind *AtrBands) Name() string

Name returns the indicator's canonical name.

func (*AtrBands) Reset

func (ind *AtrBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AtrBands) Update

func (ind *AtrBands) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AtrBandsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*AtrBands) WarmupPeriod

func (ind *AtrBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AtrBandsOutput

type AtrBandsOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

AtrBandsOutput is the output of the AtrBands indicator.

type AtrRatchet

type AtrRatchet struct {
	// contains filtered or unexported fields
}

AtrRatchet wraps the AtrRatchet indicator over the Wickra C ABI.

func NewAtrRatchet

func NewAtrRatchet(atrPeriod int, startMult float64, increment float64) (*AtrRatchet, error)

NewAtrRatchet constructs a AtrRatchet. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AtrRatchet) Batch

func (ind *AtrRatchet) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AtrRatchetOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*AtrRatchet) Close

func (ind *AtrRatchet) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AtrRatchet) IsReady

func (ind *AtrRatchet) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AtrRatchet) Name

func (ind *AtrRatchet) Name() string

Name returns the indicator's canonical name.

func (*AtrRatchet) Reset

func (ind *AtrRatchet) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AtrRatchet) Update

func (ind *AtrRatchet) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AtrRatchetOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*AtrRatchet) WarmupPeriod

func (ind *AtrRatchet) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AtrRatchetOutput

type AtrRatchetOutput struct {
	Value     float64
	Direction float64
}

AtrRatchetOutput is the output of the AtrRatchet indicator.

type AtrTrailingStop

type AtrTrailingStop struct {
	// contains filtered or unexported fields
}

AtrTrailingStop wraps the AtrTrailingStop indicator over the Wickra C ABI.

func NewAtrTrailingStop

func NewAtrTrailingStop(atrPeriod int, multiplier float64) (*AtrTrailingStop, error)

NewAtrTrailingStop constructs a AtrTrailingStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AtrTrailingStop) Batch

func (ind *AtrTrailingStop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AtrTrailingStop) BatchInto

func (ind *AtrTrailingStop) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AtrTrailingStop) Close

func (ind *AtrTrailingStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AtrTrailingStop) IsReady

func (ind *AtrTrailingStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AtrTrailingStop) Name

func (ind *AtrTrailingStop) Name() string

Name returns the indicator's canonical name.

func (*AtrTrailingStop) Reset

func (ind *AtrTrailingStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AtrTrailingStop) Update

func (ind *AtrTrailingStop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AtrTrailingStop) WarmupPeriod

func (ind *AtrTrailingStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AutoFib

type AutoFib struct {
	// contains filtered or unexported fields
}

AutoFib wraps the AutoFib indicator over the Wickra C ABI.

func NewAutoFib

func NewAutoFib() (*AutoFib, error)

NewAutoFib constructs a AutoFib. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AutoFib) Batch

func (ind *AutoFib) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []AutoFibOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*AutoFib) Close

func (ind *AutoFib) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AutoFib) IsReady

func (ind *AutoFib) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AutoFib) Name

func (ind *AutoFib) Name() string

Name returns the indicator's canonical name.

func (*AutoFib) Reset

func (ind *AutoFib) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AutoFib) Update

func (ind *AutoFib) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (AutoFibOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*AutoFib) WarmupPeriod

func (ind *AutoFib) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AutoFibOutput

type AutoFibOutput struct {
	Level0    float64
	Level236  float64
	Level382  float64
	Level500  float64
	Level618  float64
	Level786  float64
	Level1000 float64
}

AutoFibOutput is the output of the AutoFib indicator.

type Autocorrelation

type Autocorrelation struct {
	// contains filtered or unexported fields
}

Autocorrelation wraps the Autocorrelation indicator over the Wickra C ABI.

func NewAutocorrelation

func NewAutocorrelation(period int, lag int) (*Autocorrelation, error)

NewAutocorrelation constructs a Autocorrelation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Autocorrelation) Batch

func (ind *Autocorrelation) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Autocorrelation) BatchFast

func (ind *Autocorrelation) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Autocorrelation) BatchFastInto

func (ind *Autocorrelation) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Autocorrelation) BatchInto

func (ind *Autocorrelation) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Autocorrelation) Close

func (ind *Autocorrelation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Autocorrelation) IsReady

func (ind *Autocorrelation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Autocorrelation) Name

func (ind *Autocorrelation) Name() string

Name returns the indicator's canonical name.

func (*Autocorrelation) Reset

func (ind *Autocorrelation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Autocorrelation) Update

func (ind *Autocorrelation) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Autocorrelation) WarmupPeriod

func (ind *Autocorrelation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AutocorrelationPeriodogram

type AutocorrelationPeriodogram struct {
	// contains filtered or unexported fields
}

AutocorrelationPeriodogram wraps the AutocorrelationPeriodogram indicator over the Wickra C ABI.

func NewAutocorrelationPeriodogram

func NewAutocorrelationPeriodogram(minPeriod int, maxPeriod int) (*AutocorrelationPeriodogram, error)

NewAutocorrelationPeriodogram constructs a AutocorrelationPeriodogram. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AutocorrelationPeriodogram) Batch

func (ind *AutocorrelationPeriodogram) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AutocorrelationPeriodogram) BatchFast

func (ind *AutocorrelationPeriodogram) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AutocorrelationPeriodogram) BatchFastInto

func (ind *AutocorrelationPeriodogram) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AutocorrelationPeriodogram) BatchInto

func (ind *AutocorrelationPeriodogram) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AutocorrelationPeriodogram) Close

func (ind *AutocorrelationPeriodogram) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AutocorrelationPeriodogram) IsReady

func (ind *AutocorrelationPeriodogram) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AutocorrelationPeriodogram) Name

func (ind *AutocorrelationPeriodogram) Name() string

Name returns the indicator's canonical name.

func (*AutocorrelationPeriodogram) Reset

func (ind *AutocorrelationPeriodogram) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AutocorrelationPeriodogram) Update

func (ind *AutocorrelationPeriodogram) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AutocorrelationPeriodogram) WarmupPeriod

func (ind *AutocorrelationPeriodogram) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AverageDailyRange

type AverageDailyRange struct {
	// contains filtered or unexported fields
}

AverageDailyRange wraps the AverageDailyRange indicator over the Wickra C ABI.

func NewAverageDailyRange

func NewAverageDailyRange(period int, utcOffsetMinutes int32) (*AverageDailyRange, error)

NewAverageDailyRange constructs a AverageDailyRange. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AverageDailyRange) Batch

func (ind *AverageDailyRange) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AverageDailyRange) BatchInto

func (ind *AverageDailyRange) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AverageDailyRange) Close

func (ind *AverageDailyRange) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AverageDailyRange) IsReady

func (ind *AverageDailyRange) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AverageDailyRange) Name

func (ind *AverageDailyRange) Name() string

Name returns the indicator's canonical name.

func (*AverageDailyRange) Reset

func (ind *AverageDailyRange) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AverageDailyRange) Update

func (ind *AverageDailyRange) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AverageDailyRange) WarmupPeriod

func (ind *AverageDailyRange) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AverageDrawdown

type AverageDrawdown struct {
	// contains filtered or unexported fields
}

AverageDrawdown wraps the AverageDrawdown indicator over the Wickra C ABI.

func NewAverageDrawdown

func NewAverageDrawdown(period int) (*AverageDrawdown, error)

NewAverageDrawdown constructs a AverageDrawdown. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AverageDrawdown) Batch

func (ind *AverageDrawdown) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AverageDrawdown) BatchFast

func (ind *AverageDrawdown) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*AverageDrawdown) BatchFastInto

func (ind *AverageDrawdown) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AverageDrawdown) BatchInto

func (ind *AverageDrawdown) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AverageDrawdown) Close

func (ind *AverageDrawdown) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AverageDrawdown) IsReady

func (ind *AverageDrawdown) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AverageDrawdown) Name

func (ind *AverageDrawdown) Name() string

Name returns the indicator's canonical name.

func (*AverageDrawdown) Reset

func (ind *AverageDrawdown) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AverageDrawdown) Update

func (ind *AverageDrawdown) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AverageDrawdown) WarmupPeriod

func (ind *AverageDrawdown) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AvgPrice

type AvgPrice struct {
	// contains filtered or unexported fields
}

AvgPrice wraps the AvgPrice indicator over the Wickra C ABI.

func NewAvgPrice

func NewAvgPrice() (*AvgPrice, error)

NewAvgPrice constructs a AvgPrice. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AvgPrice) Batch

func (ind *AvgPrice) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AvgPrice) BatchInto

func (ind *AvgPrice) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AvgPrice) Close

func (ind *AvgPrice) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AvgPrice) IsReady

func (ind *AvgPrice) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AvgPrice) Name

func (ind *AvgPrice) Name() string

Name returns the indicator's canonical name.

func (*AvgPrice) Reset

func (ind *AvgPrice) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AvgPrice) Update

func (ind *AvgPrice) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AvgPrice) WarmupPeriod

func (ind *AvgPrice) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AwesomeOscillator

type AwesomeOscillator struct {
	// contains filtered or unexported fields
}

AwesomeOscillator wraps the AwesomeOscillator indicator over the Wickra C ABI.

func NewAwesomeOscillator

func NewAwesomeOscillator(fast int, slow int) (*AwesomeOscillator, error)

NewAwesomeOscillator constructs a AwesomeOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AwesomeOscillator) Batch

func (ind *AwesomeOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AwesomeOscillator) BatchInto

func (ind *AwesomeOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AwesomeOscillator) Close

func (ind *AwesomeOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AwesomeOscillator) IsReady

func (ind *AwesomeOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AwesomeOscillator) Name

func (ind *AwesomeOscillator) Name() string

Name returns the indicator's canonical name.

func (*AwesomeOscillator) Reset

func (ind *AwesomeOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AwesomeOscillator) Update

func (ind *AwesomeOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AwesomeOscillator) WarmupPeriod

func (ind *AwesomeOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type AwesomeOscillatorHistogram

type AwesomeOscillatorHistogram struct {
	// contains filtered or unexported fields
}

AwesomeOscillatorHistogram wraps the AwesomeOscillatorHistogram indicator over the Wickra C ABI.

func NewAwesomeOscillatorHistogram

func NewAwesomeOscillatorHistogram(fast int, slow int, lookback int) (*AwesomeOscillatorHistogram, error)

NewAwesomeOscillatorHistogram constructs a AwesomeOscillatorHistogram. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*AwesomeOscillatorHistogram) Batch

func (ind *AwesomeOscillatorHistogram) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*AwesomeOscillatorHistogram) BatchInto

func (ind *AwesomeOscillatorHistogram) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*AwesomeOscillatorHistogram) Close

func (ind *AwesomeOscillatorHistogram) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*AwesomeOscillatorHistogram) IsReady

func (ind *AwesomeOscillatorHistogram) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*AwesomeOscillatorHistogram) Name

func (ind *AwesomeOscillatorHistogram) Name() string

Name returns the indicator's canonical name.

func (*AwesomeOscillatorHistogram) Reset

func (ind *AwesomeOscillatorHistogram) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*AwesomeOscillatorHistogram) Update

func (ind *AwesomeOscillatorHistogram) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*AwesomeOscillatorHistogram) WarmupPeriod

func (ind *AwesomeOscillatorHistogram) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BalanceOfPower

type BalanceOfPower struct {
	// contains filtered or unexported fields
}

BalanceOfPower wraps the BalanceOfPower indicator over the Wickra C ABI.

func NewBalanceOfPower

func NewBalanceOfPower() (*BalanceOfPower, error)

NewBalanceOfPower constructs a BalanceOfPower. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BalanceOfPower) Batch

func (ind *BalanceOfPower) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BalanceOfPower) BatchInto

func (ind *BalanceOfPower) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BalanceOfPower) Close

func (ind *BalanceOfPower) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BalanceOfPower) IsReady

func (ind *BalanceOfPower) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BalanceOfPower) Name

func (ind *BalanceOfPower) Name() string

Name returns the indicator's canonical name.

func (*BalanceOfPower) Reset

func (ind *BalanceOfPower) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BalanceOfPower) Update

func (ind *BalanceOfPower) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BalanceOfPower) WarmupPeriod

func (ind *BalanceOfPower) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BandpassFilter

type BandpassFilter struct {
	// contains filtered or unexported fields
}

BandpassFilter wraps the BandpassFilter indicator over the Wickra C ABI.

func NewBandpassFilter

func NewBandpassFilter(period int, bandwidth float64) (*BandpassFilter, error)

NewBandpassFilter constructs a BandpassFilter. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BandpassFilter) Batch

func (ind *BandpassFilter) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BandpassFilter) BatchFast

func (ind *BandpassFilter) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*BandpassFilter) BatchFastInto

func (ind *BandpassFilter) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BandpassFilter) BatchInto

func (ind *BandpassFilter) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BandpassFilter) Close

func (ind *BandpassFilter) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BandpassFilter) IsReady

func (ind *BandpassFilter) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BandpassFilter) Name

func (ind *BandpassFilter) Name() string

Name returns the indicator's canonical name.

func (*BandpassFilter) Reset

func (ind *BandpassFilter) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BandpassFilter) Update

func (ind *BandpassFilter) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BandpassFilter) WarmupPeriod

func (ind *BandpassFilter) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Bat

type Bat struct {
	// contains filtered or unexported fields
}

Bat wraps the Bat indicator over the Wickra C ABI.

func NewBat

func NewBat() (*Bat, error)

NewBat constructs a Bat. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Bat) Batch

func (ind *Bat) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Bat) BatchInto

func (ind *Bat) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Bat) Close

func (ind *Bat) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Bat) IsReady

func (ind *Bat) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Bat) Name

func (ind *Bat) Name() string

Name returns the indicator's canonical name.

func (*Bat) Reset

func (ind *Bat) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Bat) Update

func (ind *Bat) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Bat) WarmupPeriod

func (ind *Bat) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BeltHold

type BeltHold struct {
	// contains filtered or unexported fields
}

BeltHold wraps the BeltHold indicator over the Wickra C ABI.

func NewBeltHold

func NewBeltHold() (*BeltHold, error)

NewBeltHold constructs a BeltHold. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BeltHold) Batch

func (ind *BeltHold) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BeltHold) BatchInto

func (ind *BeltHold) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BeltHold) Close

func (ind *BeltHold) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BeltHold) IsReady

func (ind *BeltHold) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BeltHold) Name

func (ind *BeltHold) Name() string

Name returns the indicator's canonical name.

func (*BeltHold) Reset

func (ind *BeltHold) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BeltHold) Update

func (ind *BeltHold) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BeltHold) WarmupPeriod

func (ind *BeltHold) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Beta

type Beta struct {
	// contains filtered or unexported fields
}

Beta wraps the Beta indicator over the Wickra C ABI.

func NewBeta

func NewBeta(period int) (*Beta, error)

NewBeta constructs a Beta. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Beta) Batch

func (ind *Beta) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Beta) BatchInto

func (ind *Beta) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Beta) Close

func (ind *Beta) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Beta) IsReady

func (ind *Beta) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Beta) Name

func (ind *Beta) Name() string

Name returns the indicator's canonical name.

func (*Beta) Reset

func (ind *Beta) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Beta) Update

func (ind *Beta) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Beta) WarmupPeriod

func (ind *Beta) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BetaNeutralSpread

type BetaNeutralSpread struct {
	// contains filtered or unexported fields
}

BetaNeutralSpread wraps the BetaNeutralSpread indicator over the Wickra C ABI.

func NewBetaNeutralSpread

func NewBetaNeutralSpread(period int) (*BetaNeutralSpread, error)

NewBetaNeutralSpread constructs a BetaNeutralSpread. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BetaNeutralSpread) Batch

func (ind *BetaNeutralSpread) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BetaNeutralSpread) BatchInto

func (ind *BetaNeutralSpread) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BetaNeutralSpread) Close

func (ind *BetaNeutralSpread) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BetaNeutralSpread) IsReady

func (ind *BetaNeutralSpread) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BetaNeutralSpread) Name

func (ind *BetaNeutralSpread) Name() string

Name returns the indicator's canonical name.

func (*BetaNeutralSpread) Reset

func (ind *BetaNeutralSpread) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BetaNeutralSpread) Update

func (ind *BetaNeutralSpread) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BetaNeutralSpread) WarmupPeriod

func (ind *BetaNeutralSpread) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BetterVolume

type BetterVolume struct {
	// contains filtered or unexported fields
}

BetterVolume wraps the BetterVolume indicator over the Wickra C ABI.

func NewBetterVolume

func NewBetterVolume(period int) (*BetterVolume, error)

NewBetterVolume constructs a BetterVolume. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BetterVolume) Batch

func (ind *BetterVolume) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BetterVolume) BatchInto

func (ind *BetterVolume) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BetterVolume) Close

func (ind *BetterVolume) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BetterVolume) IsReady

func (ind *BetterVolume) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BetterVolume) Name

func (ind *BetterVolume) Name() string

Name returns the indicator's canonical name.

func (*BetterVolume) Reset

func (ind *BetterVolume) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BetterVolume) Update

func (ind *BetterVolume) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BetterVolume) WarmupPeriod

func (ind *BetterVolume) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BinanceFeed

type BinanceFeed struct {
	// contains filtered or unexported fields
}

BinanceFeed is a live Binance kline stream over the Wickra C ABI.

func NewBinanceFeed

func NewBinanceFeed(symbols string, interval BinanceInterval, baseURL string) (*BinanceFeed, error)

NewBinanceFeed connects to Binance's live kline stream for the given comma-separated symbols (case-insensitive) at interval. baseURL overrides the endpoint ("" = production wss://stream.binance.com:9443; pass a ws:// URL to target a test server). It returns ErrInvalidParams on a bad symbol list, an unknown interval, a bad URL, or a failed initial connect.

func (*BinanceFeed) Close

func (f *BinanceFeed) Close()

Close ends the stream and frees the native handle. Idempotent and safe to call alongside the finalizer.

func (*BinanceFeed) Next

func (f *BinanceFeed) Next(timeout time.Duration) (KlineEvent, bool, error)

Next polls for the next kline event, waiting up to timeout. It returns the event and true when one arrives, the zero value and false on timeout, or ErrFeedClosed once the stream is closed or has errored out.

type BinanceInterval

type BinanceInterval uint8

BinanceInterval selects a kline interval (the Interval declaration order).

const (
	OneSecond BinanceInterval = iota
	OneMinute
	ThreeMinutes
	FiveMinutes
	FifteenMinutes
	ThirtyMinutes
	OneHour
	TwoHours
	FourHours
	SixHours
	EightHours
	TwelveHours
	OneDay
	ThreeDays
	OneWeek
	OneMonth
)

Kline intervals supported by the live Binance feed.

type BipowerVariation

type BipowerVariation struct {
	// contains filtered or unexported fields
}

BipowerVariation wraps the BipowerVariation indicator over the Wickra C ABI.

func NewBipowerVariation

func NewBipowerVariation(period int) (*BipowerVariation, error)

NewBipowerVariation constructs a BipowerVariation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BipowerVariation) Batch

func (ind *BipowerVariation) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BipowerVariation) BatchFast

func (ind *BipowerVariation) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*BipowerVariation) BatchFastInto

func (ind *BipowerVariation) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BipowerVariation) BatchInto

func (ind *BipowerVariation) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BipowerVariation) Close

func (ind *BipowerVariation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BipowerVariation) IsReady

func (ind *BipowerVariation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BipowerVariation) Name

func (ind *BipowerVariation) Name() string

Name returns the indicator's canonical name.

func (*BipowerVariation) Reset

func (ind *BipowerVariation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BipowerVariation) Update

func (ind *BipowerVariation) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BipowerVariation) WarmupPeriod

func (ind *BipowerVariation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BodySizePct

type BodySizePct struct {
	// contains filtered or unexported fields
}

BodySizePct wraps the BodySizePct indicator over the Wickra C ABI.

func NewBodySizePct

func NewBodySizePct() (*BodySizePct, error)

NewBodySizePct constructs a BodySizePct. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BodySizePct) Batch

func (ind *BodySizePct) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BodySizePct) BatchInto

func (ind *BodySizePct) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BodySizePct) Close

func (ind *BodySizePct) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BodySizePct) IsReady

func (ind *BodySizePct) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BodySizePct) Name

func (ind *BodySizePct) Name() string

Name returns the indicator's canonical name.

func (*BodySizePct) Reset

func (ind *BodySizePct) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BodySizePct) Update

func (ind *BodySizePct) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BodySizePct) WarmupPeriod

func (ind *BodySizePct) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BollingerBands

type BollingerBands struct {
	// contains filtered or unexported fields
}

BollingerBands wraps the BollingerBands indicator over the Wickra C ABI.

func NewBollingerBands

func NewBollingerBands(period int, multiplier float64) (*BollingerBands, error)

NewBollingerBands constructs a BollingerBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BollingerBands) Batch

func (ind *BollingerBands) Batch(input []float64) []BollingerOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*BollingerBands) BatchFast

func (ind *BollingerBands) BatchFast(input []float64) []BollingerOutput

BatchFast is the opt-in fast batch: the SIMD kernel reassociates the arithmetic, so each field agrees with Batch to within a few units in the last place rather than bit for bit; warmup rows and length are identical, and the result is the same on every platform.

func (*BollingerBands) Close

func (ind *BollingerBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BollingerBands) IsReady

func (ind *BollingerBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BollingerBands) Name

func (ind *BollingerBands) Name() string

Name returns the indicator's canonical name.

func (*BollingerBands) Reset

func (ind *BollingerBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BollingerBands) Update

func (ind *BollingerBands) Update(value float64) (BollingerOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*BollingerBands) WarmupPeriod

func (ind *BollingerBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BollingerBandwidth

type BollingerBandwidth struct {
	// contains filtered or unexported fields
}

BollingerBandwidth wraps the BollingerBandwidth indicator over the Wickra C ABI.

func NewBollingerBandwidth

func NewBollingerBandwidth(period int, multiplier float64) (*BollingerBandwidth, error)

NewBollingerBandwidth constructs a BollingerBandwidth. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BollingerBandwidth) Batch

func (ind *BollingerBandwidth) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BollingerBandwidth) BatchFast

func (ind *BollingerBandwidth) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*BollingerBandwidth) BatchFastInto

func (ind *BollingerBandwidth) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BollingerBandwidth) BatchInto

func (ind *BollingerBandwidth) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BollingerBandwidth) Close

func (ind *BollingerBandwidth) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BollingerBandwidth) IsReady

func (ind *BollingerBandwidth) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BollingerBandwidth) Name

func (ind *BollingerBandwidth) Name() string

Name returns the indicator's canonical name.

func (*BollingerBandwidth) Reset

func (ind *BollingerBandwidth) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BollingerBandwidth) Update

func (ind *BollingerBandwidth) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BollingerBandwidth) WarmupPeriod

func (ind *BollingerBandwidth) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BollingerOutput

type BollingerOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
	Stddev float64
}

BollingerOutput is the output of the Bollinger indicator.

type BomarBands

type BomarBands struct {
	// contains filtered or unexported fields
}

BomarBands wraps the BomarBands indicator over the Wickra C ABI.

func NewBomarBands

func NewBomarBands(period int, coverage float64) (*BomarBands, error)

NewBomarBands constructs a BomarBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BomarBands) Batch

func (ind *BomarBands) Batch(input []float64) []BomarBandsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*BomarBands) Close

func (ind *BomarBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BomarBands) IsReady

func (ind *BomarBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BomarBands) Name

func (ind *BomarBands) Name() string

Name returns the indicator's canonical name.

func (*BomarBands) Reset

func (ind *BomarBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BomarBands) Update

func (ind *BomarBands) Update(value float64) (BomarBandsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*BomarBands) WarmupPeriod

func (ind *BomarBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BomarBandsOutput

type BomarBandsOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

BomarBandsOutput is the output of the BomarBands indicator.

type BreadthThrust

type BreadthThrust struct {
	// contains filtered or unexported fields
}

BreadthThrust wraps the BreadthThrust indicator over the Wickra C ABI.

func NewBreadthThrust

func NewBreadthThrust(period int) (*BreadthThrust, error)

NewBreadthThrust constructs a BreadthThrust. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BreadthThrust) Batch

func (ind *BreadthThrust) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*BreadthThrust) Close

func (ind *BreadthThrust) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BreadthThrust) IsReady

func (ind *BreadthThrust) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BreadthThrust) Name

func (ind *BreadthThrust) Name() string

Name returns the indicator's canonical name.

func (*BreadthThrust) Reset

func (ind *BreadthThrust) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BreadthThrust) Update

func (ind *BreadthThrust) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*BreadthThrust) WarmupPeriod

func (ind *BreadthThrust) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Breakaway

type Breakaway struct {
	// contains filtered or unexported fields
}

Breakaway wraps the Breakaway indicator over the Wickra C ABI.

func NewBreakaway

func NewBreakaway() (*Breakaway, error)

NewBreakaway constructs a Breakaway. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Breakaway) Batch

func (ind *Breakaway) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Breakaway) BatchInto

func (ind *Breakaway) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Breakaway) Close

func (ind *Breakaway) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Breakaway) IsReady

func (ind *Breakaway) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Breakaway) Name

func (ind *Breakaway) Name() string

Name returns the indicator's canonical name.

func (*Breakaway) Reset

func (ind *Breakaway) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Breakaway) Update

func (ind *Breakaway) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Breakaway) WarmupPeriod

func (ind *Breakaway) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BullishPercentIndex

type BullishPercentIndex struct {
	// contains filtered or unexported fields
}

BullishPercentIndex wraps the BullishPercentIndex indicator over the Wickra C ABI.

func NewBullishPercentIndex

func NewBullishPercentIndex() (*BullishPercentIndex, error)

NewBullishPercentIndex constructs a BullishPercentIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BullishPercentIndex) Batch

func (ind *BullishPercentIndex) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*BullishPercentIndex) Close

func (ind *BullishPercentIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BullishPercentIndex) IsReady

func (ind *BullishPercentIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BullishPercentIndex) Name

func (ind *BullishPercentIndex) Name() string

Name returns the indicator's canonical name.

func (*BullishPercentIndex) Reset

func (ind *BullishPercentIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BullishPercentIndex) Update

func (ind *BullishPercentIndex) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*BullishPercentIndex) WarmupPeriod

func (ind *BullishPercentIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type BurkeRatio

type BurkeRatio struct {
	// contains filtered or unexported fields
}

BurkeRatio wraps the BurkeRatio indicator over the Wickra C ABI.

func NewBurkeRatio

func NewBurkeRatio(period int) (*BurkeRatio, error)

NewBurkeRatio constructs a BurkeRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*BurkeRatio) Batch

func (ind *BurkeRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*BurkeRatio) BatchFast

func (ind *BurkeRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*BurkeRatio) BatchFastInto

func (ind *BurkeRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BurkeRatio) BatchInto

func (ind *BurkeRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*BurkeRatio) Close

func (ind *BurkeRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*BurkeRatio) IsReady

func (ind *BurkeRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*BurkeRatio) Name

func (ind *BurkeRatio) Name() string

Name returns the indicator's canonical name.

func (*BurkeRatio) Reset

func (ind *BurkeRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*BurkeRatio) Update

func (ind *BurkeRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*BurkeRatio) WarmupPeriod

func (ind *BurkeRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Butterfly

type Butterfly struct {
	// contains filtered or unexported fields
}

Butterfly wraps the Butterfly indicator over the Wickra C ABI.

func NewButterfly

func NewButterfly() (*Butterfly, error)

NewButterfly constructs a Butterfly. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Butterfly) Batch

func (ind *Butterfly) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Butterfly) BatchInto

func (ind *Butterfly) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Butterfly) Close

func (ind *Butterfly) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Butterfly) IsReady

func (ind *Butterfly) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Butterfly) Name

func (ind *Butterfly) Name() string

Name returns the indicator's canonical name.

func (*Butterfly) Reset

func (ind *Butterfly) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Butterfly) Update

func (ind *Butterfly) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Butterfly) WarmupPeriod

func (ind *Butterfly) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CalendarSpread

type CalendarSpread struct {
	// contains filtered or unexported fields
}

CalendarSpread wraps the CalendarSpread indicator over the Wickra C ABI.

func NewCalendarSpread

func NewCalendarSpread() (*CalendarSpread, error)

NewCalendarSpread constructs a CalendarSpread. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CalendarSpread) Batch

func (ind *CalendarSpread) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CalendarSpread) BatchInto

func (ind *CalendarSpread) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CalendarSpread) Close

func (ind *CalendarSpread) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CalendarSpread) IsReady

func (ind *CalendarSpread) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CalendarSpread) Name

func (ind *CalendarSpread) Name() string

Name returns the indicator's canonical name.

func (*CalendarSpread) Reset

func (ind *CalendarSpread) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CalendarSpread) Update

func (ind *CalendarSpread) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CalendarSpread) WarmupPeriod

func (ind *CalendarSpread) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CalmarRatio

type CalmarRatio struct {
	// contains filtered or unexported fields
}

CalmarRatio wraps the CalmarRatio indicator over the Wickra C ABI.

func NewCalmarRatio

func NewCalmarRatio(period int) (*CalmarRatio, error)

NewCalmarRatio constructs a CalmarRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CalmarRatio) Batch

func (ind *CalmarRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CalmarRatio) BatchFast

func (ind *CalmarRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CalmarRatio) BatchFastInto

func (ind *CalmarRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CalmarRatio) BatchInto

func (ind *CalmarRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CalmarRatio) Close

func (ind *CalmarRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CalmarRatio) IsReady

func (ind *CalmarRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CalmarRatio) Name

func (ind *CalmarRatio) Name() string

Name returns the indicator's canonical name.

func (*CalmarRatio) Reset

func (ind *CalmarRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CalmarRatio) Update

func (ind *CalmarRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CalmarRatio) WarmupPeriod

func (ind *CalmarRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Camarilla

type Camarilla struct {
	// contains filtered or unexported fields
}

Camarilla wraps the Camarilla indicator over the Wickra C ABI.

func NewCamarilla

func NewCamarilla() (*Camarilla, error)

NewCamarilla constructs a Camarilla. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Camarilla) Batch

func (ind *Camarilla) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []CamarillaPivotsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Camarilla) Close

func (ind *Camarilla) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Camarilla) IsReady

func (ind *Camarilla) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Camarilla) Name

func (ind *Camarilla) Name() string

Name returns the indicator's canonical name.

func (*Camarilla) Reset

func (ind *Camarilla) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Camarilla) Update

func (ind *Camarilla) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (CamarillaPivotsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Camarilla) WarmupPeriod

func (ind *Camarilla) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CamarillaPivotsOutput

type CamarillaPivotsOutput struct {
	Pp float64
	R1 float64
	R2 float64
	R3 float64
	R4 float64
	S1 float64
	S2 float64
	S3 float64
	S4 float64
}

CamarillaPivotsOutput is the output of the CamarillaPivots indicator.

type Candle

type Candle struct {
	Open      float64
	High      float64
	Low       float64
	Close     float64
	Volume    float64
	Timestamp int64
}

Candle is the output of the Candle indicator.

func FetchBinanceKlines

func FetchBinanceKlines(symbol string, interval BinanceInterval, limit uint32, startMs, endMs int64, baseURL string) ([]Candle, error)

FetchBinanceKlines fetches historical klines from Binance's REST endpoint. symbol is the trading pair (case-insensitive), interval the kline interval, and limit the number of candles to request (1..=1000). startMs/endMs are inclusive Unix-millisecond bounds (negative = unset); baseURL overrides the host ("" = production https://api.binance.com). It blocks until the response arrives and returns ErrInvalidParams on a bad argument or transport error.

type CandleReader

type CandleReader struct {
	// contains filtered or unexported fields
}

CandleReader parses an OHLCV CSV buffer into candles over the Wickra C ABI.

func NewCandleReader

func NewCandleReader(csv string) (*CandleReader, error)

NewCandleReader parses a timestamp,open,high,low,close,volume CSV string (a leading UTF-8 BOM and field whitespace are tolerated). It returns ErrInvalidParams when the header or a row is malformed.

func (*CandleReader) Close

func (ind *CandleReader) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CandleReader) Read

func (ind *CandleReader) Read() []Candle

Read returns every candle parsed from the CSV, in file order.

type CandleVolume

type CandleVolume struct {
	// contains filtered or unexported fields
}

CandleVolume wraps the CandleVolume indicator over the Wickra C ABI.

func NewCandleVolume

func NewCandleVolume(period int) (*CandleVolume, error)

NewCandleVolume constructs a CandleVolume. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CandleVolume) Batch

func (ind *CandleVolume) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []CandleVolumeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*CandleVolume) Close

func (ind *CandleVolume) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CandleVolume) IsReady

func (ind *CandleVolume) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CandleVolume) Name

func (ind *CandleVolume) Name() string

Name returns the indicator's canonical name.

func (*CandleVolume) Reset

func (ind *CandleVolume) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CandleVolume) Update

func (ind *CandleVolume) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (CandleVolumeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*CandleVolume) WarmupPeriod

func (ind *CandleVolume) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CandleVolumeOutput

type CandleVolumeOutput struct {
	Body  float64
	Width float64
}

CandleVolumeOutput is the output of the CandleVolume indicator.

type Cci

type Cci struct {
	// contains filtered or unexported fields
}

Cci wraps the Cci indicator over the Wickra C ABI.

func NewCci

func NewCci(period int) (*Cci, error)

NewCci constructs a Cci. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Cci) Batch

func (ind *Cci) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Cci) BatchInto

func (ind *Cci) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cci) Close

func (ind *Cci) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Cci) IsReady

func (ind *Cci) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Cci) Name

func (ind *Cci) Name() string

Name returns the indicator's canonical name.

func (*Cci) Reset

func (ind *Cci) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Cci) Update

func (ind *Cci) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Cci) WarmupPeriod

func (ind *Cci) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CenterOfGravity

type CenterOfGravity struct {
	// contains filtered or unexported fields
}

CenterOfGravity wraps the CenterOfGravity indicator over the Wickra C ABI.

func NewCenterOfGravity

func NewCenterOfGravity(period int) (*CenterOfGravity, error)

NewCenterOfGravity constructs a CenterOfGravity. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CenterOfGravity) Batch

func (ind *CenterOfGravity) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CenterOfGravity) BatchFast

func (ind *CenterOfGravity) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CenterOfGravity) BatchFastInto

func (ind *CenterOfGravity) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CenterOfGravity) BatchInto

func (ind *CenterOfGravity) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CenterOfGravity) Close

func (ind *CenterOfGravity) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CenterOfGravity) IsReady

func (ind *CenterOfGravity) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CenterOfGravity) Name

func (ind *CenterOfGravity) Name() string

Name returns the indicator's canonical name.

func (*CenterOfGravity) Reset

func (ind *CenterOfGravity) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CenterOfGravity) Update

func (ind *CenterOfGravity) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CenterOfGravity) WarmupPeriod

func (ind *CenterOfGravity) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CentralPivotRange

type CentralPivotRange struct {
	// contains filtered or unexported fields
}

CentralPivotRange wraps the CentralPivotRange indicator over the Wickra C ABI.

func NewCentralPivotRange

func NewCentralPivotRange() (*CentralPivotRange, error)

NewCentralPivotRange constructs a CentralPivotRange. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CentralPivotRange) Batch

func (ind *CentralPivotRange) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []CentralPivotRangeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*CentralPivotRange) Close

func (ind *CentralPivotRange) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CentralPivotRange) IsReady

func (ind *CentralPivotRange) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CentralPivotRange) Name

func (ind *CentralPivotRange) Name() string

Name returns the indicator's canonical name.

func (*CentralPivotRange) Reset

func (ind *CentralPivotRange) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CentralPivotRange) Update

func (ind *CentralPivotRange) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (CentralPivotRangeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*CentralPivotRange) WarmupPeriod

func (ind *CentralPivotRange) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CentralPivotRangeOutput

type CentralPivotRangeOutput struct {
	Pivot float64
	Tc    float64
	Bc    float64
}

CentralPivotRangeOutput is the output of the CentralPivotRange indicator.

type Cfo

type Cfo struct {
	// contains filtered or unexported fields
}

Cfo wraps the Cfo indicator over the Wickra C ABI.

func NewCfo

func NewCfo(period int) (*Cfo, error)

NewCfo constructs a Cfo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Cfo) Batch

func (ind *Cfo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Cfo) BatchFast

func (ind *Cfo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Cfo) BatchFastInto

func (ind *Cfo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cfo) BatchInto

func (ind *Cfo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cfo) Close

func (ind *Cfo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Cfo) IsReady

func (ind *Cfo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Cfo) Name

func (ind *Cfo) Name() string

Name returns the indicator's canonical name.

func (*Cfo) Reset

func (ind *Cfo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Cfo) Update

func (ind *Cfo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Cfo) WarmupPeriod

func (ind *Cfo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChaikinMoneyFlow

type ChaikinMoneyFlow struct {
	// contains filtered or unexported fields
}

ChaikinMoneyFlow wraps the ChaikinMoneyFlow indicator over the Wickra C ABI.

func NewChaikinMoneyFlow

func NewChaikinMoneyFlow(period int) (*ChaikinMoneyFlow, error)

NewChaikinMoneyFlow constructs a ChaikinMoneyFlow. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChaikinMoneyFlow) Batch

func (ind *ChaikinMoneyFlow) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ChaikinMoneyFlow) BatchInto

func (ind *ChaikinMoneyFlow) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ChaikinMoneyFlow) Close

func (ind *ChaikinMoneyFlow) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChaikinMoneyFlow) IsReady

func (ind *ChaikinMoneyFlow) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChaikinMoneyFlow) Name

func (ind *ChaikinMoneyFlow) Name() string

Name returns the indicator's canonical name.

func (*ChaikinMoneyFlow) Reset

func (ind *ChaikinMoneyFlow) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChaikinMoneyFlow) Update

func (ind *ChaikinMoneyFlow) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ChaikinMoneyFlow) WarmupPeriod

func (ind *ChaikinMoneyFlow) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChaikinOscillator

type ChaikinOscillator struct {
	// contains filtered or unexported fields
}

ChaikinOscillator wraps the ChaikinOscillator indicator over the Wickra C ABI.

func NewChaikinOscillator

func NewChaikinOscillator(fast int, slow int) (*ChaikinOscillator, error)

NewChaikinOscillator constructs a ChaikinOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChaikinOscillator) Batch

func (ind *ChaikinOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ChaikinOscillator) BatchFast

func (ind *ChaikinOscillator) BatchFast(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*ChaikinOscillator) BatchFastInto

func (ind *ChaikinOscillator) BatchFastInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ChaikinOscillator) BatchInto

func (ind *ChaikinOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ChaikinOscillator) Close

func (ind *ChaikinOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChaikinOscillator) IsReady

func (ind *ChaikinOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChaikinOscillator) Name

func (ind *ChaikinOscillator) Name() string

Name returns the indicator's canonical name.

func (*ChaikinOscillator) Reset

func (ind *ChaikinOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChaikinOscillator) Update

func (ind *ChaikinOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ChaikinOscillator) WarmupPeriod

func (ind *ChaikinOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChaikinVolatility

type ChaikinVolatility struct {
	// contains filtered or unexported fields
}

ChaikinVolatility wraps the ChaikinVolatility indicator over the Wickra C ABI.

func NewChaikinVolatility

func NewChaikinVolatility(emaPeriod int, rocPeriod int) (*ChaikinVolatility, error)

NewChaikinVolatility constructs a ChaikinVolatility. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChaikinVolatility) Batch

func (ind *ChaikinVolatility) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ChaikinVolatility) BatchInto

func (ind *ChaikinVolatility) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ChaikinVolatility) Close

func (ind *ChaikinVolatility) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChaikinVolatility) IsReady

func (ind *ChaikinVolatility) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChaikinVolatility) Name

func (ind *ChaikinVolatility) Name() string

Name returns the indicator's canonical name.

func (*ChaikinVolatility) Reset

func (ind *ChaikinVolatility) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChaikinVolatility) Update

func (ind *ChaikinVolatility) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ChaikinVolatility) WarmupPeriod

func (ind *ChaikinVolatility) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChandeKrollStop

type ChandeKrollStop struct {
	// contains filtered or unexported fields
}

ChandeKrollStop wraps the ChandeKrollStop indicator over the Wickra C ABI.

func NewChandeKrollStop

func NewChandeKrollStop(atrPeriod int, atrMultiplier float64, stopPeriod int) (*ChandeKrollStop, error)

NewChandeKrollStop constructs a ChandeKrollStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChandeKrollStop) Batch

func (ind *ChandeKrollStop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ChandeKrollStopOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ChandeKrollStop) Close

func (ind *ChandeKrollStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChandeKrollStop) IsReady

func (ind *ChandeKrollStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChandeKrollStop) Name

func (ind *ChandeKrollStop) Name() string

Name returns the indicator's canonical name.

func (*ChandeKrollStop) Reset

func (ind *ChandeKrollStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChandeKrollStop) Update

func (ind *ChandeKrollStop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ChandeKrollStopOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ChandeKrollStop) WarmupPeriod

func (ind *ChandeKrollStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChandeKrollStopOutput

type ChandeKrollStopOutput struct {
	StopLong  float64
	StopShort float64
}

ChandeKrollStopOutput is the output of the ChandeKrollStop indicator.

type ChandelierExit

type ChandelierExit struct {
	// contains filtered or unexported fields
}

ChandelierExit wraps the ChandelierExit indicator over the Wickra C ABI.

func NewChandelierExit

func NewChandelierExit(period int, multiplier float64) (*ChandelierExit, error)

NewChandelierExit constructs a ChandelierExit. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChandelierExit) Batch

func (ind *ChandelierExit) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ChandelierExitOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ChandelierExit) Close

func (ind *ChandelierExit) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChandelierExit) IsReady

func (ind *ChandelierExit) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChandelierExit) Name

func (ind *ChandelierExit) Name() string

Name returns the indicator's canonical name.

func (*ChandelierExit) Reset

func (ind *ChandelierExit) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChandelierExit) Update

func (ind *ChandelierExit) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ChandelierExitOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ChandelierExit) WarmupPeriod

func (ind *ChandelierExit) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ChandelierExitOutput

type ChandelierExitOutput struct {
	LongStop  float64
	ShortStop float64
}

ChandelierExitOutput is the output of the ChandelierExit indicator.

type ChoppinessIndex

type ChoppinessIndex struct {
	// contains filtered or unexported fields
}

ChoppinessIndex wraps the ChoppinessIndex indicator over the Wickra C ABI.

func NewChoppinessIndex

func NewChoppinessIndex(period int) (*ChoppinessIndex, error)

NewChoppinessIndex constructs a ChoppinessIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ChoppinessIndex) Batch

func (ind *ChoppinessIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ChoppinessIndex) BatchInto

func (ind *ChoppinessIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ChoppinessIndex) Close

func (ind *ChoppinessIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ChoppinessIndex) IsReady

func (ind *ChoppinessIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ChoppinessIndex) Name

func (ind *ChoppinessIndex) Name() string

Name returns the indicator's canonical name.

func (*ChoppinessIndex) Reset

func (ind *ChoppinessIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ChoppinessIndex) Update

func (ind *ChoppinessIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ChoppinessIndex) WarmupPeriod

func (ind *ChoppinessIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ClassicPivots

type ClassicPivots struct {
	// contains filtered or unexported fields
}

ClassicPivots wraps the ClassicPivots indicator over the Wickra C ABI.

func NewClassicPivots

func NewClassicPivots() (*ClassicPivots, error)

NewClassicPivots constructs a ClassicPivots. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ClassicPivots) Batch

func (ind *ClassicPivots) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ClassicPivotsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ClassicPivots) Close

func (ind *ClassicPivots) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ClassicPivots) IsReady

func (ind *ClassicPivots) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ClassicPivots) Name

func (ind *ClassicPivots) Name() string

Name returns the indicator's canonical name.

func (*ClassicPivots) Reset

func (ind *ClassicPivots) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ClassicPivots) Update

func (ind *ClassicPivots) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ClassicPivotsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ClassicPivots) WarmupPeriod

func (ind *ClassicPivots) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ClassicPivotsOutput

type ClassicPivotsOutput struct {
	Pp float64
	R1 float64
	R2 float64
	R3 float64
	S1 float64
	S2 float64
	S3 float64
}

ClassicPivotsOutput is the output of the ClassicPivots indicator.

type CloseVsOpen

type CloseVsOpen struct {
	// contains filtered or unexported fields
}

CloseVsOpen wraps the CloseVsOpen indicator over the Wickra C ABI.

func NewCloseVsOpen

func NewCloseVsOpen() (*CloseVsOpen, error)

NewCloseVsOpen constructs a CloseVsOpen. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CloseVsOpen) Batch

func (ind *CloseVsOpen) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CloseVsOpen) BatchInto

func (ind *CloseVsOpen) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CloseVsOpen) Close

func (ind *CloseVsOpen) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CloseVsOpen) IsReady

func (ind *CloseVsOpen) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CloseVsOpen) Name

func (ind *CloseVsOpen) Name() string

Name returns the indicator's canonical name.

func (*CloseVsOpen) Reset

func (ind *CloseVsOpen) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CloseVsOpen) Update

func (ind *CloseVsOpen) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CloseVsOpen) WarmupPeriod

func (ind *CloseVsOpen) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ClosingMarubozu

type ClosingMarubozu struct {
	// contains filtered or unexported fields
}

ClosingMarubozu wraps the ClosingMarubozu indicator over the Wickra C ABI.

func NewClosingMarubozu

func NewClosingMarubozu() (*ClosingMarubozu, error)

NewClosingMarubozu constructs a ClosingMarubozu. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ClosingMarubozu) Batch

func (ind *ClosingMarubozu) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ClosingMarubozu) BatchInto

func (ind *ClosingMarubozu) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ClosingMarubozu) Close

func (ind *ClosingMarubozu) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ClosingMarubozu) IsReady

func (ind *ClosingMarubozu) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ClosingMarubozu) Name

func (ind *ClosingMarubozu) Name() string

Name returns the indicator's canonical name.

func (*ClosingMarubozu) Reset

func (ind *ClosingMarubozu) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ClosingMarubozu) Update

func (ind *ClosingMarubozu) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ClosingMarubozu) WarmupPeriod

func (ind *ClosingMarubozu) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Cmo

type Cmo struct {
	// contains filtered or unexported fields
}

Cmo wraps the Cmo indicator over the Wickra C ABI.

func NewCmo

func NewCmo(period int) (*Cmo, error)

NewCmo constructs a Cmo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Cmo) Batch

func (ind *Cmo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Cmo) BatchFast

func (ind *Cmo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Cmo) BatchFastInto

func (ind *Cmo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cmo) BatchInto

func (ind *Cmo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cmo) Close

func (ind *Cmo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Cmo) IsReady

func (ind *Cmo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Cmo) Name

func (ind *Cmo) Name() string

Name returns the indicator's canonical name.

func (*Cmo) Reset

func (ind *Cmo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Cmo) Update

func (ind *Cmo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Cmo) WarmupPeriod

func (ind *Cmo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CoefficientOfVariation

type CoefficientOfVariation struct {
	// contains filtered or unexported fields
}

CoefficientOfVariation wraps the CoefficientOfVariation indicator over the Wickra C ABI.

func NewCoefficientOfVariation

func NewCoefficientOfVariation(period int) (*CoefficientOfVariation, error)

NewCoefficientOfVariation constructs a CoefficientOfVariation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CoefficientOfVariation) Batch

func (ind *CoefficientOfVariation) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CoefficientOfVariation) BatchFast

func (ind *CoefficientOfVariation) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CoefficientOfVariation) BatchFastInto

func (ind *CoefficientOfVariation) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CoefficientOfVariation) BatchInto

func (ind *CoefficientOfVariation) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CoefficientOfVariation) Close

func (ind *CoefficientOfVariation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CoefficientOfVariation) IsReady

func (ind *CoefficientOfVariation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CoefficientOfVariation) Name

func (ind *CoefficientOfVariation) Name() string

Name returns the indicator's canonical name.

func (*CoefficientOfVariation) Reset

func (ind *CoefficientOfVariation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CoefficientOfVariation) Update

func (ind *CoefficientOfVariation) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CoefficientOfVariation) WarmupPeriod

func (ind *CoefficientOfVariation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Cointegration

type Cointegration struct {
	// contains filtered or unexported fields
}

Cointegration wraps the Cointegration indicator over the Wickra C ABI.

func NewCointegration

func NewCointegration(period int, adfLags int) (*Cointegration, error)

NewCointegration constructs a Cointegration. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Cointegration) Batch

func (ind *Cointegration) Batch(x []float64, y []float64) []CointegrationOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Cointegration) Close

func (ind *Cointegration) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Cointegration) IsReady

func (ind *Cointegration) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Cointegration) Name

func (ind *Cointegration) Name() string

Name returns the indicator's canonical name.

func (*Cointegration) Reset

func (ind *Cointegration) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Cointegration) Update

func (ind *Cointegration) Update(x float64, y float64) (CointegrationOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Cointegration) WarmupPeriod

func (ind *Cointegration) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CointegrationOutput

type CointegrationOutput struct {
	HedgeRatio float64
	Spread     float64
	AdfStat    float64
}

CointegrationOutput is the output of the Cointegration indicator.

type CommonSenseRatio

type CommonSenseRatio struct {
	// contains filtered or unexported fields
}

CommonSenseRatio wraps the CommonSenseRatio indicator over the Wickra C ABI.

func NewCommonSenseRatio

func NewCommonSenseRatio(period int) (*CommonSenseRatio, error)

NewCommonSenseRatio constructs a CommonSenseRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CommonSenseRatio) Batch

func (ind *CommonSenseRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CommonSenseRatio) BatchFast

func (ind *CommonSenseRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CommonSenseRatio) BatchFastInto

func (ind *CommonSenseRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CommonSenseRatio) BatchInto

func (ind *CommonSenseRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CommonSenseRatio) Close

func (ind *CommonSenseRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CommonSenseRatio) IsReady

func (ind *CommonSenseRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CommonSenseRatio) Name

func (ind *CommonSenseRatio) Name() string

Name returns the indicator's canonical name.

func (*CommonSenseRatio) Reset

func (ind *CommonSenseRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CommonSenseRatio) Update

func (ind *CommonSenseRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CommonSenseRatio) WarmupPeriod

func (ind *CommonSenseRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CompositeProfile

type CompositeProfile struct {
	// contains filtered or unexported fields
}

CompositeProfile wraps the CompositeProfile indicator over the Wickra C ABI.

func NewCompositeProfile

func NewCompositeProfile(period int, bins int, valueAreaPct float64) (*CompositeProfile, error)

NewCompositeProfile constructs a CompositeProfile. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CompositeProfile) Batch

func (ind *CompositeProfile) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []CompositeProfileOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*CompositeProfile) Close

func (ind *CompositeProfile) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CompositeProfile) IsReady

func (ind *CompositeProfile) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CompositeProfile) Name

func (ind *CompositeProfile) Name() string

Name returns the indicator's canonical name.

func (*CompositeProfile) Reset

func (ind *CompositeProfile) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CompositeProfile) Update

func (ind *CompositeProfile) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (CompositeProfileOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*CompositeProfile) WarmupPeriod

func (ind *CompositeProfile) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CompositeProfileOutput

type CompositeProfileOutput struct {
	Poc float64
	Vah float64
	Val float64
}

CompositeProfileOutput is the output of the CompositeProfile indicator.

type ConcealingBabySwallow

type ConcealingBabySwallow struct {
	// contains filtered or unexported fields
}

ConcealingBabySwallow wraps the ConcealingBabySwallow indicator over the Wickra C ABI.

func NewConcealingBabySwallow

func NewConcealingBabySwallow() (*ConcealingBabySwallow, error)

NewConcealingBabySwallow constructs a ConcealingBabySwallow. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ConcealingBabySwallow) Batch

func (ind *ConcealingBabySwallow) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ConcealingBabySwallow) BatchInto

func (ind *ConcealingBabySwallow) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ConcealingBabySwallow) Close

func (ind *ConcealingBabySwallow) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ConcealingBabySwallow) IsReady

func (ind *ConcealingBabySwallow) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ConcealingBabySwallow) Name

func (ind *ConcealingBabySwallow) Name() string

Name returns the indicator's canonical name.

func (*ConcealingBabySwallow) Reset

func (ind *ConcealingBabySwallow) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ConcealingBabySwallow) Update

func (ind *ConcealingBabySwallow) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ConcealingBabySwallow) WarmupPeriod

func (ind *ConcealingBabySwallow) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ConditionalValueAtRisk

type ConditionalValueAtRisk struct {
	// contains filtered or unexported fields
}

ConditionalValueAtRisk wraps the ConditionalValueAtRisk indicator over the Wickra C ABI.

func NewConditionalValueAtRisk

func NewConditionalValueAtRisk(period int, confidence float64) (*ConditionalValueAtRisk, error)

NewConditionalValueAtRisk constructs a ConditionalValueAtRisk. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ConditionalValueAtRisk) Batch

func (ind *ConditionalValueAtRisk) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ConditionalValueAtRisk) BatchFast

func (ind *ConditionalValueAtRisk) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*ConditionalValueAtRisk) BatchFastInto

func (ind *ConditionalValueAtRisk) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ConditionalValueAtRisk) BatchInto

func (ind *ConditionalValueAtRisk) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ConditionalValueAtRisk) Close

func (ind *ConditionalValueAtRisk) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ConditionalValueAtRisk) IsReady

func (ind *ConditionalValueAtRisk) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ConditionalValueAtRisk) Name

func (ind *ConditionalValueAtRisk) Name() string

Name returns the indicator's canonical name.

func (*ConditionalValueAtRisk) Reset

func (ind *ConditionalValueAtRisk) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ConditionalValueAtRisk) Update

func (ind *ConditionalValueAtRisk) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ConditionalValueAtRisk) WarmupPeriod

func (ind *ConditionalValueAtRisk) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ConnorsRsi

type ConnorsRsi struct {
	// contains filtered or unexported fields
}

ConnorsRsi wraps the ConnorsRsi indicator over the Wickra C ABI.

func NewConnorsRsi

func NewConnorsRsi(periodRsi int, periodStreak int, periodRank int) (*ConnorsRsi, error)

NewConnorsRsi constructs a ConnorsRsi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ConnorsRsi) Batch

func (ind *ConnorsRsi) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ConnorsRsi) BatchFast

func (ind *ConnorsRsi) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*ConnorsRsi) BatchFastInto

func (ind *ConnorsRsi) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ConnorsRsi) BatchInto

func (ind *ConnorsRsi) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ConnorsRsi) Close

func (ind *ConnorsRsi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ConnorsRsi) IsReady

func (ind *ConnorsRsi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ConnorsRsi) Name

func (ind *ConnorsRsi) Name() string

Name returns the indicator's canonical name.

func (*ConnorsRsi) Reset

func (ind *ConnorsRsi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ConnorsRsi) Update

func (ind *ConnorsRsi) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ConnorsRsi) WarmupPeriod

func (ind *ConnorsRsi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Coppock

type Coppock struct {
	// contains filtered or unexported fields
}

Coppock wraps the Coppock indicator over the Wickra C ABI.

func NewCoppock

func NewCoppock(rocLongPeriod int, rocShortPeriod int, wmaPeriod int) (*Coppock, error)

NewCoppock constructs a Coppock. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Coppock) Batch

func (ind *Coppock) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Coppock) BatchFast

func (ind *Coppock) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Coppock) BatchFastInto

func (ind *Coppock) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Coppock) BatchInto

func (ind *Coppock) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Coppock) Close

func (ind *Coppock) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Coppock) IsReady

func (ind *Coppock) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Coppock) Name

func (ind *Coppock) Name() string

Name returns the indicator's canonical name.

func (*Coppock) Reset

func (ind *Coppock) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Coppock) Update

func (ind *Coppock) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Coppock) WarmupPeriod

func (ind *Coppock) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CorrelationTrendIndicator

type CorrelationTrendIndicator struct {
	// contains filtered or unexported fields
}

CorrelationTrendIndicator wraps the CorrelationTrendIndicator indicator over the Wickra C ABI.

func NewCorrelationTrendIndicator

func NewCorrelationTrendIndicator(period int) (*CorrelationTrendIndicator, error)

NewCorrelationTrendIndicator constructs a CorrelationTrendIndicator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CorrelationTrendIndicator) Batch

func (ind *CorrelationTrendIndicator) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CorrelationTrendIndicator) BatchFast

func (ind *CorrelationTrendIndicator) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CorrelationTrendIndicator) BatchFastInto

func (ind *CorrelationTrendIndicator) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CorrelationTrendIndicator) BatchInto

func (ind *CorrelationTrendIndicator) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CorrelationTrendIndicator) Close

func (ind *CorrelationTrendIndicator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CorrelationTrendIndicator) IsReady

func (ind *CorrelationTrendIndicator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CorrelationTrendIndicator) Name

func (ind *CorrelationTrendIndicator) Name() string

Name returns the indicator's canonical name.

func (*CorrelationTrendIndicator) Reset

func (ind *CorrelationTrendIndicator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CorrelationTrendIndicator) Update

func (ind *CorrelationTrendIndicator) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CorrelationTrendIndicator) WarmupPeriod

func (ind *CorrelationTrendIndicator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Counterattack

type Counterattack struct {
	// contains filtered or unexported fields
}

Counterattack wraps the Counterattack indicator over the Wickra C ABI.

func NewCounterattack

func NewCounterattack() (*Counterattack, error)

NewCounterattack constructs a Counterattack. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Counterattack) Batch

func (ind *Counterattack) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Counterattack) BatchInto

func (ind *Counterattack) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Counterattack) Close

func (ind *Counterattack) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Counterattack) IsReady

func (ind *Counterattack) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Counterattack) Name

func (ind *Counterattack) Name() string

Name returns the indicator's canonical name.

func (*Counterattack) Reset

func (ind *Counterattack) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Counterattack) Update

func (ind *Counterattack) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Counterattack) WarmupPeriod

func (ind *Counterattack) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Crab

type Crab struct {
	// contains filtered or unexported fields
}

Crab wraps the Crab indicator over the Wickra C ABI.

func NewCrab

func NewCrab() (*Crab, error)

NewCrab constructs a Crab. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Crab) Batch

func (ind *Crab) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Crab) BatchInto

func (ind *Crab) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Crab) Close

func (ind *Crab) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Crab) IsReady

func (ind *Crab) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Crab) Name

func (ind *Crab) Name() string

Name returns the indicator's canonical name.

func (*Crab) Reset

func (ind *Crab) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Crab) Update

func (ind *Crab) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Crab) WarmupPeriod

func (ind *Crab) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CumulativeVolumeDelta

type CumulativeVolumeDelta struct {
	// contains filtered or unexported fields
}

CumulativeVolumeDelta wraps the CumulativeVolumeDelta indicator over the Wickra C ABI.

func NewCumulativeVolumeDelta

func NewCumulativeVolumeDelta() (*CumulativeVolumeDelta, error)

NewCumulativeVolumeDelta constructs a CumulativeVolumeDelta. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CumulativeVolumeDelta) Batch

func (ind *CumulativeVolumeDelta) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CumulativeVolumeDelta) BatchInto

func (ind *CumulativeVolumeDelta) BatchInto(dst []float64, price []float64, size []float64, isBuy []bool, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CumulativeVolumeDelta) Close

func (ind *CumulativeVolumeDelta) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CumulativeVolumeDelta) IsReady

func (ind *CumulativeVolumeDelta) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CumulativeVolumeDelta) Name

func (ind *CumulativeVolumeDelta) Name() string

Name returns the indicator's canonical name.

func (*CumulativeVolumeDelta) Reset

func (ind *CumulativeVolumeDelta) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CumulativeVolumeDelta) Update

func (ind *CumulativeVolumeDelta) Update(price float64, size float64, isBuy bool, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CumulativeVolumeDelta) WarmupPeriod

func (ind *CumulativeVolumeDelta) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CumulativeVolumeIndex

type CumulativeVolumeIndex struct {
	// contains filtered or unexported fields
}

CumulativeVolumeIndex wraps the CumulativeVolumeIndex indicator over the Wickra C ABI.

func NewCumulativeVolumeIndex

func NewCumulativeVolumeIndex() (*CumulativeVolumeIndex, error)

NewCumulativeVolumeIndex constructs a CumulativeVolumeIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CumulativeVolumeIndex) Batch

func (ind *CumulativeVolumeIndex) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*CumulativeVolumeIndex) Close

func (ind *CumulativeVolumeIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CumulativeVolumeIndex) IsReady

func (ind *CumulativeVolumeIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CumulativeVolumeIndex) Name

func (ind *CumulativeVolumeIndex) Name() string

Name returns the indicator's canonical name.

func (*CumulativeVolumeIndex) Reset

func (ind *CumulativeVolumeIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CumulativeVolumeIndex) Update

func (ind *CumulativeVolumeIndex) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*CumulativeVolumeIndex) WarmupPeriod

func (ind *CumulativeVolumeIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CupAndHandle

type CupAndHandle struct {
	// contains filtered or unexported fields
}

CupAndHandle wraps the CupAndHandle indicator over the Wickra C ABI.

func NewCupAndHandle

func NewCupAndHandle() (*CupAndHandle, error)

NewCupAndHandle constructs a CupAndHandle. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CupAndHandle) Batch

func (ind *CupAndHandle) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CupAndHandle) BatchInto

func (ind *CupAndHandle) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CupAndHandle) Close

func (ind *CupAndHandle) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CupAndHandle) IsReady

func (ind *CupAndHandle) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CupAndHandle) Name

func (ind *CupAndHandle) Name() string

Name returns the indicator's canonical name.

func (*CupAndHandle) Reset

func (ind *CupAndHandle) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CupAndHandle) Update

func (ind *CupAndHandle) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CupAndHandle) WarmupPeriod

func (ind *CupAndHandle) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type CyberneticCycle

type CyberneticCycle struct {
	// contains filtered or unexported fields
}

CyberneticCycle wraps the CyberneticCycle indicator over the Wickra C ABI.

func NewCyberneticCycle

func NewCyberneticCycle(period int) (*CyberneticCycle, error)

NewCyberneticCycle constructs a CyberneticCycle. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*CyberneticCycle) Batch

func (ind *CyberneticCycle) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*CyberneticCycle) BatchFast

func (ind *CyberneticCycle) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*CyberneticCycle) BatchFastInto

func (ind *CyberneticCycle) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CyberneticCycle) BatchInto

func (ind *CyberneticCycle) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*CyberneticCycle) Close

func (ind *CyberneticCycle) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*CyberneticCycle) IsReady

func (ind *CyberneticCycle) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*CyberneticCycle) Name

func (ind *CyberneticCycle) Name() string

Name returns the indicator's canonical name.

func (*CyberneticCycle) Reset

func (ind *CyberneticCycle) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*CyberneticCycle) Update

func (ind *CyberneticCycle) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*CyberneticCycle) WarmupPeriod

func (ind *CyberneticCycle) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Cypher

type Cypher struct {
	// contains filtered or unexported fields
}

Cypher wraps the Cypher indicator over the Wickra C ABI.

func NewCypher

func NewCypher() (*Cypher, error)

NewCypher constructs a Cypher. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Cypher) Batch

func (ind *Cypher) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Cypher) BatchInto

func (ind *Cypher) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Cypher) Close

func (ind *Cypher) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Cypher) IsReady

func (ind *Cypher) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Cypher) Name

func (ind *Cypher) Name() string

Name returns the indicator's canonical name.

func (*Cypher) Reset

func (ind *Cypher) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Cypher) Update

func (ind *Cypher) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Cypher) WarmupPeriod

func (ind *Cypher) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DayOfWeekProfile

type DayOfWeekProfile struct {
	// contains filtered or unexported fields
}

DayOfWeekProfile wraps the DayOfWeekProfile indicator over the Wickra C ABI.

func NewDayOfWeekProfile

func NewDayOfWeekProfile(utcOffsetMinutes int32) (*DayOfWeekProfile, error)

NewDayOfWeekProfile constructs a DayOfWeekProfile. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DayOfWeekProfile) Batch

func (ind *DayOfWeekProfile) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) [][]float64

Batch feeds a whole series in one FFI call and returns one profile per input. A row the indicator did not produce carries NaN.

func (*DayOfWeekProfile) Close

func (ind *DayOfWeekProfile) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DayOfWeekProfile) IsReady

func (ind *DayOfWeekProfile) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DayOfWeekProfile) Name

func (ind *DayOfWeekProfile) Name() string

Name returns the indicator's canonical name.

func (*DayOfWeekProfile) Reset

func (ind *DayOfWeekProfile) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DayOfWeekProfile) Update

func (ind *DayOfWeekProfile) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) ([]float64, bool)

Update feeds one observation and returns the profile values (ok is false during warmup).

func (*DayOfWeekProfile) WarmupPeriod

func (ind *DayOfWeekProfile) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Decycler

type Decycler struct {
	// contains filtered or unexported fields
}

Decycler wraps the Decycler indicator over the Wickra C ABI.

func NewDecycler

func NewDecycler(period int) (*Decycler, error)

NewDecycler constructs a Decycler. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Decycler) Batch

func (ind *Decycler) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Decycler) BatchFast

func (ind *Decycler) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Decycler) BatchFastInto

func (ind *Decycler) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Decycler) BatchInto

func (ind *Decycler) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Decycler) Close

func (ind *Decycler) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Decycler) IsReady

func (ind *Decycler) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Decycler) Name

func (ind *Decycler) Name() string

Name returns the indicator's canonical name.

func (*Decycler) Reset

func (ind *Decycler) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Decycler) Update

func (ind *Decycler) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Decycler) WarmupPeriod

func (ind *Decycler) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DecyclerOscillator

type DecyclerOscillator struct {
	// contains filtered or unexported fields
}

DecyclerOscillator wraps the DecyclerOscillator indicator over the Wickra C ABI.

func NewDecyclerOscillator

func NewDecyclerOscillator(fast int, slow int) (*DecyclerOscillator, error)

NewDecyclerOscillator constructs a DecyclerOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DecyclerOscillator) Batch

func (ind *DecyclerOscillator) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DecyclerOscillator) BatchFast

func (ind *DecyclerOscillator) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*DecyclerOscillator) BatchFastInto

func (ind *DecyclerOscillator) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DecyclerOscillator) BatchInto

func (ind *DecyclerOscillator) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DecyclerOscillator) Close

func (ind *DecyclerOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DecyclerOscillator) IsReady

func (ind *DecyclerOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DecyclerOscillator) Name

func (ind *DecyclerOscillator) Name() string

Name returns the indicator's canonical name.

func (*DecyclerOscillator) Reset

func (ind *DecyclerOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DecyclerOscillator) Update

func (ind *DecyclerOscillator) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DecyclerOscillator) WarmupPeriod

func (ind *DecyclerOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Dema

type Dema struct {
	// contains filtered or unexported fields
}

Dema wraps the Dema indicator over the Wickra C ABI.

func NewDema

func NewDema(period int) (*Dema, error)

NewDema constructs a Dema. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Dema) Batch

func (ind *Dema) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Dema) BatchFast

func (ind *Dema) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Dema) BatchFastInto

func (ind *Dema) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Dema) BatchInto

func (ind *Dema) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Dema) Close

func (ind *Dema) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Dema) IsReady

func (ind *Dema) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Dema) Name

func (ind *Dema) Name() string

Name returns the indicator's canonical name.

func (*Dema) Reset

func (ind *Dema) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Dema) Update

func (ind *Dema) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Dema) WarmupPeriod

func (ind *Dema) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DemandIndex

type DemandIndex struct {
	// contains filtered or unexported fields
}

DemandIndex wraps the DemandIndex indicator over the Wickra C ABI.

func NewDemandIndex

func NewDemandIndex(period int) (*DemandIndex, error)

NewDemandIndex constructs a DemandIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DemandIndex) Batch

func (ind *DemandIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DemandIndex) BatchInto

func (ind *DemandIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DemandIndex) Close

func (ind *DemandIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DemandIndex) IsReady

func (ind *DemandIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DemandIndex) Name

func (ind *DemandIndex) Name() string

Name returns the indicator's canonical name.

func (*DemandIndex) Reset

func (ind *DemandIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DemandIndex) Update

func (ind *DemandIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DemandIndex) WarmupPeriod

func (ind *DemandIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DemarkPivots

type DemarkPivots struct {
	// contains filtered or unexported fields
}

DemarkPivots wraps the DemarkPivots indicator over the Wickra C ABI.

func NewDemarkPivots

func NewDemarkPivots() (*DemarkPivots, error)

NewDemarkPivots constructs a DemarkPivots. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DemarkPivots) Batch

func (ind *DemarkPivots) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []DemarkPivotsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*DemarkPivots) Close

func (ind *DemarkPivots) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DemarkPivots) IsReady

func (ind *DemarkPivots) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DemarkPivots) Name

func (ind *DemarkPivots) Name() string

Name returns the indicator's canonical name.

func (*DemarkPivots) Reset

func (ind *DemarkPivots) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DemarkPivots) Update

func (ind *DemarkPivots) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (DemarkPivotsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*DemarkPivots) WarmupPeriod

func (ind *DemarkPivots) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DemarkPivotsOutput

type DemarkPivotsOutput struct {
	Pp float64
	R1 float64
	S1 float64
}

DemarkPivotsOutput is the output of the DemarkPivots indicator.

type DepthSlope

type DepthSlope struct {
	// contains filtered or unexported fields
}

DepthSlope wraps the DepthSlope indicator over the Wickra C ABI.

func NewDepthSlope

func NewDepthSlope() (*DepthSlope, error)

NewDepthSlope constructs a DepthSlope. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DepthSlope) Batch

func (ind *DepthSlope) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*DepthSlope) Close

func (ind *DepthSlope) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DepthSlope) IsReady

func (ind *DepthSlope) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DepthSlope) Name

func (ind *DepthSlope) Name() string

Name returns the indicator's canonical name.

func (*DepthSlope) Reset

func (ind *DepthSlope) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DepthSlope) Update

func (ind *DepthSlope) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*DepthSlope) WarmupPeriod

func (ind *DepthSlope) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DerivativeOscillator

type DerivativeOscillator struct {
	// contains filtered or unexported fields
}

DerivativeOscillator wraps the DerivativeOscillator indicator over the Wickra C ABI.

func NewDerivativeOscillator

func NewDerivativeOscillator(rsiPeriod int, smooth1 int, smooth2 int, signalPeriod int) (*DerivativeOscillator, error)

NewDerivativeOscillator constructs a DerivativeOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DerivativeOscillator) Batch

func (ind *DerivativeOscillator) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DerivativeOscillator) BatchFast

func (ind *DerivativeOscillator) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*DerivativeOscillator) BatchFastInto

func (ind *DerivativeOscillator) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DerivativeOscillator) BatchInto

func (ind *DerivativeOscillator) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DerivativeOscillator) Close

func (ind *DerivativeOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DerivativeOscillator) IsReady

func (ind *DerivativeOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DerivativeOscillator) Name

func (ind *DerivativeOscillator) Name() string

Name returns the indicator's canonical name.

func (*DerivativeOscillator) Reset

func (ind *DerivativeOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DerivativeOscillator) Update

func (ind *DerivativeOscillator) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DerivativeOscillator) WarmupPeriod

func (ind *DerivativeOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DetrendedStdDev

type DetrendedStdDev struct {
	// contains filtered or unexported fields
}

DetrendedStdDev wraps the DetrendedStdDev indicator over the Wickra C ABI.

func NewDetrendedStdDev

func NewDetrendedStdDev(period int) (*DetrendedStdDev, error)

NewDetrendedStdDev constructs a DetrendedStdDev. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DetrendedStdDev) Batch

func (ind *DetrendedStdDev) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DetrendedStdDev) BatchFast

func (ind *DetrendedStdDev) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*DetrendedStdDev) BatchFastInto

func (ind *DetrendedStdDev) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DetrendedStdDev) BatchInto

func (ind *DetrendedStdDev) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DetrendedStdDev) Close

func (ind *DetrendedStdDev) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DetrendedStdDev) IsReady

func (ind *DetrendedStdDev) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DetrendedStdDev) Name

func (ind *DetrendedStdDev) Name() string

Name returns the indicator's canonical name.

func (*DetrendedStdDev) Reset

func (ind *DetrendedStdDev) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DetrendedStdDev) Update

func (ind *DetrendedStdDev) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DetrendedStdDev) WarmupPeriod

func (ind *DetrendedStdDev) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DisparityIndex

type DisparityIndex struct {
	// contains filtered or unexported fields
}

DisparityIndex wraps the DisparityIndex indicator over the Wickra C ABI.

func NewDisparityIndex

func NewDisparityIndex(period int) (*DisparityIndex, error)

NewDisparityIndex constructs a DisparityIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DisparityIndex) Batch

func (ind *DisparityIndex) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DisparityIndex) BatchFast

func (ind *DisparityIndex) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*DisparityIndex) BatchFastInto

func (ind *DisparityIndex) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DisparityIndex) BatchInto

func (ind *DisparityIndex) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DisparityIndex) Close

func (ind *DisparityIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DisparityIndex) IsReady

func (ind *DisparityIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DisparityIndex) Name

func (ind *DisparityIndex) Name() string

Name returns the indicator's canonical name.

func (*DisparityIndex) Reset

func (ind *DisparityIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DisparityIndex) Update

func (ind *DisparityIndex) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DisparityIndex) WarmupPeriod

func (ind *DisparityIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DistanceSsd

type DistanceSsd struct {
	// contains filtered or unexported fields
}

DistanceSsd wraps the DistanceSsd indicator over the Wickra C ABI.

func NewDistanceSsd

func NewDistanceSsd(period int) (*DistanceSsd, error)

NewDistanceSsd constructs a DistanceSsd. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DistanceSsd) Batch

func (ind *DistanceSsd) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DistanceSsd) BatchInto

func (ind *DistanceSsd) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DistanceSsd) Close

func (ind *DistanceSsd) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DistanceSsd) IsReady

func (ind *DistanceSsd) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DistanceSsd) Name

func (ind *DistanceSsd) Name() string

Name returns the indicator's canonical name.

func (*DistanceSsd) Reset

func (ind *DistanceSsd) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DistanceSsd) Update

func (ind *DistanceSsd) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DistanceSsd) WarmupPeriod

func (ind *DistanceSsd) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Doji

type Doji struct {
	// contains filtered or unexported fields
}

Doji wraps the Doji indicator over the Wickra C ABI.

func NewDoji

func NewDoji() (*Doji, error)

NewDoji constructs a Doji. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Doji) Batch

func (ind *Doji) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Doji) BatchInto

func (ind *Doji) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Doji) Close

func (ind *Doji) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Doji) IsReady

func (ind *Doji) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Doji) Name

func (ind *Doji) Name() string

Name returns the indicator's canonical name.

func (*Doji) Reset

func (ind *Doji) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Doji) Update

func (ind *Doji) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Doji) WarmupPeriod

func (ind *Doji) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DojiStar

type DojiStar struct {
	// contains filtered or unexported fields
}

DojiStar wraps the DojiStar indicator over the Wickra C ABI.

func NewDojiStar

func NewDojiStar() (*DojiStar, error)

NewDojiStar constructs a DojiStar. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DojiStar) Batch

func (ind *DojiStar) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DojiStar) BatchInto

func (ind *DojiStar) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DojiStar) Close

func (ind *DojiStar) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DojiStar) IsReady

func (ind *DojiStar) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DojiStar) Name

func (ind *DojiStar) Name() string

Name returns the indicator's canonical name.

func (*DojiStar) Reset

func (ind *DojiStar) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DojiStar) Update

func (ind *DojiStar) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DojiStar) WarmupPeriod

func (ind *DojiStar) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DollarBar

type DollarBar struct {
	Open   float64
	High   float64
	Low    float64
	Close  float64
	Volume float64
	Dollar float64
}

DollarBar is the output of the DollarBar indicator.

type DollarBars

type DollarBars struct {
	// contains filtered or unexported fields
}

DollarBars wraps the DollarBars indicator over the Wickra C ABI.

func NewDollarBars

func NewDollarBars(dollarPerBar float64) (*DollarBars, error)

NewDollarBars constructs a DollarBars. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DollarBars) Batch

func (ind *DollarBars) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []DollarBar

Batch feeds a whole series in one FFI call and returns every bar it completed. The count depends on the data, not on the input length.

func (*DollarBars) Close

func (ind *DollarBars) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DollarBars) Name

func (ind *DollarBars) Name() string

Name returns the indicator's canonical name.

func (*DollarBars) Reset

func (ind *DollarBars) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DollarBars) Update

func (ind *DollarBars) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) []DollarBar

Update feeds one candle and returns any bars completed by it (a single candle may complete several).

type Donchian

type Donchian struct {
	// contains filtered or unexported fields
}

Donchian wraps the Donchian indicator over the Wickra C ABI.

func NewDonchian

func NewDonchian(period int) (*Donchian, error)

NewDonchian constructs a Donchian. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Donchian) Batch

func (ind *Donchian) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []DonchianOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Donchian) Close

func (ind *Donchian) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Donchian) IsReady

func (ind *Donchian) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Donchian) Name

func (ind *Donchian) Name() string

Name returns the indicator's canonical name.

func (*Donchian) Reset

func (ind *Donchian) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Donchian) Update

func (ind *Donchian) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (DonchianOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Donchian) WarmupPeriod

func (ind *Donchian) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DonchianOutput

type DonchianOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

DonchianOutput is the output of the Donchian indicator.

type DonchianStop

type DonchianStop struct {
	// contains filtered or unexported fields
}

DonchianStop wraps the DonchianStop indicator over the Wickra C ABI.

func NewDonchianStop

func NewDonchianStop(period int) (*DonchianStop, error)

NewDonchianStop constructs a DonchianStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DonchianStop) Batch

func (ind *DonchianStop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []DonchianStopOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*DonchianStop) Close

func (ind *DonchianStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DonchianStop) IsReady

func (ind *DonchianStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DonchianStop) Name

func (ind *DonchianStop) Name() string

Name returns the indicator's canonical name.

func (*DonchianStop) Reset

func (ind *DonchianStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DonchianStop) Update

func (ind *DonchianStop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (DonchianStopOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*DonchianStop) WarmupPeriod

func (ind *DonchianStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DonchianStopOutput

type DonchianStopOutput struct {
	StopLong  float64
	StopShort float64
}

DonchianStopOutput is the output of the DonchianStop indicator.

type DoubleBollinger

type DoubleBollinger struct {
	// contains filtered or unexported fields
}

DoubleBollinger wraps the DoubleBollinger indicator over the Wickra C ABI.

func NewDoubleBollinger

func NewDoubleBollinger(period int, kInner float64, kOuter float64) (*DoubleBollinger, error)

NewDoubleBollinger constructs a DoubleBollinger. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DoubleBollinger) Batch

func (ind *DoubleBollinger) Batch(input []float64) []DoubleBollingerOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*DoubleBollinger) Close

func (ind *DoubleBollinger) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DoubleBollinger) IsReady

func (ind *DoubleBollinger) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DoubleBollinger) Name

func (ind *DoubleBollinger) Name() string

Name returns the indicator's canonical name.

func (*DoubleBollinger) Reset

func (ind *DoubleBollinger) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DoubleBollinger) Update

func (ind *DoubleBollinger) Update(value float64) (DoubleBollingerOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*DoubleBollinger) WarmupPeriod

func (ind *DoubleBollinger) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DoubleBollingerOutput

type DoubleBollingerOutput struct {
	UpperOuter float64
	UpperInner float64
	Middle     float64
	LowerInner float64
	LowerOuter float64
}

DoubleBollingerOutput is the output of the DoubleBollinger indicator.

type DoubleTopBottom

type DoubleTopBottom struct {
	// contains filtered or unexported fields
}

DoubleTopBottom wraps the DoubleTopBottom indicator over the Wickra C ABI.

func NewDoubleTopBottom

func NewDoubleTopBottom() (*DoubleTopBottom, error)

NewDoubleTopBottom constructs a DoubleTopBottom. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DoubleTopBottom) Batch

func (ind *DoubleTopBottom) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DoubleTopBottom) BatchInto

func (ind *DoubleTopBottom) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DoubleTopBottom) Close

func (ind *DoubleTopBottom) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DoubleTopBottom) IsReady

func (ind *DoubleTopBottom) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DoubleTopBottom) Name

func (ind *DoubleTopBottom) Name() string

Name returns the indicator's canonical name.

func (*DoubleTopBottom) Reset

func (ind *DoubleTopBottom) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DoubleTopBottom) Update

func (ind *DoubleTopBottom) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DoubleTopBottom) WarmupPeriod

func (ind *DoubleTopBottom) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DownsideGapThreeMethods

type DownsideGapThreeMethods struct {
	// contains filtered or unexported fields
}

DownsideGapThreeMethods wraps the DownsideGapThreeMethods indicator over the Wickra C ABI.

func NewDownsideGapThreeMethods

func NewDownsideGapThreeMethods() (*DownsideGapThreeMethods, error)

NewDownsideGapThreeMethods constructs a DownsideGapThreeMethods. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DownsideGapThreeMethods) Batch

func (ind *DownsideGapThreeMethods) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DownsideGapThreeMethods) BatchInto

func (ind *DownsideGapThreeMethods) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DownsideGapThreeMethods) Close

func (ind *DownsideGapThreeMethods) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DownsideGapThreeMethods) IsReady

func (ind *DownsideGapThreeMethods) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DownsideGapThreeMethods) Name

func (ind *DownsideGapThreeMethods) Name() string

Name returns the indicator's canonical name.

func (*DownsideGapThreeMethods) Reset

func (ind *DownsideGapThreeMethods) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DownsideGapThreeMethods) Update

func (ind *DownsideGapThreeMethods) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DownsideGapThreeMethods) WarmupPeriod

func (ind *DownsideGapThreeMethods) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Dpo

type Dpo struct {
	// contains filtered or unexported fields
}

Dpo wraps the Dpo indicator over the Wickra C ABI.

func NewDpo

func NewDpo(period int) (*Dpo, error)

NewDpo constructs a Dpo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Dpo) Batch

func (ind *Dpo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Dpo) BatchFast

func (ind *Dpo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Dpo) BatchFastInto

func (ind *Dpo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Dpo) BatchInto

func (ind *Dpo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Dpo) Close

func (ind *Dpo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Dpo) IsReady

func (ind *Dpo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Dpo) Name

func (ind *Dpo) Name() string

Name returns the indicator's canonical name.

func (*Dpo) Reset

func (ind *Dpo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Dpo) Update

func (ind *Dpo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Dpo) WarmupPeriod

func (ind *Dpo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DragonflyDoji

type DragonflyDoji struct {
	// contains filtered or unexported fields
}

DragonflyDoji wraps the DragonflyDoji indicator over the Wickra C ABI.

func NewDragonflyDoji

func NewDragonflyDoji() (*DragonflyDoji, error)

NewDragonflyDoji constructs a DragonflyDoji. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DragonflyDoji) Batch

func (ind *DragonflyDoji) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DragonflyDoji) BatchInto

func (ind *DragonflyDoji) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DragonflyDoji) Close

func (ind *DragonflyDoji) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DragonflyDoji) IsReady

func (ind *DragonflyDoji) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DragonflyDoji) Name

func (ind *DragonflyDoji) Name() string

Name returns the indicator's canonical name.

func (*DragonflyDoji) Reset

func (ind *DragonflyDoji) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DragonflyDoji) Update

func (ind *DragonflyDoji) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DragonflyDoji) WarmupPeriod

func (ind *DragonflyDoji) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DrawdownDuration

type DrawdownDuration struct {
	// contains filtered or unexported fields
}

DrawdownDuration wraps the DrawdownDuration indicator over the Wickra C ABI.

func NewDrawdownDuration

func NewDrawdownDuration() (*DrawdownDuration, error)

NewDrawdownDuration constructs a DrawdownDuration. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DrawdownDuration) Batch

func (ind *DrawdownDuration) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DrawdownDuration) BatchInto

func (ind *DrawdownDuration) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DrawdownDuration) Close

func (ind *DrawdownDuration) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DrawdownDuration) IsReady

func (ind *DrawdownDuration) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DrawdownDuration) Name

func (ind *DrawdownDuration) Name() string

Name returns the indicator's canonical name.

func (*DrawdownDuration) Reset

func (ind *DrawdownDuration) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DrawdownDuration) Update

func (ind *DrawdownDuration) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DrawdownDuration) WarmupPeriod

func (ind *DrawdownDuration) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DumplingTop

type DumplingTop struct {
	// contains filtered or unexported fields
}

DumplingTop wraps the DumplingTop indicator over the Wickra C ABI.

func NewDumplingTop

func NewDumplingTop(period int) (*DumplingTop, error)

NewDumplingTop constructs a DumplingTop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DumplingTop) Batch

func (ind *DumplingTop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DumplingTop) BatchInto

func (ind *DumplingTop) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DumplingTop) Close

func (ind *DumplingTop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DumplingTop) IsReady

func (ind *DumplingTop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DumplingTop) Name

func (ind *DumplingTop) Name() string

Name returns the indicator's canonical name.

func (*DumplingTop) Reset

func (ind *DumplingTop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DumplingTop) Update

func (ind *DumplingTop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DumplingTop) WarmupPeriod

func (ind *DumplingTop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Dx

type Dx struct {
	// contains filtered or unexported fields
}

Dx wraps the Dx indicator over the Wickra C ABI.

func NewDx

func NewDx(period int) (*Dx, error)

NewDx constructs a Dx. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Dx) Batch

func (ind *Dx) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Dx) BatchInto

func (ind *Dx) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Dx) Close

func (ind *Dx) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Dx) IsReady

func (ind *Dx) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Dx) Name

func (ind *Dx) Name() string

Name returns the indicator's canonical name.

func (*Dx) Reset

func (ind *Dx) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Dx) Update

func (ind *Dx) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Dx) WarmupPeriod

func (ind *Dx) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type DynamicMomentumIndex

type DynamicMomentumIndex struct {
	// contains filtered or unexported fields
}

DynamicMomentumIndex wraps the DynamicMomentumIndex indicator over the Wickra C ABI.

func NewDynamicMomentumIndex

func NewDynamicMomentumIndex(period int) (*DynamicMomentumIndex, error)

NewDynamicMomentumIndex constructs a DynamicMomentumIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*DynamicMomentumIndex) Batch

func (ind *DynamicMomentumIndex) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*DynamicMomentumIndex) BatchFast

func (ind *DynamicMomentumIndex) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*DynamicMomentumIndex) BatchFastInto

func (ind *DynamicMomentumIndex) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DynamicMomentumIndex) BatchInto

func (ind *DynamicMomentumIndex) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*DynamicMomentumIndex) Close

func (ind *DynamicMomentumIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*DynamicMomentumIndex) IsReady

func (ind *DynamicMomentumIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*DynamicMomentumIndex) Name

func (ind *DynamicMomentumIndex) Name() string

Name returns the indicator's canonical name.

func (*DynamicMomentumIndex) Reset

func (ind *DynamicMomentumIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*DynamicMomentumIndex) Update

func (ind *DynamicMomentumIndex) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*DynamicMomentumIndex) WarmupPeriod

func (ind *DynamicMomentumIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EaseOfMovement

type EaseOfMovement struct {
	// contains filtered or unexported fields
}

EaseOfMovement wraps the EaseOfMovement indicator over the Wickra C ABI.

func NewEaseOfMovement

func NewEaseOfMovement(period int) (*EaseOfMovement, error)

NewEaseOfMovement constructs a EaseOfMovement. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EaseOfMovement) Batch

func (ind *EaseOfMovement) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EaseOfMovement) BatchInto

func (ind *EaseOfMovement) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EaseOfMovement) Close

func (ind *EaseOfMovement) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EaseOfMovement) IsReady

func (ind *EaseOfMovement) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EaseOfMovement) Name

func (ind *EaseOfMovement) Name() string

Name returns the indicator's canonical name.

func (*EaseOfMovement) Reset

func (ind *EaseOfMovement) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EaseOfMovement) Update

func (ind *EaseOfMovement) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EaseOfMovement) WarmupPeriod

func (ind *EaseOfMovement) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EffectiveSpread

type EffectiveSpread struct {
	// contains filtered or unexported fields
}

EffectiveSpread wraps the EffectiveSpread indicator over the Wickra C ABI.

func NewEffectiveSpread

func NewEffectiveSpread() (*EffectiveSpread, error)

NewEffectiveSpread constructs a EffectiveSpread. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EffectiveSpread) Batch

func (ind *EffectiveSpread) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64, mid []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EffectiveSpread) BatchInto

func (ind *EffectiveSpread) BatchInto(dst []float64, price []float64, size []float64, isBuy []bool, timestamp []int64, mid []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EffectiveSpread) Close

func (ind *EffectiveSpread) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EffectiveSpread) IsReady

func (ind *EffectiveSpread) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EffectiveSpread) Name

func (ind *EffectiveSpread) Name() string

Name returns the indicator's canonical name.

func (*EffectiveSpread) Reset

func (ind *EffectiveSpread) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EffectiveSpread) Update

func (ind *EffectiveSpread) Update(price float64, size float64, isBuy bool, timestamp int64, mid float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EffectiveSpread) WarmupPeriod

func (ind *EffectiveSpread) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EhlersStochastic

type EhlersStochastic struct {
	// contains filtered or unexported fields
}

EhlersStochastic wraps the EhlersStochastic indicator over the Wickra C ABI.

func NewEhlersStochastic

func NewEhlersStochastic(period int) (*EhlersStochastic, error)

NewEhlersStochastic constructs a EhlersStochastic. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EhlersStochastic) Batch

func (ind *EhlersStochastic) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EhlersStochastic) BatchFast

func (ind *EhlersStochastic) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*EhlersStochastic) BatchFastInto

func (ind *EhlersStochastic) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EhlersStochastic) BatchInto

func (ind *EhlersStochastic) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EhlersStochastic) Close

func (ind *EhlersStochastic) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EhlersStochastic) IsReady

func (ind *EhlersStochastic) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EhlersStochastic) Name

func (ind *EhlersStochastic) Name() string

Name returns the indicator's canonical name.

func (*EhlersStochastic) Reset

func (ind *EhlersStochastic) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EhlersStochastic) Update

func (ind *EhlersStochastic) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EhlersStochastic) WarmupPeriod

func (ind *EhlersStochastic) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Ehma

type Ehma struct {
	// contains filtered or unexported fields
}

Ehma wraps the Ehma indicator over the Wickra C ABI.

func NewEhma

func NewEhma(period int) (*Ehma, error)

NewEhma constructs a Ehma. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Ehma) Batch

func (ind *Ehma) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Ehma) BatchFast

func (ind *Ehma) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Ehma) BatchFastInto

func (ind *Ehma) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ehma) BatchInto

func (ind *Ehma) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ehma) Close

func (ind *Ehma) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Ehma) IsReady

func (ind *Ehma) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Ehma) Name

func (ind *Ehma) Name() string

Name returns the indicator's canonical name.

func (*Ehma) Reset

func (ind *Ehma) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Ehma) Update

func (ind *Ehma) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Ehma) WarmupPeriod

func (ind *Ehma) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ElderImpulse

type ElderImpulse struct {
	// contains filtered or unexported fields
}

ElderImpulse wraps the ElderImpulse indicator over the Wickra C ABI.

func NewElderImpulse

func NewElderImpulse(emaPeriod int, macdFast int, macdSlow int, macdSignal int) (*ElderImpulse, error)

NewElderImpulse constructs a ElderImpulse. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ElderImpulse) Batch

func (ind *ElderImpulse) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ElderImpulse) BatchFast

func (ind *ElderImpulse) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*ElderImpulse) BatchFastInto

func (ind *ElderImpulse) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ElderImpulse) BatchInto

func (ind *ElderImpulse) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ElderImpulse) Close

func (ind *ElderImpulse) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ElderImpulse) IsReady

func (ind *ElderImpulse) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ElderImpulse) Name

func (ind *ElderImpulse) Name() string

Name returns the indicator's canonical name.

func (*ElderImpulse) Reset

func (ind *ElderImpulse) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ElderImpulse) Update

func (ind *ElderImpulse) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ElderImpulse) WarmupPeriod

func (ind *ElderImpulse) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ElderRay

type ElderRay struct {
	// contains filtered or unexported fields
}

ElderRay wraps the ElderRay indicator over the Wickra C ABI.

func NewElderRay

func NewElderRay(period int) (*ElderRay, error)

NewElderRay constructs a ElderRay. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ElderRay) Batch

func (ind *ElderRay) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ElderRayOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ElderRay) Close

func (ind *ElderRay) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ElderRay) IsReady

func (ind *ElderRay) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ElderRay) Name

func (ind *ElderRay) Name() string

Name returns the indicator's canonical name.

func (*ElderRay) Reset

func (ind *ElderRay) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ElderRay) Update

func (ind *ElderRay) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ElderRayOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ElderRay) WarmupPeriod

func (ind *ElderRay) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ElderRayOutput

type ElderRayOutput struct {
	BullPower float64
	BearPower float64
}

ElderRayOutput is the output of the ElderRay indicator.

type ElderSafeZone

type ElderSafeZone struct {
	// contains filtered or unexported fields
}

ElderSafeZone wraps the ElderSafeZone indicator over the Wickra C ABI.

func NewElderSafeZone

func NewElderSafeZone(period int, coeff float64) (*ElderSafeZone, error)

NewElderSafeZone constructs a ElderSafeZone. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ElderSafeZone) Batch

func (ind *ElderSafeZone) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ElderSafeZoneOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ElderSafeZone) Close

func (ind *ElderSafeZone) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ElderSafeZone) IsReady

func (ind *ElderSafeZone) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ElderSafeZone) Name

func (ind *ElderSafeZone) Name() string

Name returns the indicator's canonical name.

func (*ElderSafeZone) Reset

func (ind *ElderSafeZone) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ElderSafeZone) Update

func (ind *ElderSafeZone) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ElderSafeZoneOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ElderSafeZone) WarmupPeriod

func (ind *ElderSafeZone) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ElderSafeZoneOutput

type ElderSafeZoneOutput struct {
	Value     float64
	Direction float64
}

ElderSafeZoneOutput is the output of the ElderSafeZone indicator.

type Ema

type Ema struct {
	// contains filtered or unexported fields
}

Ema wraps the Ema indicator over the Wickra C ABI.

func NewEma

func NewEma(period int) (*Ema, error)

NewEma constructs a Ema. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Ema) Batch

func (ind *Ema) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Ema) BatchFast

func (ind *Ema) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Ema) BatchFastInto

func (ind *Ema) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ema) BatchInto

func (ind *Ema) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ema) Close

func (ind *Ema) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Ema) IsReady

func (ind *Ema) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Ema) Name

func (ind *Ema) Name() string

Name returns the indicator's canonical name.

func (*Ema) Reset

func (ind *Ema) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Ema) Update

func (ind *Ema) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Ema) WarmupPeriod

func (ind *Ema) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EmpiricalModeDecomposition

type EmpiricalModeDecomposition struct {
	// contains filtered or unexported fields
}

EmpiricalModeDecomposition wraps the EmpiricalModeDecomposition indicator over the Wickra C ABI.

func NewEmpiricalModeDecomposition

func NewEmpiricalModeDecomposition(period int, fraction float64) (*EmpiricalModeDecomposition, error)

NewEmpiricalModeDecomposition constructs a EmpiricalModeDecomposition. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EmpiricalModeDecomposition) Batch

func (ind *EmpiricalModeDecomposition) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EmpiricalModeDecomposition) BatchFast

func (ind *EmpiricalModeDecomposition) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*EmpiricalModeDecomposition) BatchFastInto

func (ind *EmpiricalModeDecomposition) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EmpiricalModeDecomposition) BatchInto

func (ind *EmpiricalModeDecomposition) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EmpiricalModeDecomposition) Close

func (ind *EmpiricalModeDecomposition) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EmpiricalModeDecomposition) IsReady

func (ind *EmpiricalModeDecomposition) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EmpiricalModeDecomposition) Name

func (ind *EmpiricalModeDecomposition) Name() string

Name returns the indicator's canonical name.

func (*EmpiricalModeDecomposition) Reset

func (ind *EmpiricalModeDecomposition) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EmpiricalModeDecomposition) Update

func (ind *EmpiricalModeDecomposition) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EmpiricalModeDecomposition) WarmupPeriod

func (ind *EmpiricalModeDecomposition) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Engulfing

type Engulfing struct {
	// contains filtered or unexported fields
}

Engulfing wraps the Engulfing indicator over the Wickra C ABI.

func NewEngulfing

func NewEngulfing() (*Engulfing, error)

NewEngulfing constructs a Engulfing. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Engulfing) Batch

func (ind *Engulfing) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Engulfing) BatchInto

func (ind *Engulfing) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Engulfing) Close

func (ind *Engulfing) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Engulfing) IsReady

func (ind *Engulfing) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Engulfing) Name

func (ind *Engulfing) Name() string

Name returns the indicator's canonical name.

func (*Engulfing) Reset

func (ind *Engulfing) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Engulfing) Update

func (ind *Engulfing) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Engulfing) WarmupPeriod

func (ind *Engulfing) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Equivolume

type Equivolume struct {
	// contains filtered or unexported fields
}

Equivolume wraps the Equivolume indicator over the Wickra C ABI.

func NewEquivolume

func NewEquivolume(period int) (*Equivolume, error)

NewEquivolume constructs a Equivolume. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Equivolume) Batch

func (ind *Equivolume) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []EquivolumeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Equivolume) Close

func (ind *Equivolume) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Equivolume) IsReady

func (ind *Equivolume) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Equivolume) Name

func (ind *Equivolume) Name() string

Name returns the indicator's canonical name.

func (*Equivolume) Reset

func (ind *Equivolume) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Equivolume) Update

func (ind *Equivolume) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (EquivolumeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Equivolume) WarmupPeriod

func (ind *Equivolume) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EquivolumeOutput

type EquivolumeOutput struct {
	Height float64
	Width  float64
}

EquivolumeOutput is the output of the Equivolume indicator.

type EstimatedLeverageRatio

type EstimatedLeverageRatio struct {
	// contains filtered or unexported fields
}

EstimatedLeverageRatio wraps the EstimatedLeverageRatio indicator over the Wickra C ABI.

func NewEstimatedLeverageRatio

func NewEstimatedLeverageRatio() (*EstimatedLeverageRatio, error)

NewEstimatedLeverageRatio constructs a EstimatedLeverageRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EstimatedLeverageRatio) Batch

func (ind *EstimatedLeverageRatio) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EstimatedLeverageRatio) BatchInto

func (ind *EstimatedLeverageRatio) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EstimatedLeverageRatio) Close

func (ind *EstimatedLeverageRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EstimatedLeverageRatio) IsReady

func (ind *EstimatedLeverageRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EstimatedLeverageRatio) Name

func (ind *EstimatedLeverageRatio) Name() string

Name returns the indicator's canonical name.

func (*EstimatedLeverageRatio) Reset

func (ind *EstimatedLeverageRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EstimatedLeverageRatio) Update

func (ind *EstimatedLeverageRatio) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EstimatedLeverageRatio) WarmupPeriod

func (ind *EstimatedLeverageRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EvenBetterSinewave

type EvenBetterSinewave struct {
	// contains filtered or unexported fields
}

EvenBetterSinewave wraps the EvenBetterSinewave indicator over the Wickra C ABI.

func NewEvenBetterSinewave

func NewEvenBetterSinewave(hpPeriod int, ssfLength int) (*EvenBetterSinewave, error)

NewEvenBetterSinewave constructs a EvenBetterSinewave. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EvenBetterSinewave) Batch

func (ind *EvenBetterSinewave) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EvenBetterSinewave) BatchFast

func (ind *EvenBetterSinewave) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*EvenBetterSinewave) BatchFastInto

func (ind *EvenBetterSinewave) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EvenBetterSinewave) BatchInto

func (ind *EvenBetterSinewave) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EvenBetterSinewave) Close

func (ind *EvenBetterSinewave) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EvenBetterSinewave) IsReady

func (ind *EvenBetterSinewave) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EvenBetterSinewave) Name

func (ind *EvenBetterSinewave) Name() string

Name returns the indicator's canonical name.

func (*EvenBetterSinewave) Reset

func (ind *EvenBetterSinewave) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EvenBetterSinewave) Update

func (ind *EvenBetterSinewave) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EvenBetterSinewave) WarmupPeriod

func (ind *EvenBetterSinewave) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EveningDojiStar

type EveningDojiStar struct {
	// contains filtered or unexported fields
}

EveningDojiStar wraps the EveningDojiStar indicator over the Wickra C ABI.

func NewEveningDojiStar

func NewEveningDojiStar() (*EveningDojiStar, error)

NewEveningDojiStar constructs a EveningDojiStar. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EveningDojiStar) Batch

func (ind *EveningDojiStar) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EveningDojiStar) BatchInto

func (ind *EveningDojiStar) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EveningDojiStar) Close

func (ind *EveningDojiStar) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EveningDojiStar) IsReady

func (ind *EveningDojiStar) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EveningDojiStar) Name

func (ind *EveningDojiStar) Name() string

Name returns the indicator's canonical name.

func (*EveningDojiStar) Reset

func (ind *EveningDojiStar) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EveningDojiStar) Update

func (ind *EveningDojiStar) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EveningDojiStar) WarmupPeriod

func (ind *EveningDojiStar) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Evwma

type Evwma struct {
	// contains filtered or unexported fields
}

Evwma wraps the Evwma indicator over the Wickra C ABI.

func NewEvwma

func NewEvwma(period int) (*Evwma, error)

NewEvwma constructs a Evwma. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Evwma) Batch

func (ind *Evwma) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Evwma) BatchInto

func (ind *Evwma) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Evwma) Close

func (ind *Evwma) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Evwma) IsReady

func (ind *Evwma) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Evwma) Name

func (ind *Evwma) Name() string

Name returns the indicator's canonical name.

func (*Evwma) Reset

func (ind *Evwma) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Evwma) Update

func (ind *Evwma) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Evwma) WarmupPeriod

func (ind *Evwma) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type EwmaVolatility

type EwmaVolatility struct {
	// contains filtered or unexported fields
}

EwmaVolatility wraps the EwmaVolatility indicator over the Wickra C ABI.

func NewEwmaVolatility

func NewEwmaVolatility(lambda float64) (*EwmaVolatility, error)

NewEwmaVolatility constructs a EwmaVolatility. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*EwmaVolatility) Batch

func (ind *EwmaVolatility) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*EwmaVolatility) BatchFast

func (ind *EwmaVolatility) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*EwmaVolatility) BatchFastInto

func (ind *EwmaVolatility) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EwmaVolatility) BatchInto

func (ind *EwmaVolatility) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*EwmaVolatility) Close

func (ind *EwmaVolatility) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*EwmaVolatility) IsReady

func (ind *EwmaVolatility) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*EwmaVolatility) Name

func (ind *EwmaVolatility) Name() string

Name returns the indicator's canonical name.

func (*EwmaVolatility) Reset

func (ind *EwmaVolatility) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*EwmaVolatility) Update

func (ind *EwmaVolatility) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*EwmaVolatility) WarmupPeriod

func (ind *EwmaVolatility) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Expectancy

type Expectancy struct {
	// contains filtered or unexported fields
}

Expectancy wraps the Expectancy indicator over the Wickra C ABI.

func NewExpectancy

func NewExpectancy(period int) (*Expectancy, error)

NewExpectancy constructs a Expectancy. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Expectancy) Batch

func (ind *Expectancy) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Expectancy) BatchFast

func (ind *Expectancy) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Expectancy) BatchFastInto

func (ind *Expectancy) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Expectancy) BatchInto

func (ind *Expectancy) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Expectancy) Close

func (ind *Expectancy) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Expectancy) IsReady

func (ind *Expectancy) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Expectancy) Name

func (ind *Expectancy) Name() string

Name returns the indicator's canonical name.

func (*Expectancy) Reset

func (ind *Expectancy) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Expectancy) Update

func (ind *Expectancy) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Expectancy) WarmupPeriod

func (ind *Expectancy) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FallingThreeMethods

type FallingThreeMethods struct {
	// contains filtered or unexported fields
}

FallingThreeMethods wraps the FallingThreeMethods indicator over the Wickra C ABI.

func NewFallingThreeMethods

func NewFallingThreeMethods() (*FallingThreeMethods, error)

NewFallingThreeMethods constructs a FallingThreeMethods. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FallingThreeMethods) Batch

func (ind *FallingThreeMethods) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FallingThreeMethods) BatchInto

func (ind *FallingThreeMethods) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FallingThreeMethods) Close

func (ind *FallingThreeMethods) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FallingThreeMethods) IsReady

func (ind *FallingThreeMethods) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FallingThreeMethods) Name

func (ind *FallingThreeMethods) Name() string

Name returns the indicator's canonical name.

func (*FallingThreeMethods) Reset

func (ind *FallingThreeMethods) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FallingThreeMethods) Update

func (ind *FallingThreeMethods) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FallingThreeMethods) WarmupPeriod

func (ind *FallingThreeMethods) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Fama

type Fama struct {
	// contains filtered or unexported fields
}

Fama wraps the Fama indicator over the Wickra C ABI.

func NewFama

func NewFama(fastLimit float64, slowLimit float64) (*Fama, error)

NewFama constructs a Fama. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Fama) Batch

func (ind *Fama) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Fama) BatchFast

func (ind *Fama) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Fama) BatchFastInto

func (ind *Fama) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Fama) BatchInto

func (ind *Fama) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Fama) Close

func (ind *Fama) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Fama) IsReady

func (ind *Fama) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Fama) Name

func (ind *Fama) Name() string

Name returns the indicator's canonical name.

func (*Fama) Reset

func (ind *Fama) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Fama) Update

func (ind *Fama) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Fama) WarmupPeriod

func (ind *Fama) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibArcs

type FibArcs struct {
	// contains filtered or unexported fields
}

FibArcs wraps the FibArcs indicator over the Wickra C ABI.

func NewFibArcs

func NewFibArcs() (*FibArcs, error)

NewFibArcs constructs a FibArcs. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibArcs) Batch

func (ind *FibArcs) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibArcsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibArcs) Close

func (ind *FibArcs) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibArcs) IsReady

func (ind *FibArcs) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibArcs) Name

func (ind *FibArcs) Name() string

Name returns the indicator's canonical name.

func (*FibArcs) Reset

func (ind *FibArcs) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibArcs) Update

func (ind *FibArcs) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibArcsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibArcs) WarmupPeriod

func (ind *FibArcs) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibArcsOutput

type FibArcsOutput struct {
	Arc382 float64
	Arc500 float64
	Arc618 float64
}

FibArcsOutput is the output of the FibArcs indicator.

type FibChannel

type FibChannel struct {
	// contains filtered or unexported fields
}

FibChannel wraps the FibChannel indicator over the Wickra C ABI.

func NewFibChannel

func NewFibChannel() (*FibChannel, error)

NewFibChannel constructs a FibChannel. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibChannel) Batch

func (ind *FibChannel) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibChannelOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibChannel) Close

func (ind *FibChannel) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibChannel) IsReady

func (ind *FibChannel) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibChannel) Name

func (ind *FibChannel) Name() string

Name returns the indicator's canonical name.

func (*FibChannel) Reset

func (ind *FibChannel) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibChannel) Update

func (ind *FibChannel) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibChannelOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibChannel) WarmupPeriod

func (ind *FibChannel) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibChannelOutput

type FibChannelOutput struct {
	Base      float64
	Level618  float64
	Level1000 float64
	Level1618 float64
}

FibChannelOutput is the output of the FibChannel indicator.

type FibConfluence

type FibConfluence struct {
	// contains filtered or unexported fields
}

FibConfluence wraps the FibConfluence indicator over the Wickra C ABI.

func NewFibConfluence

func NewFibConfluence() (*FibConfluence, error)

NewFibConfluence constructs a FibConfluence. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibConfluence) Batch

func (ind *FibConfluence) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibConfluenceOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibConfluence) Close

func (ind *FibConfluence) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibConfluence) IsReady

func (ind *FibConfluence) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibConfluence) Name

func (ind *FibConfluence) Name() string

Name returns the indicator's canonical name.

func (*FibConfluence) Reset

func (ind *FibConfluence) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibConfluence) Update

func (ind *FibConfluence) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibConfluenceOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibConfluence) WarmupPeriod

func (ind *FibConfluence) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibConfluenceOutput

type FibConfluenceOutput struct {
	Price    float64
	Strength float64
}

FibConfluenceOutput is the output of the FibConfluence indicator.

type FibExtension

type FibExtension struct {
	// contains filtered or unexported fields
}

FibExtension wraps the FibExtension indicator over the Wickra C ABI.

func NewFibExtension

func NewFibExtension() (*FibExtension, error)

NewFibExtension constructs a FibExtension. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibExtension) Batch

func (ind *FibExtension) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibExtensionOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibExtension) Close

func (ind *FibExtension) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibExtension) IsReady

func (ind *FibExtension) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibExtension) Name

func (ind *FibExtension) Name() string

Name returns the indicator's canonical name.

func (*FibExtension) Reset

func (ind *FibExtension) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibExtension) Update

func (ind *FibExtension) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibExtensionOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibExtension) WarmupPeriod

func (ind *FibExtension) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibExtensionOutput

type FibExtensionOutput struct {
	Level1272 float64
	Level1414 float64
	Level1618 float64
	Level2000 float64
	Level2618 float64
}

FibExtensionOutput is the output of the FibExtension indicator.

type FibFan

type FibFan struct {
	// contains filtered or unexported fields
}

FibFan wraps the FibFan indicator over the Wickra C ABI.

func NewFibFan

func NewFibFan() (*FibFan, error)

NewFibFan constructs a FibFan. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibFan) Batch

func (ind *FibFan) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibFanOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibFan) Close

func (ind *FibFan) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibFan) IsReady

func (ind *FibFan) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibFan) Name

func (ind *FibFan) Name() string

Name returns the indicator's canonical name.

func (*FibFan) Reset

func (ind *FibFan) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibFan) Update

func (ind *FibFan) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibFanOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibFan) WarmupPeriod

func (ind *FibFan) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibFanOutput

type FibFanOutput struct {
	Fan382 float64
	Fan500 float64
	Fan618 float64
}

FibFanOutput is the output of the FibFan indicator.

type FibProjection

type FibProjection struct {
	// contains filtered or unexported fields
}

FibProjection wraps the FibProjection indicator over the Wickra C ABI.

func NewFibProjection

func NewFibProjection() (*FibProjection, error)

NewFibProjection constructs a FibProjection. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibProjection) Batch

func (ind *FibProjection) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibProjectionOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibProjection) Close

func (ind *FibProjection) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibProjection) IsReady

func (ind *FibProjection) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibProjection) Name

func (ind *FibProjection) Name() string

Name returns the indicator's canonical name.

func (*FibProjection) Reset

func (ind *FibProjection) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibProjection) Update

func (ind *FibProjection) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibProjectionOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibProjection) WarmupPeriod

func (ind *FibProjection) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibProjectionOutput

type FibProjectionOutput struct {
	Level618  float64
	Level1000 float64
	Level1618 float64
	Level2618 float64
}

FibProjectionOutput is the output of the FibProjection indicator.

type FibRetracement

type FibRetracement struct {
	// contains filtered or unexported fields
}

FibRetracement wraps the FibRetracement indicator over the Wickra C ABI.

func NewFibRetracement

func NewFibRetracement() (*FibRetracement, error)

NewFibRetracement constructs a FibRetracement. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibRetracement) Batch

func (ind *FibRetracement) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibRetracementOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibRetracement) Close

func (ind *FibRetracement) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibRetracement) IsReady

func (ind *FibRetracement) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibRetracement) Name

func (ind *FibRetracement) Name() string

Name returns the indicator's canonical name.

func (*FibRetracement) Reset

func (ind *FibRetracement) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibRetracement) Update

func (ind *FibRetracement) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibRetracementOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibRetracement) WarmupPeriod

func (ind *FibRetracement) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibRetracementOutput

type FibRetracementOutput struct {
	Level0    float64
	Level236  float64
	Level382  float64
	Level500  float64
	Level618  float64
	Level786  float64
	Level1000 float64
}

FibRetracementOutput is the output of the FibRetracement indicator.

type FibTimeZones

type FibTimeZones struct {
	// contains filtered or unexported fields
}

FibTimeZones wraps the FibTimeZones indicator over the Wickra C ABI.

func NewFibTimeZones

func NewFibTimeZones() (*FibTimeZones, error)

NewFibTimeZones constructs a FibTimeZones. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibTimeZones) Batch

func (ind *FibTimeZones) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibTimeZonesOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibTimeZones) Close

func (ind *FibTimeZones) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibTimeZones) IsReady

func (ind *FibTimeZones) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibTimeZones) Name

func (ind *FibTimeZones) Name() string

Name returns the indicator's canonical name.

func (*FibTimeZones) Reset

func (ind *FibTimeZones) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibTimeZones) Update

func (ind *FibTimeZones) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibTimeZonesOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibTimeZones) WarmupPeriod

func (ind *FibTimeZones) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibTimeZonesOutput

type FibTimeZonesOutput struct {
	OnZone     float64
	BarsToNext float64
}

FibTimeZonesOutput is the output of the FibTimeZones indicator.

type FibonacciPivots

type FibonacciPivots struct {
	// contains filtered or unexported fields
}

FibonacciPivots wraps the FibonacciPivots indicator over the Wickra C ABI.

func NewFibonacciPivots

func NewFibonacciPivots() (*FibonacciPivots, error)

NewFibonacciPivots constructs a FibonacciPivots. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FibonacciPivots) Batch

func (ind *FibonacciPivots) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FibonacciPivotsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FibonacciPivots) Close

func (ind *FibonacciPivots) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FibonacciPivots) IsReady

func (ind *FibonacciPivots) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FibonacciPivots) Name

func (ind *FibonacciPivots) Name() string

Name returns the indicator's canonical name.

func (*FibonacciPivots) Reset

func (ind *FibonacciPivots) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FibonacciPivots) Update

func (ind *FibonacciPivots) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FibonacciPivotsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FibonacciPivots) WarmupPeriod

func (ind *FibonacciPivots) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FibonacciPivotsOutput

type FibonacciPivotsOutput struct {
	Pp float64
	R1 float64
	R2 float64
	R3 float64
	S1 float64
	S2 float64
	S3 float64
}

FibonacciPivotsOutput is the output of the FibonacciPivots indicator.

type FisherRsi

type FisherRsi struct {
	// contains filtered or unexported fields
}

FisherRsi wraps the FisherRsi indicator over the Wickra C ABI.

func NewFisherRsi

func NewFisherRsi(period int) (*FisherRsi, error)

NewFisherRsi constructs a FisherRsi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FisherRsi) Batch

func (ind *FisherRsi) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FisherRsi) BatchFast

func (ind *FisherRsi) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*FisherRsi) BatchFastInto

func (ind *FisherRsi) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FisherRsi) BatchInto

func (ind *FisherRsi) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FisherRsi) Close

func (ind *FisherRsi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FisherRsi) IsReady

func (ind *FisherRsi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FisherRsi) Name

func (ind *FisherRsi) Name() string

Name returns the indicator's canonical name.

func (*FisherRsi) Reset

func (ind *FisherRsi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FisherRsi) Update

func (ind *FisherRsi) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FisherRsi) WarmupPeriod

func (ind *FisherRsi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FisherTransform

type FisherTransform struct {
	// contains filtered or unexported fields
}

FisherTransform wraps the FisherTransform indicator over the Wickra C ABI.

func NewFisherTransform

func NewFisherTransform(period int) (*FisherTransform, error)

NewFisherTransform constructs a FisherTransform. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FisherTransform) Batch

func (ind *FisherTransform) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FisherTransform) BatchFast

func (ind *FisherTransform) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*FisherTransform) BatchFastInto

func (ind *FisherTransform) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FisherTransform) BatchInto

func (ind *FisherTransform) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FisherTransform) Close

func (ind *FisherTransform) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FisherTransform) IsReady

func (ind *FisherTransform) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FisherTransform) Name

func (ind *FisherTransform) Name() string

Name returns the indicator's canonical name.

func (*FisherTransform) Reset

func (ind *FisherTransform) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FisherTransform) Update

func (ind *FisherTransform) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FisherTransform) WarmupPeriod

func (ind *FisherTransform) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FlagPennant

type FlagPennant struct {
	// contains filtered or unexported fields
}

FlagPennant wraps the FlagPennant indicator over the Wickra C ABI.

func NewFlagPennant

func NewFlagPennant() (*FlagPennant, error)

NewFlagPennant constructs a FlagPennant. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FlagPennant) Batch

func (ind *FlagPennant) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FlagPennant) BatchInto

func (ind *FlagPennant) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FlagPennant) Close

func (ind *FlagPennant) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FlagPennant) IsReady

func (ind *FlagPennant) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FlagPennant) Name

func (ind *FlagPennant) Name() string

Name returns the indicator's canonical name.

func (*FlagPennant) Reset

func (ind *FlagPennant) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FlagPennant) Update

func (ind *FlagPennant) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FlagPennant) WarmupPeriod

func (ind *FlagPennant) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Footprint

type Footprint struct {
	// contains filtered or unexported fields
}

Footprint wraps the Footprint indicator over the Wickra C ABI.

func NewFootprint

func NewFootprint(tickSize float64) (*Footprint, error)

NewFootprint constructs a Footprint. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Footprint) Batch

func (ind *Footprint) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64) []FootprintLevel

Batch feeds a whole series in one FFI call and returns every bar it completed. The count depends on the data, not on the input length.

func (*Footprint) Close

func (ind *Footprint) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Footprint) IsReady

func (ind *Footprint) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Footprint) Name

func (ind *Footprint) Name() string

Name returns the indicator's canonical name.

func (*Footprint) Reset

func (ind *Footprint) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Footprint) Update

func (ind *Footprint) Update(price float64, size float64, isBuy bool, timestamp int64) []FootprintLevel

Update feeds one candle and returns any bars completed by it (a single candle may complete several).

func (*Footprint) WarmupPeriod

func (ind *Footprint) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FootprintLevel

type FootprintLevel struct {
	Price  float64
	BidVol float64
	AskVol float64
}

FootprintLevel is the output of the FootprintLevel indicator.

type ForceIndex

type ForceIndex struct {
	// contains filtered or unexported fields
}

ForceIndex wraps the ForceIndex indicator over the Wickra C ABI.

func NewForceIndex

func NewForceIndex(period int) (*ForceIndex, error)

NewForceIndex constructs a ForceIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ForceIndex) Batch

func (ind *ForceIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ForceIndex) BatchInto

func (ind *ForceIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ForceIndex) Close

func (ind *ForceIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ForceIndex) IsReady

func (ind *ForceIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ForceIndex) Name

func (ind *ForceIndex) Name() string

Name returns the indicator's canonical name.

func (*ForceIndex) Reset

func (ind *ForceIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ForceIndex) Update

func (ind *ForceIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ForceIndex) WarmupPeriod

func (ind *ForceIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FractalChaosBands

type FractalChaosBands struct {
	// contains filtered or unexported fields
}

FractalChaosBands wraps the FractalChaosBands indicator over the Wickra C ABI.

func NewFractalChaosBands

func NewFractalChaosBands(k int) (*FractalChaosBands, error)

NewFractalChaosBands constructs a FractalChaosBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FractalChaosBands) Batch

func (ind *FractalChaosBands) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []FractalChaosBandsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*FractalChaosBands) Close

func (ind *FractalChaosBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FractalChaosBands) IsReady

func (ind *FractalChaosBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FractalChaosBands) Name

func (ind *FractalChaosBands) Name() string

Name returns the indicator's canonical name.

func (*FractalChaosBands) Reset

func (ind *FractalChaosBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FractalChaosBands) Update

func (ind *FractalChaosBands) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (FractalChaosBandsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*FractalChaosBands) WarmupPeriod

func (ind *FractalChaosBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FractalChaosBandsOutput

type FractalChaosBandsOutput struct {
	Upper float64
	Lower float64
}

FractalChaosBandsOutput is the output of the FractalChaosBands indicator.

type Frama

type Frama struct {
	// contains filtered or unexported fields
}

Frama wraps the Frama indicator over the Wickra C ABI.

func NewFrama

func NewFrama(period int) (*Frama, error)

NewFrama constructs a Frama. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Frama) Batch

func (ind *Frama) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Frama) BatchFast

func (ind *Frama) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Frama) BatchFastInto

func (ind *Frama) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Frama) BatchInto

func (ind *Frama) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Frama) Close

func (ind *Frama) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Frama) IsReady

func (ind *Frama) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Frama) Name

func (ind *Frama) Name() string

Name returns the indicator's canonical name.

func (*Frama) Reset

func (ind *Frama) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Frama) Update

func (ind *Frama) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Frama) WarmupPeriod

func (ind *Frama) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FryPanBottom

type FryPanBottom struct {
	// contains filtered or unexported fields
}

FryPanBottom wraps the FryPanBottom indicator over the Wickra C ABI.

func NewFryPanBottom

func NewFryPanBottom(period int) (*FryPanBottom, error)

NewFryPanBottom constructs a FryPanBottom. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FryPanBottom) Batch

func (ind *FryPanBottom) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FryPanBottom) BatchInto

func (ind *FryPanBottom) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FryPanBottom) Close

func (ind *FryPanBottom) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FryPanBottom) IsReady

func (ind *FryPanBottom) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FryPanBottom) Name

func (ind *FryPanBottom) Name() string

Name returns the indicator's canonical name.

func (*FryPanBottom) Reset

func (ind *FryPanBottom) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FryPanBottom) Update

func (ind *FryPanBottom) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FryPanBottom) WarmupPeriod

func (ind *FryPanBottom) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FundingBasis

type FundingBasis struct {
	// contains filtered or unexported fields
}

FundingBasis wraps the FundingBasis indicator over the Wickra C ABI.

func NewFundingBasis

func NewFundingBasis() (*FundingBasis, error)

NewFundingBasis constructs a FundingBasis. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FundingBasis) Batch

func (ind *FundingBasis) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FundingBasis) BatchInto

func (ind *FundingBasis) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FundingBasis) Close

func (ind *FundingBasis) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FundingBasis) IsReady

func (ind *FundingBasis) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FundingBasis) Name

func (ind *FundingBasis) Name() string

Name returns the indicator's canonical name.

func (*FundingBasis) Reset

func (ind *FundingBasis) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FundingBasis) Update

func (ind *FundingBasis) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FundingBasis) WarmupPeriod

func (ind *FundingBasis) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FundingImpliedApr

type FundingImpliedApr struct {
	// contains filtered or unexported fields
}

FundingImpliedApr wraps the FundingImpliedApr indicator over the Wickra C ABI.

func NewFundingImpliedApr

func NewFundingImpliedApr(intervalsPerYear float64) (*FundingImpliedApr, error)

NewFundingImpliedApr constructs a FundingImpliedApr. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FundingImpliedApr) Batch

func (ind *FundingImpliedApr) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FundingImpliedApr) BatchInto

func (ind *FundingImpliedApr) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FundingImpliedApr) Close

func (ind *FundingImpliedApr) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FundingImpliedApr) IsReady

func (ind *FundingImpliedApr) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FundingImpliedApr) Name

func (ind *FundingImpliedApr) Name() string

Name returns the indicator's canonical name.

func (*FundingImpliedApr) Reset

func (ind *FundingImpliedApr) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FundingImpliedApr) Update

func (ind *FundingImpliedApr) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FundingImpliedApr) WarmupPeriod

func (ind *FundingImpliedApr) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FundingRate

type FundingRate struct {
	// contains filtered or unexported fields
}

FundingRate wraps the FundingRate indicator over the Wickra C ABI.

func NewFundingRate

func NewFundingRate() (*FundingRate, error)

NewFundingRate constructs a FundingRate. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FundingRate) Batch

func (ind *FundingRate) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FundingRate) BatchInto

func (ind *FundingRate) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FundingRate) Close

func (ind *FundingRate) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FundingRate) IsReady

func (ind *FundingRate) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FundingRate) Name

func (ind *FundingRate) Name() string

Name returns the indicator's canonical name.

func (*FundingRate) Reset

func (ind *FundingRate) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FundingRate) Update

func (ind *FundingRate) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FundingRate) WarmupPeriod

func (ind *FundingRate) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FundingRateMean

type FundingRateMean struct {
	// contains filtered or unexported fields
}

FundingRateMean wraps the FundingRateMean indicator over the Wickra C ABI.

func NewFundingRateMean

func NewFundingRateMean(window int) (*FundingRateMean, error)

NewFundingRateMean constructs a FundingRateMean. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FundingRateMean) Batch

func (ind *FundingRateMean) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FundingRateMean) BatchInto

func (ind *FundingRateMean) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FundingRateMean) Close

func (ind *FundingRateMean) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FundingRateMean) IsReady

func (ind *FundingRateMean) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FundingRateMean) Name

func (ind *FundingRateMean) Name() string

Name returns the indicator's canonical name.

func (*FundingRateMean) Reset

func (ind *FundingRateMean) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FundingRateMean) Update

func (ind *FundingRateMean) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FundingRateMean) WarmupPeriod

func (ind *FundingRateMean) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type FundingRateZScore

type FundingRateZScore struct {
	// contains filtered or unexported fields
}

FundingRateZScore wraps the FundingRateZScore indicator over the Wickra C ABI.

func NewFundingRateZScore

func NewFundingRateZScore(window int) (*FundingRateZScore, error)

NewFundingRateZScore constructs a FundingRateZScore. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*FundingRateZScore) Batch

func (ind *FundingRateZScore) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*FundingRateZScore) BatchInto

func (ind *FundingRateZScore) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*FundingRateZScore) Close

func (ind *FundingRateZScore) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*FundingRateZScore) IsReady

func (ind *FundingRateZScore) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*FundingRateZScore) Name

func (ind *FundingRateZScore) Name() string

Name returns the indicator's canonical name.

func (*FundingRateZScore) Reset

func (ind *FundingRateZScore) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*FundingRateZScore) Update

func (ind *FundingRateZScore) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*FundingRateZScore) WarmupPeriod

func (ind *FundingRateZScore) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GainLossRatio

type GainLossRatio struct {
	// contains filtered or unexported fields
}

GainLossRatio wraps the GainLossRatio indicator over the Wickra C ABI.

func NewGainLossRatio

func NewGainLossRatio(period int) (*GainLossRatio, error)

NewGainLossRatio constructs a GainLossRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GainLossRatio) Batch

func (ind *GainLossRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GainLossRatio) BatchFast

func (ind *GainLossRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*GainLossRatio) BatchFastInto

func (ind *GainLossRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GainLossRatio) BatchInto

func (ind *GainLossRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GainLossRatio) Close

func (ind *GainLossRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GainLossRatio) IsReady

func (ind *GainLossRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GainLossRatio) Name

func (ind *GainLossRatio) Name() string

Name returns the indicator's canonical name.

func (*GainLossRatio) Reset

func (ind *GainLossRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GainLossRatio) Update

func (ind *GainLossRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GainLossRatio) WarmupPeriod

func (ind *GainLossRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GainToPainRatio

type GainToPainRatio struct {
	// contains filtered or unexported fields
}

GainToPainRatio wraps the GainToPainRatio indicator over the Wickra C ABI.

func NewGainToPainRatio

func NewGainToPainRatio(period int) (*GainToPainRatio, error)

NewGainToPainRatio constructs a GainToPainRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GainToPainRatio) Batch

func (ind *GainToPainRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GainToPainRatio) BatchFast

func (ind *GainToPainRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*GainToPainRatio) BatchFastInto

func (ind *GainToPainRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GainToPainRatio) BatchInto

func (ind *GainToPainRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GainToPainRatio) Close

func (ind *GainToPainRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GainToPainRatio) IsReady

func (ind *GainToPainRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GainToPainRatio) Name

func (ind *GainToPainRatio) Name() string

Name returns the indicator's canonical name.

func (*GainToPainRatio) Reset

func (ind *GainToPainRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GainToPainRatio) Update

func (ind *GainToPainRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GainToPainRatio) WarmupPeriod

func (ind *GainToPainRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GapSideBySideWhite

type GapSideBySideWhite struct {
	// contains filtered or unexported fields
}

GapSideBySideWhite wraps the GapSideBySideWhite indicator over the Wickra C ABI.

func NewGapSideBySideWhite

func NewGapSideBySideWhite() (*GapSideBySideWhite, error)

NewGapSideBySideWhite constructs a GapSideBySideWhite. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GapSideBySideWhite) Batch

func (ind *GapSideBySideWhite) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GapSideBySideWhite) BatchInto

func (ind *GapSideBySideWhite) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GapSideBySideWhite) Close

func (ind *GapSideBySideWhite) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GapSideBySideWhite) IsReady

func (ind *GapSideBySideWhite) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GapSideBySideWhite) Name

func (ind *GapSideBySideWhite) Name() string

Name returns the indicator's canonical name.

func (*GapSideBySideWhite) Reset

func (ind *GapSideBySideWhite) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GapSideBySideWhite) Update

func (ind *GapSideBySideWhite) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GapSideBySideWhite) WarmupPeriod

func (ind *GapSideBySideWhite) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Garch11

type Garch11 struct {
	// contains filtered or unexported fields
}

Garch11 wraps the Garch11 indicator over the Wickra C ABI.

func NewGarch11

func NewGarch11(omega float64, alpha float64, beta float64) (*Garch11, error)

NewGarch11 constructs a Garch11. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Garch11) Batch

func (ind *Garch11) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Garch11) BatchFast

func (ind *Garch11) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Garch11) BatchFastInto

func (ind *Garch11) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Garch11) BatchInto

func (ind *Garch11) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Garch11) Close

func (ind *Garch11) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Garch11) IsReady

func (ind *Garch11) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Garch11) Name

func (ind *Garch11) Name() string

Name returns the indicator's canonical name.

func (*Garch11) Reset

func (ind *Garch11) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Garch11) Update

func (ind *Garch11) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Garch11) WarmupPeriod

func (ind *Garch11) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GarmanKlassVolatility

type GarmanKlassVolatility struct {
	// contains filtered or unexported fields
}

GarmanKlassVolatility wraps the GarmanKlassVolatility indicator over the Wickra C ABI.

func NewGarmanKlassVolatility

func NewGarmanKlassVolatility(period int, tradingPeriods int) (*GarmanKlassVolatility, error)

NewGarmanKlassVolatility constructs a GarmanKlassVolatility. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GarmanKlassVolatility) Batch

func (ind *GarmanKlassVolatility) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GarmanKlassVolatility) BatchInto

func (ind *GarmanKlassVolatility) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GarmanKlassVolatility) Close

func (ind *GarmanKlassVolatility) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GarmanKlassVolatility) IsReady

func (ind *GarmanKlassVolatility) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GarmanKlassVolatility) Name

func (ind *GarmanKlassVolatility) Name() string

Name returns the indicator's canonical name.

func (*GarmanKlassVolatility) Reset

func (ind *GarmanKlassVolatility) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GarmanKlassVolatility) Update

func (ind *GarmanKlassVolatility) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GarmanKlassVolatility) WarmupPeriod

func (ind *GarmanKlassVolatility) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Gartley

type Gartley struct {
	// contains filtered or unexported fields
}

Gartley wraps the Gartley indicator over the Wickra C ABI.

func NewGartley

func NewGartley() (*Gartley, error)

NewGartley constructs a Gartley. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Gartley) Batch

func (ind *Gartley) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Gartley) BatchInto

func (ind *Gartley) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Gartley) Close

func (ind *Gartley) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Gartley) IsReady

func (ind *Gartley) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Gartley) Name

func (ind *Gartley) Name() string

Name returns the indicator's canonical name.

func (*Gartley) Reset

func (ind *Gartley) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Gartley) Update

func (ind *Gartley) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Gartley) WarmupPeriod

func (ind *Gartley) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GatorOscillator

type GatorOscillator struct {
	// contains filtered or unexported fields
}

GatorOscillator wraps the GatorOscillator indicator over the Wickra C ABI.

func NewGatorOscillator

func NewGatorOscillator(jawPeriod int, teethPeriod int, lipsPeriod int) (*GatorOscillator, error)

NewGatorOscillator constructs a GatorOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GatorOscillator) Batch

func (ind *GatorOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []GatorOscillatorOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*GatorOscillator) Close

func (ind *GatorOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GatorOscillator) IsReady

func (ind *GatorOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GatorOscillator) Name

func (ind *GatorOscillator) Name() string

Name returns the indicator's canonical name.

func (*GatorOscillator) Reset

func (ind *GatorOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GatorOscillator) Update

func (ind *GatorOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (GatorOscillatorOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*GatorOscillator) WarmupPeriod

func (ind *GatorOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GatorOscillatorOutput

type GatorOscillatorOutput struct {
	Upper float64
	Lower float64
}

GatorOscillatorOutput is the output of the GatorOscillator indicator.

type GeneralizedDema

type GeneralizedDema struct {
	// contains filtered or unexported fields
}

GeneralizedDema wraps the GeneralizedDema indicator over the Wickra C ABI.

func NewGeneralizedDema

func NewGeneralizedDema(period int, v float64) (*GeneralizedDema, error)

NewGeneralizedDema constructs a GeneralizedDema. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GeneralizedDema) Batch

func (ind *GeneralizedDema) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GeneralizedDema) BatchFast

func (ind *GeneralizedDema) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*GeneralizedDema) BatchFastInto

func (ind *GeneralizedDema) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GeneralizedDema) BatchInto

func (ind *GeneralizedDema) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GeneralizedDema) Close

func (ind *GeneralizedDema) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GeneralizedDema) IsReady

func (ind *GeneralizedDema) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GeneralizedDema) Name

func (ind *GeneralizedDema) Name() string

Name returns the indicator's canonical name.

func (*GeneralizedDema) Reset

func (ind *GeneralizedDema) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GeneralizedDema) Update

func (ind *GeneralizedDema) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GeneralizedDema) WarmupPeriod

func (ind *GeneralizedDema) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GeometricMa

type GeometricMa struct {
	// contains filtered or unexported fields
}

GeometricMa wraps the GeometricMa indicator over the Wickra C ABI.

func NewGeometricMa

func NewGeometricMa(period int) (*GeometricMa, error)

NewGeometricMa constructs a GeometricMa. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GeometricMa) Batch

func (ind *GeometricMa) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GeometricMa) BatchFast

func (ind *GeometricMa) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*GeometricMa) BatchFastInto

func (ind *GeometricMa) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GeometricMa) BatchInto

func (ind *GeometricMa) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GeometricMa) Close

func (ind *GeometricMa) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GeometricMa) IsReady

func (ind *GeometricMa) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GeometricMa) Name

func (ind *GeometricMa) Name() string

Name returns the indicator's canonical name.

func (*GeometricMa) Reset

func (ind *GeometricMa) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GeometricMa) Update

func (ind *GeometricMa) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GeometricMa) WarmupPeriod

func (ind *GeometricMa) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GoldenPocket

type GoldenPocket struct {
	// contains filtered or unexported fields
}

GoldenPocket wraps the GoldenPocket indicator over the Wickra C ABI.

func NewGoldenPocket

func NewGoldenPocket() (*GoldenPocket, error)

NewGoldenPocket constructs a GoldenPocket. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GoldenPocket) Batch

func (ind *GoldenPocket) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []GoldenPocketOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*GoldenPocket) Close

func (ind *GoldenPocket) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GoldenPocket) IsReady

func (ind *GoldenPocket) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GoldenPocket) Name

func (ind *GoldenPocket) Name() string

Name returns the indicator's canonical name.

func (*GoldenPocket) Reset

func (ind *GoldenPocket) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GoldenPocket) Update

func (ind *GoldenPocket) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (GoldenPocketOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*GoldenPocket) WarmupPeriod

func (ind *GoldenPocket) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GoldenPocketOutput

type GoldenPocketOutput struct {
	Low  float64
	Mid  float64
	High float64
}

GoldenPocketOutput is the output of the GoldenPocket indicator.

type GrangerCausality

type GrangerCausality struct {
	// contains filtered or unexported fields
}

GrangerCausality wraps the GrangerCausality indicator over the Wickra C ABI.

func NewGrangerCausality

func NewGrangerCausality(period int, lag int) (*GrangerCausality, error)

NewGrangerCausality constructs a GrangerCausality. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GrangerCausality) Batch

func (ind *GrangerCausality) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GrangerCausality) BatchInto

func (ind *GrangerCausality) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GrangerCausality) Close

func (ind *GrangerCausality) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GrangerCausality) IsReady

func (ind *GrangerCausality) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GrangerCausality) Name

func (ind *GrangerCausality) Name() string

Name returns the indicator's canonical name.

func (*GrangerCausality) Reset

func (ind *GrangerCausality) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GrangerCausality) Update

func (ind *GrangerCausality) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GrangerCausality) WarmupPeriod

func (ind *GrangerCausality) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type GravestoneDoji

type GravestoneDoji struct {
	// contains filtered or unexported fields
}

GravestoneDoji wraps the GravestoneDoji indicator over the Wickra C ABI.

func NewGravestoneDoji

func NewGravestoneDoji() (*GravestoneDoji, error)

NewGravestoneDoji constructs a GravestoneDoji. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*GravestoneDoji) Batch

func (ind *GravestoneDoji) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*GravestoneDoji) BatchInto

func (ind *GravestoneDoji) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*GravestoneDoji) Close

func (ind *GravestoneDoji) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*GravestoneDoji) IsReady

func (ind *GravestoneDoji) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*GravestoneDoji) Name

func (ind *GravestoneDoji) Name() string

Name returns the indicator's canonical name.

func (*GravestoneDoji) Reset

func (ind *GravestoneDoji) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*GravestoneDoji) Update

func (ind *GravestoneDoji) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*GravestoneDoji) WarmupPeriod

func (ind *GravestoneDoji) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Hammer

type Hammer struct {
	// contains filtered or unexported fields
}

Hammer wraps the Hammer indicator over the Wickra C ABI.

func NewHammer

func NewHammer() (*Hammer, error)

NewHammer constructs a Hammer. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Hammer) Batch

func (ind *Hammer) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Hammer) BatchInto

func (ind *Hammer) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Hammer) Close

func (ind *Hammer) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Hammer) IsReady

func (ind *Hammer) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Hammer) Name

func (ind *Hammer) Name() string

Name returns the indicator's canonical name.

func (*Hammer) Reset

func (ind *Hammer) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Hammer) Update

func (ind *Hammer) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Hammer) WarmupPeriod

func (ind *Hammer) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HangingMan

type HangingMan struct {
	// contains filtered or unexported fields
}

HangingMan wraps the HangingMan indicator over the Wickra C ABI.

func NewHangingMan

func NewHangingMan() (*HangingMan, error)

NewHangingMan constructs a HangingMan. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HangingMan) Batch

func (ind *HangingMan) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HangingMan) BatchInto

func (ind *HangingMan) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HangingMan) Close

func (ind *HangingMan) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HangingMan) IsReady

func (ind *HangingMan) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HangingMan) Name

func (ind *HangingMan) Name() string

Name returns the indicator's canonical name.

func (*HangingMan) Reset

func (ind *HangingMan) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HangingMan) Update

func (ind *HangingMan) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HangingMan) WarmupPeriod

func (ind *HangingMan) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Harami

type Harami struct {
	// contains filtered or unexported fields
}

Harami wraps the Harami indicator over the Wickra C ABI.

func NewHarami

func NewHarami() (*Harami, error)

NewHarami constructs a Harami. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Harami) Batch

func (ind *Harami) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Harami) BatchInto

func (ind *Harami) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Harami) Close

func (ind *Harami) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Harami) IsReady

func (ind *Harami) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Harami) Name

func (ind *Harami) Name() string

Name returns the indicator's canonical name.

func (*Harami) Reset

func (ind *Harami) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Harami) Update

func (ind *Harami) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Harami) WarmupPeriod

func (ind *Harami) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HaramiCross

type HaramiCross struct {
	// contains filtered or unexported fields
}

HaramiCross wraps the HaramiCross indicator over the Wickra C ABI.

func NewHaramiCross

func NewHaramiCross() (*HaramiCross, error)

NewHaramiCross constructs a HaramiCross. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HaramiCross) Batch

func (ind *HaramiCross) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HaramiCross) BatchInto

func (ind *HaramiCross) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HaramiCross) Close

func (ind *HaramiCross) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HaramiCross) IsReady

func (ind *HaramiCross) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HaramiCross) Name

func (ind *HaramiCross) Name() string

Name returns the indicator's canonical name.

func (*HaramiCross) Reset

func (ind *HaramiCross) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HaramiCross) Update

func (ind *HaramiCross) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HaramiCross) WarmupPeriod

func (ind *HaramiCross) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HasbrouckInformationShare

type HasbrouckInformationShare struct {
	// contains filtered or unexported fields
}

HasbrouckInformationShare wraps the HasbrouckInformationShare indicator over the Wickra C ABI.

func NewHasbrouckInformationShare

func NewHasbrouckInformationShare(period int) (*HasbrouckInformationShare, error)

NewHasbrouckInformationShare constructs a HasbrouckInformationShare. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HasbrouckInformationShare) Batch

func (ind *HasbrouckInformationShare) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HasbrouckInformationShare) BatchInto

func (ind *HasbrouckInformationShare) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HasbrouckInformationShare) Close

func (ind *HasbrouckInformationShare) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HasbrouckInformationShare) IsReady

func (ind *HasbrouckInformationShare) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HasbrouckInformationShare) Name

func (ind *HasbrouckInformationShare) Name() string

Name returns the indicator's canonical name.

func (*HasbrouckInformationShare) Reset

func (ind *HasbrouckInformationShare) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HasbrouckInformationShare) Update

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HasbrouckInformationShare) WarmupPeriod

func (ind *HasbrouckInformationShare) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HeadAndShoulders

type HeadAndShoulders struct {
	// contains filtered or unexported fields
}

HeadAndShoulders wraps the HeadAndShoulders indicator over the Wickra C ABI.

func NewHeadAndShoulders

func NewHeadAndShoulders() (*HeadAndShoulders, error)

NewHeadAndShoulders constructs a HeadAndShoulders. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HeadAndShoulders) Batch

func (ind *HeadAndShoulders) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HeadAndShoulders) BatchInto

func (ind *HeadAndShoulders) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HeadAndShoulders) Close

func (ind *HeadAndShoulders) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HeadAndShoulders) IsReady

func (ind *HeadAndShoulders) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HeadAndShoulders) Name

func (ind *HeadAndShoulders) Name() string

Name returns the indicator's canonical name.

func (*HeadAndShoulders) Reset

func (ind *HeadAndShoulders) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HeadAndShoulders) Update

func (ind *HeadAndShoulders) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HeadAndShoulders) WarmupPeriod

func (ind *HeadAndShoulders) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HeikinAshi

type HeikinAshi struct {
	// contains filtered or unexported fields
}

HeikinAshi wraps the HeikinAshi indicator over the Wickra C ABI.

func NewHeikinAshi

func NewHeikinAshi() (*HeikinAshi, error)

NewHeikinAshi constructs a HeikinAshi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HeikinAshi) Batch

func (ind *HeikinAshi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []HeikinAshiOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*HeikinAshi) Close

func (ind *HeikinAshi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HeikinAshi) IsReady

func (ind *HeikinAshi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HeikinAshi) Name

func (ind *HeikinAshi) Name() string

Name returns the indicator's canonical name.

func (*HeikinAshi) Reset

func (ind *HeikinAshi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HeikinAshi) Update

func (ind *HeikinAshi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (HeikinAshiOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*HeikinAshi) WarmupPeriod

func (ind *HeikinAshi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HeikinAshiOscillator

type HeikinAshiOscillator struct {
	// contains filtered or unexported fields
}

HeikinAshiOscillator wraps the HeikinAshiOscillator indicator over the Wickra C ABI.

func NewHeikinAshiOscillator

func NewHeikinAshiOscillator(period int) (*HeikinAshiOscillator, error)

NewHeikinAshiOscillator constructs a HeikinAshiOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HeikinAshiOscillator) Batch

func (ind *HeikinAshiOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HeikinAshiOscillator) BatchInto

func (ind *HeikinAshiOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HeikinAshiOscillator) Close

func (ind *HeikinAshiOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HeikinAshiOscillator) IsReady

func (ind *HeikinAshiOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HeikinAshiOscillator) Name

func (ind *HeikinAshiOscillator) Name() string

Name returns the indicator's canonical name.

func (*HeikinAshiOscillator) Reset

func (ind *HeikinAshiOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HeikinAshiOscillator) Update

func (ind *HeikinAshiOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HeikinAshiOscillator) WarmupPeriod

func (ind *HeikinAshiOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HeikinAshiOutput

type HeikinAshiOutput struct {
	Open  float64
	High  float64
	Low   float64
	Close float64
}

HeikinAshiOutput is the output of the HeikinAshi indicator.

type HiLoActivator

type HiLoActivator struct {
	// contains filtered or unexported fields
}

HiLoActivator wraps the HiLoActivator indicator over the Wickra C ABI.

func NewHiLoActivator

func NewHiLoActivator(period int) (*HiLoActivator, error)

NewHiLoActivator constructs a HiLoActivator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HiLoActivator) Batch

func (ind *HiLoActivator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HiLoActivator) BatchInto

func (ind *HiLoActivator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HiLoActivator) Close

func (ind *HiLoActivator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HiLoActivator) IsReady

func (ind *HiLoActivator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HiLoActivator) Name

func (ind *HiLoActivator) Name() string

Name returns the indicator's canonical name.

func (*HiLoActivator) Reset

func (ind *HiLoActivator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HiLoActivator) Update

func (ind *HiLoActivator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HiLoActivator) WarmupPeriod

func (ind *HiLoActivator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HighLowIndex

type HighLowIndex struct {
	// contains filtered or unexported fields
}

HighLowIndex wraps the HighLowIndex indicator over the Wickra C ABI.

func NewHighLowIndex

func NewHighLowIndex(period int) (*HighLowIndex, error)

NewHighLowIndex constructs a HighLowIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HighLowIndex) Batch

func (ind *HighLowIndex) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*HighLowIndex) Close

func (ind *HighLowIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HighLowIndex) IsReady

func (ind *HighLowIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HighLowIndex) Name

func (ind *HighLowIndex) Name() string

Name returns the indicator's canonical name.

func (*HighLowIndex) Reset

func (ind *HighLowIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HighLowIndex) Update

func (ind *HighLowIndex) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*HighLowIndex) WarmupPeriod

func (ind *HighLowIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HighLowRange

type HighLowRange struct {
	// contains filtered or unexported fields
}

HighLowRange wraps the HighLowRange indicator over the Wickra C ABI.

func NewHighLowRange

func NewHighLowRange() (*HighLowRange, error)

NewHighLowRange constructs a HighLowRange. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HighLowRange) Batch

func (ind *HighLowRange) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HighLowRange) BatchInto

func (ind *HighLowRange) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HighLowRange) Close

func (ind *HighLowRange) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HighLowRange) IsReady

func (ind *HighLowRange) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HighLowRange) Name

func (ind *HighLowRange) Name() string

Name returns the indicator's canonical name.

func (*HighLowRange) Reset

func (ind *HighLowRange) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HighLowRange) Update

func (ind *HighLowRange) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HighLowRange) WarmupPeriod

func (ind *HighLowRange) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HighLowVolumeNodes

type HighLowVolumeNodes struct {
	// contains filtered or unexported fields
}

HighLowVolumeNodes wraps the HighLowVolumeNodes indicator over the Wickra C ABI.

func NewHighLowVolumeNodes

func NewHighLowVolumeNodes(period int, bins int) (*HighLowVolumeNodes, error)

NewHighLowVolumeNodes constructs a HighLowVolumeNodes. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HighLowVolumeNodes) Batch

func (ind *HighLowVolumeNodes) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []HighLowVolumeNodesOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*HighLowVolumeNodes) Close

func (ind *HighLowVolumeNodes) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HighLowVolumeNodes) IsReady

func (ind *HighLowVolumeNodes) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HighLowVolumeNodes) Name

func (ind *HighLowVolumeNodes) Name() string

Name returns the indicator's canonical name.

func (*HighLowVolumeNodes) Reset

func (ind *HighLowVolumeNodes) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HighLowVolumeNodes) Update

func (ind *HighLowVolumeNodes) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (HighLowVolumeNodesOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*HighLowVolumeNodes) WarmupPeriod

func (ind *HighLowVolumeNodes) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HighLowVolumeNodesOutput

type HighLowVolumeNodesOutput struct {
	Hvn float64
	Lvn float64
}

HighLowVolumeNodesOutput is the output of the HighLowVolumeNodes indicator.

type HighWave

type HighWave struct {
	// contains filtered or unexported fields
}

HighWave wraps the HighWave indicator over the Wickra C ABI.

func NewHighWave

func NewHighWave() (*HighWave, error)

NewHighWave constructs a HighWave. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HighWave) Batch

func (ind *HighWave) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HighWave) BatchInto

func (ind *HighWave) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HighWave) Close

func (ind *HighWave) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HighWave) IsReady

func (ind *HighWave) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HighWave) Name

func (ind *HighWave) Name() string

Name returns the indicator's canonical name.

func (*HighWave) Reset

func (ind *HighWave) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HighWave) Update

func (ind *HighWave) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HighWave) WarmupPeriod

func (ind *HighWave) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HighpassFilter

type HighpassFilter struct {
	// contains filtered or unexported fields
}

HighpassFilter wraps the HighpassFilter indicator over the Wickra C ABI.

func NewHighpassFilter

func NewHighpassFilter(period int) (*HighpassFilter, error)

NewHighpassFilter constructs a HighpassFilter. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HighpassFilter) Batch

func (ind *HighpassFilter) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HighpassFilter) BatchFast

func (ind *HighpassFilter) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HighpassFilter) BatchFastInto

func (ind *HighpassFilter) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HighpassFilter) BatchInto

func (ind *HighpassFilter) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HighpassFilter) Close

func (ind *HighpassFilter) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HighpassFilter) IsReady

func (ind *HighpassFilter) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HighpassFilter) Name

func (ind *HighpassFilter) Name() string

Name returns the indicator's canonical name.

func (*HighpassFilter) Reset

func (ind *HighpassFilter) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HighpassFilter) Update

func (ind *HighpassFilter) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HighpassFilter) WarmupPeriod

func (ind *HighpassFilter) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Hikkake

type Hikkake struct {
	// contains filtered or unexported fields
}

Hikkake wraps the Hikkake indicator over the Wickra C ABI.

func NewHikkake

func NewHikkake() (*Hikkake, error)

NewHikkake constructs a Hikkake. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Hikkake) Batch

func (ind *Hikkake) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Hikkake) BatchInto

func (ind *Hikkake) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Hikkake) Close

func (ind *Hikkake) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Hikkake) IsReady

func (ind *Hikkake) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Hikkake) Name

func (ind *Hikkake) Name() string

Name returns the indicator's canonical name.

func (*Hikkake) Reset

func (ind *Hikkake) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Hikkake) Update

func (ind *Hikkake) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Hikkake) WarmupPeriod

func (ind *Hikkake) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HikkakeModified

type HikkakeModified struct {
	// contains filtered or unexported fields
}

HikkakeModified wraps the HikkakeModified indicator over the Wickra C ABI.

func NewHikkakeModified

func NewHikkakeModified() (*HikkakeModified, error)

NewHikkakeModified constructs a HikkakeModified. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HikkakeModified) Batch

func (ind *HikkakeModified) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HikkakeModified) BatchInto

func (ind *HikkakeModified) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HikkakeModified) Close

func (ind *HikkakeModified) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HikkakeModified) IsReady

func (ind *HikkakeModified) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HikkakeModified) Name

func (ind *HikkakeModified) Name() string

Name returns the indicator's canonical name.

func (*HikkakeModified) Reset

func (ind *HikkakeModified) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HikkakeModified) Update

func (ind *HikkakeModified) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HikkakeModified) WarmupPeriod

func (ind *HikkakeModified) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HilbertDominantCycle

type HilbertDominantCycle struct {
	// contains filtered or unexported fields
}

HilbertDominantCycle wraps the HilbertDominantCycle indicator over the Wickra C ABI.

func NewHilbertDominantCycle

func NewHilbertDominantCycle() (*HilbertDominantCycle, error)

NewHilbertDominantCycle constructs a HilbertDominantCycle. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HilbertDominantCycle) Batch

func (ind *HilbertDominantCycle) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HilbertDominantCycle) BatchFast

func (ind *HilbertDominantCycle) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HilbertDominantCycle) BatchFastInto

func (ind *HilbertDominantCycle) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HilbertDominantCycle) BatchInto

func (ind *HilbertDominantCycle) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HilbertDominantCycle) Close

func (ind *HilbertDominantCycle) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HilbertDominantCycle) IsReady

func (ind *HilbertDominantCycle) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HilbertDominantCycle) Name

func (ind *HilbertDominantCycle) Name() string

Name returns the indicator's canonical name.

func (*HilbertDominantCycle) Reset

func (ind *HilbertDominantCycle) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HilbertDominantCycle) Update

func (ind *HilbertDominantCycle) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HilbertDominantCycle) WarmupPeriod

func (ind *HilbertDominantCycle) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HistoricalVolatility

type HistoricalVolatility struct {
	// contains filtered or unexported fields
}

HistoricalVolatility wraps the HistoricalVolatility indicator over the Wickra C ABI.

func NewHistoricalVolatility

func NewHistoricalVolatility(period int, tradingPeriods int) (*HistoricalVolatility, error)

NewHistoricalVolatility constructs a HistoricalVolatility. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HistoricalVolatility) Batch

func (ind *HistoricalVolatility) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HistoricalVolatility) BatchFast

func (ind *HistoricalVolatility) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HistoricalVolatility) BatchFastInto

func (ind *HistoricalVolatility) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HistoricalVolatility) BatchInto

func (ind *HistoricalVolatility) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HistoricalVolatility) Close

func (ind *HistoricalVolatility) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HistoricalVolatility) IsReady

func (ind *HistoricalVolatility) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HistoricalVolatility) Name

func (ind *HistoricalVolatility) Name() string

Name returns the indicator's canonical name.

func (*HistoricalVolatility) Reset

func (ind *HistoricalVolatility) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HistoricalVolatility) Update

func (ind *HistoricalVolatility) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HistoricalVolatility) WarmupPeriod

func (ind *HistoricalVolatility) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Hma

type Hma struct {
	// contains filtered or unexported fields
}

Hma wraps the Hma indicator over the Wickra C ABI.

func NewHma

func NewHma(period int) (*Hma, error)

NewHma constructs a Hma. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Hma) Batch

func (ind *Hma) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Hma) BatchFast

func (ind *Hma) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Hma) BatchFastInto

func (ind *Hma) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Hma) BatchInto

func (ind *Hma) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Hma) Close

func (ind *Hma) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Hma) IsReady

func (ind *Hma) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Hma) Name

func (ind *Hma) Name() string

Name returns the indicator's canonical name.

func (*Hma) Reset

func (ind *Hma) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Hma) Update

func (ind *Hma) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Hma) WarmupPeriod

func (ind *Hma) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HoltWinters

type HoltWinters struct {
	// contains filtered or unexported fields
}

HoltWinters wraps the HoltWinters indicator over the Wickra C ABI.

func NewHoltWinters

func NewHoltWinters(alpha float64, beta float64) (*HoltWinters, error)

NewHoltWinters constructs a HoltWinters. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HoltWinters) Batch

func (ind *HoltWinters) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HoltWinters) BatchFast

func (ind *HoltWinters) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HoltWinters) BatchFastInto

func (ind *HoltWinters) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HoltWinters) BatchInto

func (ind *HoltWinters) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HoltWinters) Close

func (ind *HoltWinters) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HoltWinters) IsReady

func (ind *HoltWinters) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HoltWinters) Name

func (ind *HoltWinters) Name() string

Name returns the indicator's canonical name.

func (*HoltWinters) Reset

func (ind *HoltWinters) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HoltWinters) Update

func (ind *HoltWinters) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HoltWinters) WarmupPeriod

func (ind *HoltWinters) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HomingPigeon

type HomingPigeon struct {
	// contains filtered or unexported fields
}

HomingPigeon wraps the HomingPigeon indicator over the Wickra C ABI.

func NewHomingPigeon

func NewHomingPigeon() (*HomingPigeon, error)

NewHomingPigeon constructs a HomingPigeon. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HomingPigeon) Batch

func (ind *HomingPigeon) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HomingPigeon) BatchInto

func (ind *HomingPigeon) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HomingPigeon) Close

func (ind *HomingPigeon) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HomingPigeon) IsReady

func (ind *HomingPigeon) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HomingPigeon) Name

func (ind *HomingPigeon) Name() string

Name returns the indicator's canonical name.

func (*HomingPigeon) Reset

func (ind *HomingPigeon) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HomingPigeon) Update

func (ind *HomingPigeon) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HomingPigeon) WarmupPeriod

func (ind *HomingPigeon) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HtDcPhase

type HtDcPhase struct {
	// contains filtered or unexported fields
}

HtDcPhase wraps the HtDcPhase indicator over the Wickra C ABI.

func NewHtDcPhase

func NewHtDcPhase() (*HtDcPhase, error)

NewHtDcPhase constructs a HtDcPhase. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HtDcPhase) Batch

func (ind *HtDcPhase) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HtDcPhase) BatchFast

func (ind *HtDcPhase) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HtDcPhase) BatchFastInto

func (ind *HtDcPhase) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HtDcPhase) BatchInto

func (ind *HtDcPhase) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HtDcPhase) Close

func (ind *HtDcPhase) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HtDcPhase) IsReady

func (ind *HtDcPhase) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HtDcPhase) Name

func (ind *HtDcPhase) Name() string

Name returns the indicator's canonical name.

func (*HtDcPhase) Reset

func (ind *HtDcPhase) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HtDcPhase) Update

func (ind *HtDcPhase) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HtDcPhase) WarmupPeriod

func (ind *HtDcPhase) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HtPhasor

type HtPhasor struct {
	// contains filtered or unexported fields
}

HtPhasor wraps the HtPhasor indicator over the Wickra C ABI.

func NewHtPhasor

func NewHtPhasor() (*HtPhasor, error)

NewHtPhasor constructs a HtPhasor. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HtPhasor) Batch

func (ind *HtPhasor) Batch(input []float64) []HtPhasorOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*HtPhasor) Close

func (ind *HtPhasor) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HtPhasor) IsReady

func (ind *HtPhasor) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HtPhasor) Name

func (ind *HtPhasor) Name() string

Name returns the indicator's canonical name.

func (*HtPhasor) Reset

func (ind *HtPhasor) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HtPhasor) Update

func (ind *HtPhasor) Update(value float64) (HtPhasorOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*HtPhasor) WarmupPeriod

func (ind *HtPhasor) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HtPhasorOutput

type HtPhasorOutput struct {
	Inphase    float64
	Quadrature float64
}

HtPhasorOutput is the output of the HtPhasor indicator.

type HtTrendMode

type HtTrendMode struct {
	// contains filtered or unexported fields
}

HtTrendMode wraps the HtTrendMode indicator over the Wickra C ABI.

func NewHtTrendMode

func NewHtTrendMode() (*HtTrendMode, error)

NewHtTrendMode constructs a HtTrendMode. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HtTrendMode) Batch

func (ind *HtTrendMode) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HtTrendMode) BatchFast

func (ind *HtTrendMode) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HtTrendMode) BatchFastInto

func (ind *HtTrendMode) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HtTrendMode) BatchInto

func (ind *HtTrendMode) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HtTrendMode) Close

func (ind *HtTrendMode) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HtTrendMode) IsReady

func (ind *HtTrendMode) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HtTrendMode) Name

func (ind *HtTrendMode) Name() string

Name returns the indicator's canonical name.

func (*HtTrendMode) Reset

func (ind *HtTrendMode) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HtTrendMode) Update

func (ind *HtTrendMode) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HtTrendMode) WarmupPeriod

func (ind *HtTrendMode) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HurstChannel

type HurstChannel struct {
	// contains filtered or unexported fields
}

HurstChannel wraps the HurstChannel indicator over the Wickra C ABI.

func NewHurstChannel

func NewHurstChannel(period int, multiplier float64) (*HurstChannel, error)

NewHurstChannel constructs a HurstChannel. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HurstChannel) Batch

func (ind *HurstChannel) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []HurstChannelOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*HurstChannel) Close

func (ind *HurstChannel) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HurstChannel) IsReady

func (ind *HurstChannel) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HurstChannel) Name

func (ind *HurstChannel) Name() string

Name returns the indicator's canonical name.

func (*HurstChannel) Reset

func (ind *HurstChannel) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HurstChannel) Update

func (ind *HurstChannel) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (HurstChannelOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*HurstChannel) WarmupPeriod

func (ind *HurstChannel) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type HurstChannelOutput

type HurstChannelOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

HurstChannelOutput is the output of the HurstChannel indicator.

type HurstExponent

type HurstExponent struct {
	// contains filtered or unexported fields
}

HurstExponent wraps the HurstExponent indicator over the Wickra C ABI.

func NewHurstExponent

func NewHurstExponent(period int, chunks int) (*HurstExponent, error)

NewHurstExponent constructs a HurstExponent. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*HurstExponent) Batch

func (ind *HurstExponent) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*HurstExponent) BatchFast

func (ind *HurstExponent) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*HurstExponent) BatchFastInto

func (ind *HurstExponent) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HurstExponent) BatchInto

func (ind *HurstExponent) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*HurstExponent) Close

func (ind *HurstExponent) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*HurstExponent) IsReady

func (ind *HurstExponent) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*HurstExponent) Name

func (ind *HurstExponent) Name() string

Name returns the indicator's canonical name.

func (*HurstExponent) Reset

func (ind *HurstExponent) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*HurstExponent) Update

func (ind *HurstExponent) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*HurstExponent) WarmupPeriod

func (ind *HurstExponent) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Ichimoku

type Ichimoku struct {
	// contains filtered or unexported fields
}

Ichimoku wraps the Ichimoku indicator over the Wickra C ABI.

func NewIchimoku

func NewIchimoku(tenkanPeriod int, kijunPeriod int, senkouBPeriod int, displacement int) (*Ichimoku, error)

NewIchimoku constructs a Ichimoku. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Ichimoku) Batch

func (ind *Ichimoku) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []IchimokuOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Ichimoku) Close

func (ind *Ichimoku) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Ichimoku) IsReady

func (ind *Ichimoku) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Ichimoku) Name

func (ind *Ichimoku) Name() string

Name returns the indicator's canonical name.

func (*Ichimoku) Reset

func (ind *Ichimoku) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Ichimoku) Update

func (ind *Ichimoku) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (IchimokuOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Ichimoku) WarmupPeriod

func (ind *Ichimoku) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type IchimokuOutput

type IchimokuOutput struct {
	Tenkan  float64
	Kijun   float64
	SenkouA float64
	SenkouB float64
	Chikou  float64
}

IchimokuOutput is the output of the Ichimoku indicator.

type IdenticalThreeCrows

type IdenticalThreeCrows struct {
	// contains filtered or unexported fields
}

IdenticalThreeCrows wraps the IdenticalThreeCrows indicator over the Wickra C ABI.

func NewIdenticalThreeCrows

func NewIdenticalThreeCrows() (*IdenticalThreeCrows, error)

NewIdenticalThreeCrows constructs a IdenticalThreeCrows. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*IdenticalThreeCrows) Batch

func (ind *IdenticalThreeCrows) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*IdenticalThreeCrows) BatchInto

func (ind *IdenticalThreeCrows) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*IdenticalThreeCrows) Close

func (ind *IdenticalThreeCrows) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*IdenticalThreeCrows) IsReady

func (ind *IdenticalThreeCrows) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*IdenticalThreeCrows) Name

func (ind *IdenticalThreeCrows) Name() string

Name returns the indicator's canonical name.

func (*IdenticalThreeCrows) Reset

func (ind *IdenticalThreeCrows) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*IdenticalThreeCrows) Update

func (ind *IdenticalThreeCrows) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*IdenticalThreeCrows) WarmupPeriod

func (ind *IdenticalThreeCrows) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ImbalanceBar

type ImbalanceBar struct {
	Open      float64
	High      float64
	Low       float64
	Close     float64
	Imbalance float64
	Direction int8
}

ImbalanceBar is the output of the ImbalanceBar indicator.

type ImbalanceBars

type ImbalanceBars struct {
	// contains filtered or unexported fields
}

ImbalanceBars wraps the ImbalanceBars indicator over the Wickra C ABI.

func NewImbalanceBars

func NewImbalanceBars(threshold float64) (*ImbalanceBars, error)

NewImbalanceBars constructs a ImbalanceBars. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ImbalanceBars) Batch

func (ind *ImbalanceBars) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ImbalanceBar

Batch feeds a whole series in one FFI call and returns every bar it completed. The count depends on the data, not on the input length.

func (*ImbalanceBars) Close

func (ind *ImbalanceBars) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ImbalanceBars) Name

func (ind *ImbalanceBars) Name() string

Name returns the indicator's canonical name.

func (*ImbalanceBars) Reset

func (ind *ImbalanceBars) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ImbalanceBars) Update

func (ind *ImbalanceBars) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) []ImbalanceBar

Update feeds one candle and returns any bars completed by it (a single candle may complete several).

type InNeck

type InNeck struct {
	// contains filtered or unexported fields
}

InNeck wraps the InNeck indicator over the Wickra C ABI.

func NewInNeck

func NewInNeck() (*InNeck, error)

NewInNeck constructs a InNeck. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InNeck) Batch

func (ind *InNeck) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*InNeck) BatchInto

func (ind *InNeck) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InNeck) Close

func (ind *InNeck) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InNeck) IsReady

func (ind *InNeck) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InNeck) Name

func (ind *InNeck) Name() string

Name returns the indicator's canonical name.

func (*InNeck) Reset

func (ind *InNeck) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InNeck) Update

func (ind *InNeck) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*InNeck) WarmupPeriod

func (ind *InNeck) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Inertia

type Inertia struct {
	// contains filtered or unexported fields
}

Inertia wraps the Inertia indicator over the Wickra C ABI.

func NewInertia

func NewInertia(rviPeriod int, linregPeriod int) (*Inertia, error)

NewInertia constructs a Inertia. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Inertia) Batch

func (ind *Inertia) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Inertia) BatchInto

func (ind *Inertia) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Inertia) Close

func (ind *Inertia) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Inertia) IsReady

func (ind *Inertia) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Inertia) Name

func (ind *Inertia) Name() string

Name returns the indicator's canonical name.

func (*Inertia) Reset

func (ind *Inertia) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Inertia) Update

func (ind *Inertia) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Inertia) WarmupPeriod

func (ind *Inertia) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type InformationRatio

type InformationRatio struct {
	// contains filtered or unexported fields
}

InformationRatio wraps the InformationRatio indicator over the Wickra C ABI.

func NewInformationRatio

func NewInformationRatio(period int) (*InformationRatio, error)

NewInformationRatio constructs a InformationRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InformationRatio) Batch

func (ind *InformationRatio) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*InformationRatio) BatchInto

func (ind *InformationRatio) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InformationRatio) Close

func (ind *InformationRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InformationRatio) IsReady

func (ind *InformationRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InformationRatio) Name

func (ind *InformationRatio) Name() string

Name returns the indicator's canonical name.

func (*InformationRatio) Reset

func (ind *InformationRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InformationRatio) Update

func (ind *InformationRatio) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*InformationRatio) WarmupPeriod

func (ind *InformationRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type InitialBalance

type InitialBalance struct {
	// contains filtered or unexported fields
}

InitialBalance wraps the InitialBalance indicator over the Wickra C ABI.

func NewInitialBalance

func NewInitialBalance(period int) (*InitialBalance, error)

NewInitialBalance constructs a InitialBalance. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InitialBalance) Batch

func (ind *InitialBalance) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []InitialBalanceOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*InitialBalance) Close

func (ind *InitialBalance) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InitialBalance) IsReady

func (ind *InitialBalance) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InitialBalance) Name

func (ind *InitialBalance) Name() string

Name returns the indicator's canonical name.

func (*InitialBalance) Reset

func (ind *InitialBalance) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InitialBalance) Update

func (ind *InitialBalance) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (InitialBalanceOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*InitialBalance) WarmupPeriod

func (ind *InitialBalance) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type InitialBalanceOutput

type InitialBalanceOutput struct {
	High float64
	Low  float64
}

InitialBalanceOutput is the output of the InitialBalance indicator.

type InstantaneousTrendline

type InstantaneousTrendline struct {
	// contains filtered or unexported fields
}

InstantaneousTrendline wraps the InstantaneousTrendline indicator over the Wickra C ABI.

func NewInstantaneousTrendline

func NewInstantaneousTrendline(period int) (*InstantaneousTrendline, error)

NewInstantaneousTrendline constructs a InstantaneousTrendline. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InstantaneousTrendline) Batch

func (ind *InstantaneousTrendline) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*InstantaneousTrendline) BatchFast

func (ind *InstantaneousTrendline) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*InstantaneousTrendline) BatchFastInto

func (ind *InstantaneousTrendline) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InstantaneousTrendline) BatchInto

func (ind *InstantaneousTrendline) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InstantaneousTrendline) Close

func (ind *InstantaneousTrendline) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InstantaneousTrendline) IsReady

func (ind *InstantaneousTrendline) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InstantaneousTrendline) Name

func (ind *InstantaneousTrendline) Name() string

Name returns the indicator's canonical name.

func (*InstantaneousTrendline) Reset

func (ind *InstantaneousTrendline) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InstantaneousTrendline) Update

func (ind *InstantaneousTrendline) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*InstantaneousTrendline) WarmupPeriod

func (ind *InstantaneousTrendline) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type IntradayIntensity

type IntradayIntensity struct {
	// contains filtered or unexported fields
}

IntradayIntensity wraps the IntradayIntensity indicator over the Wickra C ABI.

func NewIntradayIntensity

func NewIntradayIntensity() (*IntradayIntensity, error)

NewIntradayIntensity constructs a IntradayIntensity. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*IntradayIntensity) Batch

func (ind *IntradayIntensity) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*IntradayIntensity) BatchInto

func (ind *IntradayIntensity) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*IntradayIntensity) Close

func (ind *IntradayIntensity) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*IntradayIntensity) IsReady

func (ind *IntradayIntensity) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*IntradayIntensity) Name

func (ind *IntradayIntensity) Name() string

Name returns the indicator's canonical name.

func (*IntradayIntensity) Reset

func (ind *IntradayIntensity) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*IntradayIntensity) Update

func (ind *IntradayIntensity) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*IntradayIntensity) WarmupPeriod

func (ind *IntradayIntensity) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type IntradayMomentumIndex

type IntradayMomentumIndex struct {
	// contains filtered or unexported fields
}

IntradayMomentumIndex wraps the IntradayMomentumIndex indicator over the Wickra C ABI.

func NewIntradayMomentumIndex

func NewIntradayMomentumIndex(period int) (*IntradayMomentumIndex, error)

NewIntradayMomentumIndex constructs a IntradayMomentumIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*IntradayMomentumIndex) Batch

func (ind *IntradayMomentumIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*IntradayMomentumIndex) BatchInto

func (ind *IntradayMomentumIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*IntradayMomentumIndex) Close

func (ind *IntradayMomentumIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*IntradayMomentumIndex) IsReady

func (ind *IntradayMomentumIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*IntradayMomentumIndex) Name

func (ind *IntradayMomentumIndex) Name() string

Name returns the indicator's canonical name.

func (*IntradayMomentumIndex) Reset

func (ind *IntradayMomentumIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*IntradayMomentumIndex) Update

func (ind *IntradayMomentumIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*IntradayMomentumIndex) WarmupPeriod

func (ind *IntradayMomentumIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type IntradayVolatilityProfile

type IntradayVolatilityProfile struct {
	// contains filtered or unexported fields
}

IntradayVolatilityProfile wraps the IntradayVolatilityProfile indicator over the Wickra C ABI.

func NewIntradayVolatilityProfile

func NewIntradayVolatilityProfile(buckets int, utcOffsetMinutes int32) (*IntradayVolatilityProfile, error)

NewIntradayVolatilityProfile constructs a IntradayVolatilityProfile. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*IntradayVolatilityProfile) Batch

func (ind *IntradayVolatilityProfile) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) [][]float64

Batch feeds a whole series in one FFI call and returns one profile per input. A row the indicator did not produce carries NaN.

func (*IntradayVolatilityProfile) Close

func (ind *IntradayVolatilityProfile) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*IntradayVolatilityProfile) IsReady

func (ind *IntradayVolatilityProfile) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*IntradayVolatilityProfile) Name

func (ind *IntradayVolatilityProfile) Name() string

Name returns the indicator's canonical name.

func (*IntradayVolatilityProfile) Reset

func (ind *IntradayVolatilityProfile) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*IntradayVolatilityProfile) Update

func (ind *IntradayVolatilityProfile) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) ([]float64, bool)

Update feeds one observation and returns the profile values (ok is false during warmup).

func (*IntradayVolatilityProfile) WarmupPeriod

func (ind *IntradayVolatilityProfile) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type InverseFisherTransform

type InverseFisherTransform struct {
	// contains filtered or unexported fields
}

InverseFisherTransform wraps the InverseFisherTransform indicator over the Wickra C ABI.

func NewInverseFisherTransform

func NewInverseFisherTransform(scale float64) (*InverseFisherTransform, error)

NewInverseFisherTransform constructs a InverseFisherTransform. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InverseFisherTransform) Batch

func (ind *InverseFisherTransform) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*InverseFisherTransform) BatchFast

func (ind *InverseFisherTransform) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*InverseFisherTransform) BatchFastInto

func (ind *InverseFisherTransform) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InverseFisherTransform) BatchInto

func (ind *InverseFisherTransform) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InverseFisherTransform) Close

func (ind *InverseFisherTransform) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InverseFisherTransform) IsReady

func (ind *InverseFisherTransform) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InverseFisherTransform) Name

func (ind *InverseFisherTransform) Name() string

Name returns the indicator's canonical name.

func (*InverseFisherTransform) Reset

func (ind *InverseFisherTransform) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InverseFisherTransform) Update

func (ind *InverseFisherTransform) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*InverseFisherTransform) WarmupPeriod

func (ind *InverseFisherTransform) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type InvertedHammer

type InvertedHammer struct {
	// contains filtered or unexported fields
}

InvertedHammer wraps the InvertedHammer indicator over the Wickra C ABI.

func NewInvertedHammer

func NewInvertedHammer() (*InvertedHammer, error)

NewInvertedHammer constructs a InvertedHammer. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*InvertedHammer) Batch

func (ind *InvertedHammer) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*InvertedHammer) BatchInto

func (ind *InvertedHammer) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*InvertedHammer) Close

func (ind *InvertedHammer) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*InvertedHammer) IsReady

func (ind *InvertedHammer) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*InvertedHammer) Name

func (ind *InvertedHammer) Name() string

Name returns the indicator's canonical name.

func (*InvertedHammer) Reset

func (ind *InvertedHammer) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*InvertedHammer) Update

func (ind *InvertedHammer) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*InvertedHammer) WarmupPeriod

func (ind *InvertedHammer) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type JarqueBera

type JarqueBera struct {
	// contains filtered or unexported fields
}

JarqueBera wraps the JarqueBera indicator over the Wickra C ABI.

func NewJarqueBera

func NewJarqueBera(period int) (*JarqueBera, error)

NewJarqueBera constructs a JarqueBera. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*JarqueBera) Batch

func (ind *JarqueBera) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*JarqueBera) BatchFast

func (ind *JarqueBera) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*JarqueBera) BatchFastInto

func (ind *JarqueBera) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*JarqueBera) BatchInto

func (ind *JarqueBera) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*JarqueBera) Close

func (ind *JarqueBera) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*JarqueBera) IsReady

func (ind *JarqueBera) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*JarqueBera) Name

func (ind *JarqueBera) Name() string

Name returns the indicator's canonical name.

func (*JarqueBera) Reset

func (ind *JarqueBera) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*JarqueBera) Update

func (ind *JarqueBera) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*JarqueBera) WarmupPeriod

func (ind *JarqueBera) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Jma

type Jma struct {
	// contains filtered or unexported fields
}

Jma wraps the Jma indicator over the Wickra C ABI.

func NewJma

func NewJma(period int, phase float64, power uint32) (*Jma, error)

NewJma constructs a Jma. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Jma) Batch

func (ind *Jma) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Jma) BatchFast

func (ind *Jma) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Jma) BatchFastInto

func (ind *Jma) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Jma) BatchInto

func (ind *Jma) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Jma) Close

func (ind *Jma) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Jma) IsReady

func (ind *Jma) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Jma) Name

func (ind *Jma) Name() string

Name returns the indicator's canonical name.

func (*Jma) Reset

func (ind *Jma) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Jma) Update

func (ind *Jma) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Jma) WarmupPeriod

func (ind *Jma) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type JumpIndicator

type JumpIndicator struct {
	// contains filtered or unexported fields
}

JumpIndicator wraps the JumpIndicator indicator over the Wickra C ABI.

func NewJumpIndicator

func NewJumpIndicator(period int, threshold float64) (*JumpIndicator, error)

NewJumpIndicator constructs a JumpIndicator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*JumpIndicator) Batch

func (ind *JumpIndicator) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*JumpIndicator) BatchFast

func (ind *JumpIndicator) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*JumpIndicator) BatchFastInto

func (ind *JumpIndicator) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*JumpIndicator) BatchInto

func (ind *JumpIndicator) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*JumpIndicator) Close

func (ind *JumpIndicator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*JumpIndicator) IsReady

func (ind *JumpIndicator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*JumpIndicator) Name

func (ind *JumpIndicator) Name() string

Name returns the indicator's canonical name.

func (*JumpIndicator) Reset

func (ind *JumpIndicator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*JumpIndicator) Update

func (ind *JumpIndicator) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*JumpIndicator) WarmupPeriod

func (ind *JumpIndicator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KRatio

type KRatio struct {
	// contains filtered or unexported fields
}

KRatio wraps the KRatio indicator over the Wickra C ABI.

func NewKRatio

func NewKRatio(period int) (*KRatio, error)

NewKRatio constructs a KRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KRatio) Batch

func (ind *KRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*KRatio) BatchFast

func (ind *KRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*KRatio) BatchFastInto

func (ind *KRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KRatio) BatchInto

func (ind *KRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KRatio) Close

func (ind *KRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KRatio) IsReady

func (ind *KRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KRatio) Name

func (ind *KRatio) Name() string

Name returns the indicator's canonical name.

func (*KRatio) Reset

func (ind *KRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KRatio) Update

func (ind *KRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*KRatio) WarmupPeriod

func (ind *KRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KagiBar

type KagiBar struct {
	Start     float64
	End       float64
	Direction int8
}

KagiBar is the output of the KagiBar indicator.

type KagiBars

type KagiBars struct {
	// contains filtered or unexported fields
}

KagiBars wraps the KagiBars indicator over the Wickra C ABI.

func NewKagiBars

func NewKagiBars(reversal float64) (*KagiBars, error)

NewKagiBars constructs a KagiBars. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KagiBars) Batch

func (ind *KagiBars) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []KagiBar

Batch feeds a whole series in one FFI call and returns every bar it completed. The count depends on the data, not on the input length.

func (*KagiBars) Close

func (ind *KagiBars) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KagiBars) Name

func (ind *KagiBars) Name() string

Name returns the indicator's canonical name.

func (*KagiBars) Reset

func (ind *KagiBars) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KagiBars) Update

func (ind *KagiBars) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) []KagiBar

Update feeds one candle and returns any bars completed by it (a single candle may complete several).

type KalmanHedgeRatio

type KalmanHedgeRatio struct {
	// contains filtered or unexported fields
}

KalmanHedgeRatio wraps the KalmanHedgeRatio indicator over the Wickra C ABI.

func NewKalmanHedgeRatio

func NewKalmanHedgeRatio(delta float64, observationVar float64) (*KalmanHedgeRatio, error)

NewKalmanHedgeRatio constructs a KalmanHedgeRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KalmanHedgeRatio) Batch

func (ind *KalmanHedgeRatio) Batch(x []float64, y []float64) []KalmanHedgeRatioOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*KalmanHedgeRatio) Close

func (ind *KalmanHedgeRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KalmanHedgeRatio) IsReady

func (ind *KalmanHedgeRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KalmanHedgeRatio) Name

func (ind *KalmanHedgeRatio) Name() string

Name returns the indicator's canonical name.

func (*KalmanHedgeRatio) Reset

func (ind *KalmanHedgeRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KalmanHedgeRatio) Update

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*KalmanHedgeRatio) WarmupPeriod

func (ind *KalmanHedgeRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KalmanHedgeRatioOutput

type KalmanHedgeRatioOutput struct {
	HedgeRatio float64
	Intercept  float64
	Spread     float64
}

KalmanHedgeRatioOutput is the output of the KalmanHedgeRatio indicator.

type Kama

type Kama struct {
	// contains filtered or unexported fields
}

Kama wraps the Kama indicator over the Wickra C ABI.

func NewKama

func NewKama(erPeriod int, fast int, slow int) (*Kama, error)

NewKama constructs a Kama. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Kama) Batch

func (ind *Kama) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Kama) BatchFast

func (ind *Kama) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Kama) BatchFastInto

func (ind *Kama) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kama) BatchInto

func (ind *Kama) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kama) Close

func (ind *Kama) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Kama) IsReady

func (ind *Kama) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Kama) Name

func (ind *Kama) Name() string

Name returns the indicator's canonical name.

func (*Kama) Reset

func (ind *Kama) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Kama) Update

func (ind *Kama) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Kama) WarmupPeriod

func (ind *Kama) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KaseDevStop

type KaseDevStop struct {
	// contains filtered or unexported fields
}

KaseDevStop wraps the KaseDevStop indicator over the Wickra C ABI.

func NewKaseDevStop

func NewKaseDevStop(period int, dev float64) (*KaseDevStop, error)

NewKaseDevStop constructs a KaseDevStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KaseDevStop) Batch

func (ind *KaseDevStop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []KaseDevStopOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*KaseDevStop) Close

func (ind *KaseDevStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KaseDevStop) IsReady

func (ind *KaseDevStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KaseDevStop) Name

func (ind *KaseDevStop) Name() string

Name returns the indicator's canonical name.

func (*KaseDevStop) Reset

func (ind *KaseDevStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KaseDevStop) Update

func (ind *KaseDevStop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (KaseDevStopOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*KaseDevStop) WarmupPeriod

func (ind *KaseDevStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KaseDevStopOutput

type KaseDevStopOutput struct {
	Value     float64
	Direction float64
}

KaseDevStopOutput is the output of the KaseDevStop indicator.

type KasePermissionStochastic

type KasePermissionStochastic struct {
	// contains filtered or unexported fields
}

KasePermissionStochastic wraps the KasePermissionStochastic indicator over the Wickra C ABI.

func NewKasePermissionStochastic

func NewKasePermissionStochastic(length int, smooth int) (*KasePermissionStochastic, error)

NewKasePermissionStochastic constructs a KasePermissionStochastic. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KasePermissionStochastic) Batch

func (ind *KasePermissionStochastic) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []KasePermissionStochasticOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*KasePermissionStochastic) Close

func (ind *KasePermissionStochastic) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KasePermissionStochastic) IsReady

func (ind *KasePermissionStochastic) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KasePermissionStochastic) Name

func (ind *KasePermissionStochastic) Name() string

Name returns the indicator's canonical name.

func (*KasePermissionStochastic) Reset

func (ind *KasePermissionStochastic) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KasePermissionStochastic) Update

func (ind *KasePermissionStochastic) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (KasePermissionStochasticOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*KasePermissionStochastic) WarmupPeriod

func (ind *KasePermissionStochastic) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KasePermissionStochasticOutput

type KasePermissionStochasticOutput struct {
	Fast float64
	Slow float64
}

KasePermissionStochasticOutput is the output of the KasePermissionStochastic indicator.

type KellyCriterion

type KellyCriterion struct {
	// contains filtered or unexported fields
}

KellyCriterion wraps the KellyCriterion indicator over the Wickra C ABI.

func NewKellyCriterion

func NewKellyCriterion(period int) (*KellyCriterion, error)

NewKellyCriterion constructs a KellyCriterion. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KellyCriterion) Batch

func (ind *KellyCriterion) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*KellyCriterion) BatchFast

func (ind *KellyCriterion) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*KellyCriterion) BatchFastInto

func (ind *KellyCriterion) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KellyCriterion) BatchInto

func (ind *KellyCriterion) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KellyCriterion) Close

func (ind *KellyCriterion) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KellyCriterion) IsReady

func (ind *KellyCriterion) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KellyCriterion) Name

func (ind *KellyCriterion) Name() string

Name returns the indicator's canonical name.

func (*KellyCriterion) Reset

func (ind *KellyCriterion) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KellyCriterion) Update

func (ind *KellyCriterion) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*KellyCriterion) WarmupPeriod

func (ind *KellyCriterion) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Keltner

type Keltner struct {
	// contains filtered or unexported fields
}

Keltner wraps the Keltner indicator over the Wickra C ABI.

func NewKeltner

func NewKeltner(emaPeriod int, atrPeriod int, multiplier float64) (*Keltner, error)

NewKeltner constructs a Keltner. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Keltner) Batch

func (ind *Keltner) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []KeltnerOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Keltner) Close

func (ind *Keltner) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Keltner) IsReady

func (ind *Keltner) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Keltner) Name

func (ind *Keltner) Name() string

Name returns the indicator's canonical name.

func (*Keltner) Reset

func (ind *Keltner) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Keltner) Update

func (ind *Keltner) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (KeltnerOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Keltner) WarmupPeriod

func (ind *Keltner) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KeltnerOutput

type KeltnerOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

KeltnerOutput is the output of the Keltner indicator.

type KendallTau

type KendallTau struct {
	// contains filtered or unexported fields
}

KendallTau wraps the KendallTau indicator over the Wickra C ABI.

func NewKendallTau

func NewKendallTau(period int) (*KendallTau, error)

NewKendallTau constructs a KendallTau. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KendallTau) Batch

func (ind *KendallTau) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*KendallTau) BatchInto

func (ind *KendallTau) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KendallTau) Close

func (ind *KendallTau) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KendallTau) IsReady

func (ind *KendallTau) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KendallTau) Name

func (ind *KendallTau) Name() string

Name returns the indicator's canonical name.

func (*KendallTau) Reset

func (ind *KendallTau) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KendallTau) Update

func (ind *KendallTau) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*KendallTau) WarmupPeriod

func (ind *KendallTau) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Kicking

type Kicking struct {
	// contains filtered or unexported fields
}

Kicking wraps the Kicking indicator over the Wickra C ABI.

func NewKicking

func NewKicking() (*Kicking, error)

NewKicking constructs a Kicking. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Kicking) Batch

func (ind *Kicking) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Kicking) BatchInto

func (ind *Kicking) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kicking) Close

func (ind *Kicking) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Kicking) IsReady

func (ind *Kicking) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Kicking) Name

func (ind *Kicking) Name() string

Name returns the indicator's canonical name.

func (*Kicking) Reset

func (ind *Kicking) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Kicking) Update

func (ind *Kicking) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Kicking) WarmupPeriod

func (ind *Kicking) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KickingByLength

type KickingByLength struct {
	// contains filtered or unexported fields
}

KickingByLength wraps the KickingByLength indicator over the Wickra C ABI.

func NewKickingByLength

func NewKickingByLength() (*KickingByLength, error)

NewKickingByLength constructs a KickingByLength. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KickingByLength) Batch

func (ind *KickingByLength) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*KickingByLength) BatchInto

func (ind *KickingByLength) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KickingByLength) Close

func (ind *KickingByLength) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KickingByLength) IsReady

func (ind *KickingByLength) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KickingByLength) Name

func (ind *KickingByLength) Name() string

Name returns the indicator's canonical name.

func (*KickingByLength) Reset

func (ind *KickingByLength) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KickingByLength) Update

func (ind *KickingByLength) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*KickingByLength) WarmupPeriod

func (ind *KickingByLength) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KlineEvent

type KlineEvent struct {
	Symbol   string
	Open     float64
	High     float64
	Low      float64
	Close    float64
	Volume   float64
	OpenTime int64
	IsClosed bool
}

KlineEvent is one event from the live Binance feed.

type Kst

type Kst struct {
	// contains filtered or unexported fields
}

Kst wraps the Kst indicator over the Wickra C ABI.

func NewKst

func NewKst(roc1 int, roc2 int, roc3 int, roc4 int, sma1 int, sma2 int, sma3 int, sma4 int, signal int) (*Kst, error)

NewKst constructs a Kst. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Kst) Batch

func (ind *Kst) Batch(input []float64) []KstOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Kst) Close

func (ind *Kst) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Kst) IsReady

func (ind *Kst) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Kst) Name

func (ind *Kst) Name() string

Name returns the indicator's canonical name.

func (*Kst) Reset

func (ind *Kst) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Kst) Update

func (ind *Kst) Update(value float64) (KstOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Kst) WarmupPeriod

func (ind *Kst) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KstOutput

type KstOutput struct {
	Kst    float64
	Signal float64
}

KstOutput is the output of the Kst indicator.

type Kurtosis

type Kurtosis struct {
	// contains filtered or unexported fields
}

Kurtosis wraps the Kurtosis indicator over the Wickra C ABI.

func NewKurtosis

func NewKurtosis(period int) (*Kurtosis, error)

NewKurtosis constructs a Kurtosis. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Kurtosis) Batch

func (ind *Kurtosis) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Kurtosis) BatchFast

func (ind *Kurtosis) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Kurtosis) BatchFastInto

func (ind *Kurtosis) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kurtosis) BatchInto

func (ind *Kurtosis) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kurtosis) Close

func (ind *Kurtosis) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Kurtosis) IsReady

func (ind *Kurtosis) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Kurtosis) Name

func (ind *Kurtosis) Name() string

Name returns the indicator's canonical name.

func (*Kurtosis) Reset

func (ind *Kurtosis) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Kurtosis) Update

func (ind *Kurtosis) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Kurtosis) WarmupPeriod

func (ind *Kurtosis) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Kvo

type Kvo struct {
	// contains filtered or unexported fields
}

Kvo wraps the Kvo indicator over the Wickra C ABI.

func NewKvo

func NewKvo(fast int, slow int) (*Kvo, error)

NewKvo constructs a Kvo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Kvo) Batch

func (ind *Kvo) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Kvo) BatchInto

func (ind *Kvo) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Kvo) Close

func (ind *Kvo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Kvo) IsReady

func (ind *Kvo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Kvo) Name

func (ind *Kvo) Name() string

Name returns the indicator's canonical name.

func (*Kvo) Reset

func (ind *Kvo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Kvo) Update

func (ind *Kvo) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Kvo) WarmupPeriod

func (ind *Kvo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type KylesLambda

type KylesLambda struct {
	// contains filtered or unexported fields
}

KylesLambda wraps the KylesLambda indicator over the Wickra C ABI.

func NewKylesLambda

func NewKylesLambda(window int) (*KylesLambda, error)

NewKylesLambda constructs a KylesLambda. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*KylesLambda) Batch

func (ind *KylesLambda) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64, mid []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*KylesLambda) BatchInto

func (ind *KylesLambda) BatchInto(dst []float64, price []float64, size []float64, isBuy []bool, timestamp []int64, mid []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*KylesLambda) Close

func (ind *KylesLambda) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*KylesLambda) IsReady

func (ind *KylesLambda) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*KylesLambda) Name

func (ind *KylesLambda) Name() string

Name returns the indicator's canonical name.

func (*KylesLambda) Reset

func (ind *KylesLambda) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*KylesLambda) Update

func (ind *KylesLambda) Update(price float64, size float64, isBuy bool, timestamp int64, mid float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*KylesLambda) WarmupPeriod

func (ind *KylesLambda) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LadderBottom

type LadderBottom struct {
	// contains filtered or unexported fields
}

LadderBottom wraps the LadderBottom indicator over the Wickra C ABI.

func NewLadderBottom

func NewLadderBottom() (*LadderBottom, error)

NewLadderBottom constructs a LadderBottom. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LadderBottom) Batch

func (ind *LadderBottom) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LadderBottom) BatchInto

func (ind *LadderBottom) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LadderBottom) Close

func (ind *LadderBottom) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LadderBottom) IsReady

func (ind *LadderBottom) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LadderBottom) Name

func (ind *LadderBottom) Name() string

Name returns the indicator's canonical name.

func (*LadderBottom) Reset

func (ind *LadderBottom) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LadderBottom) Update

func (ind *LadderBottom) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LadderBottom) WarmupPeriod

func (ind *LadderBottom) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LaguerreRsi

type LaguerreRsi struct {
	// contains filtered or unexported fields
}

LaguerreRsi wraps the LaguerreRsi indicator over the Wickra C ABI.

func NewLaguerreRsi

func NewLaguerreRsi(gamma float64) (*LaguerreRsi, error)

NewLaguerreRsi constructs a LaguerreRsi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LaguerreRsi) Batch

func (ind *LaguerreRsi) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LaguerreRsi) BatchFast

func (ind *LaguerreRsi) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LaguerreRsi) BatchFastInto

func (ind *LaguerreRsi) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LaguerreRsi) BatchInto

func (ind *LaguerreRsi) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LaguerreRsi) Close

func (ind *LaguerreRsi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LaguerreRsi) IsReady

func (ind *LaguerreRsi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LaguerreRsi) Name

func (ind *LaguerreRsi) Name() string

Name returns the indicator's canonical name.

func (*LaguerreRsi) Reset

func (ind *LaguerreRsi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LaguerreRsi) Update

func (ind *LaguerreRsi) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LaguerreRsi) WarmupPeriod

func (ind *LaguerreRsi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LeadLagCrossCorrelation

type LeadLagCrossCorrelation struct {
	// contains filtered or unexported fields
}

LeadLagCrossCorrelation wraps the LeadLagCrossCorrelation indicator over the Wickra C ABI.

func NewLeadLagCrossCorrelation

func NewLeadLagCrossCorrelation(window int, maxLag int) (*LeadLagCrossCorrelation, error)

NewLeadLagCrossCorrelation constructs a LeadLagCrossCorrelation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LeadLagCrossCorrelation) Batch

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*LeadLagCrossCorrelation) Close

func (ind *LeadLagCrossCorrelation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LeadLagCrossCorrelation) IsReady

func (ind *LeadLagCrossCorrelation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LeadLagCrossCorrelation) Name

func (ind *LeadLagCrossCorrelation) Name() string

Name returns the indicator's canonical name.

func (*LeadLagCrossCorrelation) Reset

func (ind *LeadLagCrossCorrelation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LeadLagCrossCorrelation) Update

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*LeadLagCrossCorrelation) WarmupPeriod

func (ind *LeadLagCrossCorrelation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LeadLagCrossCorrelationOutput

type LeadLagCrossCorrelationOutput struct {
	Lag         float64
	Correlation float64
}

LeadLagCrossCorrelationOutput is the output of the LeadLagCrossCorrelation indicator.

type LinRegAngle

type LinRegAngle struct {
	// contains filtered or unexported fields
}

LinRegAngle wraps the LinRegAngle indicator over the Wickra C ABI.

func NewLinRegAngle

func NewLinRegAngle(period int) (*LinRegAngle, error)

NewLinRegAngle constructs a LinRegAngle. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LinRegAngle) Batch

func (ind *LinRegAngle) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LinRegAngle) BatchFast

func (ind *LinRegAngle) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LinRegAngle) BatchFastInto

func (ind *LinRegAngle) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegAngle) BatchInto

func (ind *LinRegAngle) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegAngle) Close

func (ind *LinRegAngle) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LinRegAngle) IsReady

func (ind *LinRegAngle) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LinRegAngle) Name

func (ind *LinRegAngle) Name() string

Name returns the indicator's canonical name.

func (*LinRegAngle) Reset

func (ind *LinRegAngle) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LinRegAngle) Update

func (ind *LinRegAngle) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LinRegAngle) WarmupPeriod

func (ind *LinRegAngle) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LinRegChannel

type LinRegChannel struct {
	// contains filtered or unexported fields
}

LinRegChannel wraps the LinRegChannel indicator over the Wickra C ABI.

func NewLinRegChannel

func NewLinRegChannel(period int, multiplier float64) (*LinRegChannel, error)

NewLinRegChannel constructs a LinRegChannel. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LinRegChannel) Batch

func (ind *LinRegChannel) Batch(input []float64) []LinRegChannelOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*LinRegChannel) Close

func (ind *LinRegChannel) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LinRegChannel) IsReady

func (ind *LinRegChannel) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LinRegChannel) Name

func (ind *LinRegChannel) Name() string

Name returns the indicator's canonical name.

func (*LinRegChannel) Reset

func (ind *LinRegChannel) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LinRegChannel) Update

func (ind *LinRegChannel) Update(value float64) (LinRegChannelOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*LinRegChannel) WarmupPeriod

func (ind *LinRegChannel) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LinRegChannelOutput

type LinRegChannelOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

LinRegChannelOutput is the output of the LinRegChannel indicator.

type LinRegIntercept

type LinRegIntercept struct {
	// contains filtered or unexported fields
}

LinRegIntercept wraps the LinRegIntercept indicator over the Wickra C ABI.

func NewLinRegIntercept

func NewLinRegIntercept(period int) (*LinRegIntercept, error)

NewLinRegIntercept constructs a LinRegIntercept. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LinRegIntercept) Batch

func (ind *LinRegIntercept) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LinRegIntercept) BatchFast

func (ind *LinRegIntercept) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LinRegIntercept) BatchFastInto

func (ind *LinRegIntercept) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegIntercept) BatchInto

func (ind *LinRegIntercept) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegIntercept) Close

func (ind *LinRegIntercept) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LinRegIntercept) IsReady

func (ind *LinRegIntercept) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LinRegIntercept) Name

func (ind *LinRegIntercept) Name() string

Name returns the indicator's canonical name.

func (*LinRegIntercept) Reset

func (ind *LinRegIntercept) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LinRegIntercept) Update

func (ind *LinRegIntercept) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LinRegIntercept) WarmupPeriod

func (ind *LinRegIntercept) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LinRegSlope

type LinRegSlope struct {
	// contains filtered or unexported fields
}

LinRegSlope wraps the LinRegSlope indicator over the Wickra C ABI.

func NewLinRegSlope

func NewLinRegSlope(period int) (*LinRegSlope, error)

NewLinRegSlope constructs a LinRegSlope. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LinRegSlope) Batch

func (ind *LinRegSlope) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LinRegSlope) BatchFast

func (ind *LinRegSlope) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LinRegSlope) BatchFastInto

func (ind *LinRegSlope) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegSlope) BatchInto

func (ind *LinRegSlope) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinRegSlope) Close

func (ind *LinRegSlope) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LinRegSlope) IsReady

func (ind *LinRegSlope) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LinRegSlope) Name

func (ind *LinRegSlope) Name() string

Name returns the indicator's canonical name.

func (*LinRegSlope) Reset

func (ind *LinRegSlope) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LinRegSlope) Update

func (ind *LinRegSlope) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LinRegSlope) WarmupPeriod

func (ind *LinRegSlope) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LineBreakBar

type LineBreakBar struct {
	Open      float64
	Close     float64
	Direction int8
}

LineBreakBar is the output of the LineBreakBar indicator.

type LinearRegression

type LinearRegression struct {
	// contains filtered or unexported fields
}

LinearRegression wraps the LinearRegression indicator over the Wickra C ABI.

func NewLinearRegression

func NewLinearRegression(period int) (*LinearRegression, error)

NewLinearRegression constructs a LinearRegression. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LinearRegression) Batch

func (ind *LinearRegression) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LinearRegression) BatchFast

func (ind *LinearRegression) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LinearRegression) BatchFastInto

func (ind *LinearRegression) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinearRegression) BatchInto

func (ind *LinearRegression) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LinearRegression) Close

func (ind *LinearRegression) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LinearRegression) IsReady

func (ind *LinearRegression) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LinearRegression) Name

func (ind *LinearRegression) Name() string

Name returns the indicator's canonical name.

func (*LinearRegression) Reset

func (ind *LinearRegression) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LinearRegression) Update

func (ind *LinearRegression) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LinearRegression) WarmupPeriod

func (ind *LinearRegression) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LiquidationFeatures

type LiquidationFeatures struct {
	// contains filtered or unexported fields
}

LiquidationFeatures wraps the LiquidationFeatures indicator over the Wickra C ABI.

func NewLiquidationFeatures

func NewLiquidationFeatures() (*LiquidationFeatures, error)

NewLiquidationFeatures constructs a LiquidationFeatures. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LiquidationFeatures) Batch

func (ind *LiquidationFeatures) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []LiquidationFeaturesOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*LiquidationFeatures) Close

func (ind *LiquidationFeatures) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LiquidationFeatures) IsReady

func (ind *LiquidationFeatures) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LiquidationFeatures) Name

func (ind *LiquidationFeatures) Name() string

Name returns the indicator's canonical name.

func (*LiquidationFeatures) Reset

func (ind *LiquidationFeatures) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LiquidationFeatures) Update

func (ind *LiquidationFeatures) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) (LiquidationFeaturesOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*LiquidationFeatures) WarmupPeriod

func (ind *LiquidationFeatures) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LiquidationFeaturesOutput

type LiquidationFeaturesOutput struct {
	Long      float64
	Short     float64
	Net       float64
	Total     float64
	Imbalance float64
}

LiquidationFeaturesOutput is the output of the LiquidationFeatures indicator.

type LogReturn

type LogReturn struct {
	// contains filtered or unexported fields
}

LogReturn wraps the LogReturn indicator over the Wickra C ABI.

func NewLogReturn

func NewLogReturn(period int) (*LogReturn, error)

NewLogReturn constructs a LogReturn. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LogReturn) Batch

func (ind *LogReturn) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LogReturn) BatchFast

func (ind *LogReturn) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*LogReturn) BatchFastInto

func (ind *LogReturn) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LogReturn) BatchInto

func (ind *LogReturn) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LogReturn) Close

func (ind *LogReturn) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LogReturn) IsReady

func (ind *LogReturn) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LogReturn) Name

func (ind *LogReturn) Name() string

Name returns the indicator's canonical name.

func (*LogReturn) Reset

func (ind *LogReturn) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LogReturn) Update

func (ind *LogReturn) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LogReturn) WarmupPeriod

func (ind *LogReturn) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LongLeggedDoji

type LongLeggedDoji struct {
	// contains filtered or unexported fields
}

LongLeggedDoji wraps the LongLeggedDoji indicator over the Wickra C ABI.

func NewLongLeggedDoji

func NewLongLeggedDoji() (*LongLeggedDoji, error)

NewLongLeggedDoji constructs a LongLeggedDoji. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LongLeggedDoji) Batch

func (ind *LongLeggedDoji) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LongLeggedDoji) BatchInto

func (ind *LongLeggedDoji) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LongLeggedDoji) Close

func (ind *LongLeggedDoji) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LongLeggedDoji) IsReady

func (ind *LongLeggedDoji) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LongLeggedDoji) Name

func (ind *LongLeggedDoji) Name() string

Name returns the indicator's canonical name.

func (*LongLeggedDoji) Reset

func (ind *LongLeggedDoji) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LongLeggedDoji) Update

func (ind *LongLeggedDoji) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LongLeggedDoji) WarmupPeriod

func (ind *LongLeggedDoji) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LongLine

type LongLine struct {
	// contains filtered or unexported fields
}

LongLine wraps the LongLine indicator over the Wickra C ABI.

func NewLongLine

func NewLongLine() (*LongLine, error)

NewLongLine constructs a LongLine. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LongLine) Batch

func (ind *LongLine) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LongLine) BatchInto

func (ind *LongLine) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LongLine) Close

func (ind *LongLine) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LongLine) IsReady

func (ind *LongLine) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LongLine) Name

func (ind *LongLine) Name() string

Name returns the indicator's canonical name.

func (*LongLine) Reset

func (ind *LongLine) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LongLine) Update

func (ind *LongLine) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LongLine) WarmupPeriod

func (ind *LongLine) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type LongShortRatio

type LongShortRatio struct {
	// contains filtered or unexported fields
}

LongShortRatio wraps the LongShortRatio indicator over the Wickra C ABI.

func NewLongShortRatio

func NewLongShortRatio() (*LongShortRatio, error)

NewLongShortRatio constructs a LongShortRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*LongShortRatio) Batch

func (ind *LongShortRatio) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*LongShortRatio) BatchInto

func (ind *LongShortRatio) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*LongShortRatio) Close

func (ind *LongShortRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*LongShortRatio) IsReady

func (ind *LongShortRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*LongShortRatio) Name

func (ind *LongShortRatio) Name() string

Name returns the indicator's canonical name.

func (*LongShortRatio) Reset

func (ind *LongShortRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*LongShortRatio) Update

func (ind *LongShortRatio) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*LongShortRatio) WarmupPeriod

func (ind *LongShortRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type M2Measure

type M2Measure struct {
	// contains filtered or unexported fields
}

M2Measure wraps the M2Measure indicator over the Wickra C ABI.

func NewM2Measure

func NewM2Measure(period int, riskFree float64, benchmarkStddev float64) (*M2Measure, error)

NewM2Measure constructs a M2Measure. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*M2Measure) Batch

func (ind *M2Measure) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*M2Measure) BatchFast

func (ind *M2Measure) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*M2Measure) BatchFastInto

func (ind *M2Measure) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*M2Measure) BatchInto

func (ind *M2Measure) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*M2Measure) Close

func (ind *M2Measure) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*M2Measure) IsReady

func (ind *M2Measure) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*M2Measure) Name

func (ind *M2Measure) Name() string

Name returns the indicator's canonical name.

func (*M2Measure) Reset

func (ind *M2Measure) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*M2Measure) Update

func (ind *M2Measure) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*M2Measure) WarmupPeriod

func (ind *M2Measure) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MaEnvelope

type MaEnvelope struct {
	// contains filtered or unexported fields
}

MaEnvelope wraps the MaEnvelope indicator over the Wickra C ABI.

func NewMaEnvelope

func NewMaEnvelope(period int, percent float64) (*MaEnvelope, error)

NewMaEnvelope constructs a MaEnvelope. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MaEnvelope) Batch

func (ind *MaEnvelope) Batch(input []float64) []MaEnvelopeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MaEnvelope) Close

func (ind *MaEnvelope) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MaEnvelope) IsReady

func (ind *MaEnvelope) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MaEnvelope) Name

func (ind *MaEnvelope) Name() string

Name returns the indicator's canonical name.

func (*MaEnvelope) Reset

func (ind *MaEnvelope) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MaEnvelope) Update

func (ind *MaEnvelope) Update(value float64) (MaEnvelopeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MaEnvelope) WarmupPeriod

func (ind *MaEnvelope) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MaEnvelopeOutput

type MaEnvelopeOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

MaEnvelopeOutput is the output of the MaEnvelope indicator.

type MacdExt

type MacdExt struct {
	// contains filtered or unexported fields
}

MacdExt wraps the MacdExt indicator over the Wickra C ABI.

func NewMacdExt

func NewMacdExt(fast int, fastType uint8, slow int, slowType uint8, signal int, signalType uint8) (*MacdExt, error)

NewMacdExt constructs a MacdExt. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MacdExt) Batch

func (ind *MacdExt) Batch(input []float64) []MacdOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MacdExt) Close

func (ind *MacdExt) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MacdExt) IsReady

func (ind *MacdExt) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MacdExt) Name

func (ind *MacdExt) Name() string

Name returns the indicator's canonical name.

func (*MacdExt) Reset

func (ind *MacdExt) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MacdExt) Update

func (ind *MacdExt) Update(value float64) (MacdOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MacdExt) WarmupPeriod

func (ind *MacdExt) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MacdFix

type MacdFix struct {
	// contains filtered or unexported fields
}

MacdFix wraps the MacdFix indicator over the Wickra C ABI.

func NewMacdFix

func NewMacdFix(signal int) (*MacdFix, error)

NewMacdFix constructs a MacdFix. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MacdFix) Batch

func (ind *MacdFix) Batch(input []float64) []MacdOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MacdFix) BatchFast

func (ind *MacdFix) BatchFast(input []float64) []MacdOutput

BatchFast is the opt-in fast batch: the SIMD kernel reassociates the arithmetic, so each field agrees with Batch to within a few units in the last place rather than bit for bit; warmup rows and length are identical, and the result is the same on every platform.

func (*MacdFix) Close

func (ind *MacdFix) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MacdFix) IsReady

func (ind *MacdFix) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MacdFix) Name

func (ind *MacdFix) Name() string

Name returns the indicator's canonical name.

func (*MacdFix) Reset

func (ind *MacdFix) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MacdFix) Update

func (ind *MacdFix) Update(value float64) (MacdOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MacdFix) WarmupPeriod

func (ind *MacdFix) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MacdHistogram

type MacdHistogram struct {
	// contains filtered or unexported fields
}

MacdHistogram wraps the MacdHistogram indicator over the Wickra C ABI.

func NewMacdHistogram

func NewMacdHistogram(fast int, slow int, signal int) (*MacdHistogram, error)

NewMacdHistogram constructs a MacdHistogram. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MacdHistogram) Batch

func (ind *MacdHistogram) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MacdHistogram) BatchFast

func (ind *MacdHistogram) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MacdHistogram) BatchFastInto

func (ind *MacdHistogram) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MacdHistogram) BatchInto

func (ind *MacdHistogram) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MacdHistogram) Close

func (ind *MacdHistogram) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MacdHistogram) IsReady

func (ind *MacdHistogram) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MacdHistogram) Name

func (ind *MacdHistogram) Name() string

Name returns the indicator's canonical name.

func (*MacdHistogram) Reset

func (ind *MacdHistogram) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MacdHistogram) Update

func (ind *MacdHistogram) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MacdHistogram) WarmupPeriod

func (ind *MacdHistogram) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MacdIndicator

type MacdIndicator struct {
	// contains filtered or unexported fields
}

MacdIndicator wraps the MacdIndicator indicator over the Wickra C ABI.

func NewMacdIndicator

func NewMacdIndicator(fast int, slow int, signal int) (*MacdIndicator, error)

NewMacdIndicator constructs a MacdIndicator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MacdIndicator) Batch

func (ind *MacdIndicator) Batch(input []float64) []MacdOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MacdIndicator) BatchFast

func (ind *MacdIndicator) BatchFast(input []float64) []MacdOutput

BatchFast is the opt-in fast batch: the SIMD kernel reassociates the arithmetic, so each field agrees with Batch to within a few units in the last place rather than bit for bit; warmup rows and length are identical, and the result is the same on every platform.

func (*MacdIndicator) Close

func (ind *MacdIndicator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MacdIndicator) IsReady

func (ind *MacdIndicator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MacdIndicator) Name

func (ind *MacdIndicator) Name() string

Name returns the indicator's canonical name.

func (*MacdIndicator) Reset

func (ind *MacdIndicator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MacdIndicator) Update

func (ind *MacdIndicator) Update(value float64) (MacdOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MacdIndicator) WarmupPeriod

func (ind *MacdIndicator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MacdOutput

type MacdOutput struct {
	Macd      float64
	Signal    float64
	Histogram float64
}

MacdOutput is the output of the Macd indicator.

type Mama

type Mama struct {
	// contains filtered or unexported fields
}

Mama wraps the Mama indicator over the Wickra C ABI.

func NewMama

func NewMama(fastLimit float64, slowLimit float64) (*Mama, error)

NewMama constructs a Mama. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Mama) Batch

func (ind *Mama) Batch(input []float64) []MamaOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Mama) Close

func (ind *Mama) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Mama) IsReady

func (ind *Mama) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Mama) Name

func (ind *Mama) Name() string

Name returns the indicator's canonical name.

func (*Mama) Reset

func (ind *Mama) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Mama) Update

func (ind *Mama) Update(value float64) (MamaOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Mama) WarmupPeriod

func (ind *Mama) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MamaOutput

type MamaOutput struct {
	Mama float64
	Fama float64
}

MamaOutput is the output of the Mama indicator.

type MarketFacilitationIndex

type MarketFacilitationIndex struct {
	// contains filtered or unexported fields
}

MarketFacilitationIndex wraps the MarketFacilitationIndex indicator over the Wickra C ABI.

func NewMarketFacilitationIndex

func NewMarketFacilitationIndex() (*MarketFacilitationIndex, error)

NewMarketFacilitationIndex constructs a MarketFacilitationIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MarketFacilitationIndex) Batch

func (ind *MarketFacilitationIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MarketFacilitationIndex) BatchInto

func (ind *MarketFacilitationIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MarketFacilitationIndex) Close

func (ind *MarketFacilitationIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MarketFacilitationIndex) IsReady

func (ind *MarketFacilitationIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MarketFacilitationIndex) Name

func (ind *MarketFacilitationIndex) Name() string

Name returns the indicator's canonical name.

func (*MarketFacilitationIndex) Reset

func (ind *MarketFacilitationIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MarketFacilitationIndex) Update

func (ind *MarketFacilitationIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MarketFacilitationIndex) WarmupPeriod

func (ind *MarketFacilitationIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MartinRatio

type MartinRatio struct {
	// contains filtered or unexported fields
}

MartinRatio wraps the MartinRatio indicator over the Wickra C ABI.

func NewMartinRatio

func NewMartinRatio(period int) (*MartinRatio, error)

NewMartinRatio constructs a MartinRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MartinRatio) Batch

func (ind *MartinRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MartinRatio) BatchFast

func (ind *MartinRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MartinRatio) BatchFastInto

func (ind *MartinRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MartinRatio) BatchInto

func (ind *MartinRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MartinRatio) Close

func (ind *MartinRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MartinRatio) IsReady

func (ind *MartinRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MartinRatio) Name

func (ind *MartinRatio) Name() string

Name returns the indicator's canonical name.

func (*MartinRatio) Reset

func (ind *MartinRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MartinRatio) Update

func (ind *MartinRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MartinRatio) WarmupPeriod

func (ind *MartinRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Marubozu

type Marubozu struct {
	// contains filtered or unexported fields
}

Marubozu wraps the Marubozu indicator over the Wickra C ABI.

func NewMarubozu

func NewMarubozu() (*Marubozu, error)

NewMarubozu constructs a Marubozu. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Marubozu) Batch

func (ind *Marubozu) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Marubozu) BatchInto

func (ind *Marubozu) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Marubozu) Close

func (ind *Marubozu) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Marubozu) IsReady

func (ind *Marubozu) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Marubozu) Name

func (ind *Marubozu) Name() string

Name returns the indicator's canonical name.

func (*Marubozu) Reset

func (ind *Marubozu) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Marubozu) Update

func (ind *Marubozu) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Marubozu) WarmupPeriod

func (ind *Marubozu) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MassIndex

type MassIndex struct {
	// contains filtered or unexported fields
}

MassIndex wraps the MassIndex indicator over the Wickra C ABI.

func NewMassIndex

func NewMassIndex(emaPeriod int, sumPeriod int) (*MassIndex, error)

NewMassIndex constructs a MassIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MassIndex) Batch

func (ind *MassIndex) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MassIndex) BatchInto

func (ind *MassIndex) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MassIndex) Close

func (ind *MassIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MassIndex) IsReady

func (ind *MassIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MassIndex) Name

func (ind *MassIndex) Name() string

Name returns the indicator's canonical name.

func (*MassIndex) Reset

func (ind *MassIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MassIndex) Update

func (ind *MassIndex) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MassIndex) WarmupPeriod

func (ind *MassIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MatHold

type MatHold struct {
	// contains filtered or unexported fields
}

MatHold wraps the MatHold indicator over the Wickra C ABI.

func NewMatHold

func NewMatHold() (*MatHold, error)

NewMatHold constructs a MatHold. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MatHold) Batch

func (ind *MatHold) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MatHold) BatchInto

func (ind *MatHold) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MatHold) Close

func (ind *MatHold) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MatHold) IsReady

func (ind *MatHold) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MatHold) Name

func (ind *MatHold) Name() string

Name returns the indicator's canonical name.

func (*MatHold) Reset

func (ind *MatHold) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MatHold) Update

func (ind *MatHold) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MatHold) WarmupPeriod

func (ind *MatHold) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MatchingLow

type MatchingLow struct {
	// contains filtered or unexported fields
}

MatchingLow wraps the MatchingLow indicator over the Wickra C ABI.

func NewMatchingLow

func NewMatchingLow() (*MatchingLow, error)

NewMatchingLow constructs a MatchingLow. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MatchingLow) Batch

func (ind *MatchingLow) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MatchingLow) BatchInto

func (ind *MatchingLow) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MatchingLow) Close

func (ind *MatchingLow) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MatchingLow) IsReady

func (ind *MatchingLow) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MatchingLow) Name

func (ind *MatchingLow) Name() string

Name returns the indicator's canonical name.

func (*MatchingLow) Reset

func (ind *MatchingLow) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MatchingLow) Update

func (ind *MatchingLow) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MatchingLow) WarmupPeriod

func (ind *MatchingLow) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MaxDrawdown

type MaxDrawdown struct {
	// contains filtered or unexported fields
}

MaxDrawdown wraps the MaxDrawdown indicator over the Wickra C ABI.

func NewMaxDrawdown

func NewMaxDrawdown(period int) (*MaxDrawdown, error)

NewMaxDrawdown constructs a MaxDrawdown. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MaxDrawdown) Batch

func (ind *MaxDrawdown) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MaxDrawdown) BatchFast

func (ind *MaxDrawdown) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MaxDrawdown) BatchFastInto

func (ind *MaxDrawdown) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MaxDrawdown) BatchInto

func (ind *MaxDrawdown) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MaxDrawdown) Close

func (ind *MaxDrawdown) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MaxDrawdown) IsReady

func (ind *MaxDrawdown) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MaxDrawdown) Name

func (ind *MaxDrawdown) Name() string

Name returns the indicator's canonical name.

func (*MaxDrawdown) Reset

func (ind *MaxDrawdown) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MaxDrawdown) Update

func (ind *MaxDrawdown) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MaxDrawdown) WarmupPeriod

func (ind *MaxDrawdown) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type McClellanOscillator

type McClellanOscillator struct {
	// contains filtered or unexported fields
}

McClellanOscillator wraps the McClellanOscillator indicator over the Wickra C ABI.

func NewMcClellanOscillator

func NewMcClellanOscillator() (*McClellanOscillator, error)

NewMcClellanOscillator constructs a McClellanOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*McClellanOscillator) Batch

func (ind *McClellanOscillator) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*McClellanOscillator) Close

func (ind *McClellanOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*McClellanOscillator) IsReady

func (ind *McClellanOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*McClellanOscillator) Name

func (ind *McClellanOscillator) Name() string

Name returns the indicator's canonical name.

func (*McClellanOscillator) Reset

func (ind *McClellanOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*McClellanOscillator) Update

func (ind *McClellanOscillator) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*McClellanOscillator) WarmupPeriod

func (ind *McClellanOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type McClellanSummationIndex

type McClellanSummationIndex struct {
	// contains filtered or unexported fields
}

McClellanSummationIndex wraps the McClellanSummationIndex indicator over the Wickra C ABI.

func NewMcClellanSummationIndex

func NewMcClellanSummationIndex() (*McClellanSummationIndex, error)

NewMcClellanSummationIndex constructs a McClellanSummationIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*McClellanSummationIndex) Batch

func (ind *McClellanSummationIndex) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*McClellanSummationIndex) Close

func (ind *McClellanSummationIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*McClellanSummationIndex) IsReady

func (ind *McClellanSummationIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*McClellanSummationIndex) Name

func (ind *McClellanSummationIndex) Name() string

Name returns the indicator's canonical name.

func (*McClellanSummationIndex) Reset

func (ind *McClellanSummationIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*McClellanSummationIndex) Update

func (ind *McClellanSummationIndex) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*McClellanSummationIndex) WarmupPeriod

func (ind *McClellanSummationIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type McGinleyDynamic

type McGinleyDynamic struct {
	// contains filtered or unexported fields
}

McGinleyDynamic wraps the McGinleyDynamic indicator over the Wickra C ABI.

func NewMcGinleyDynamic

func NewMcGinleyDynamic(period int) (*McGinleyDynamic, error)

NewMcGinleyDynamic constructs a McGinleyDynamic. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*McGinleyDynamic) Batch

func (ind *McGinleyDynamic) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*McGinleyDynamic) BatchFast

func (ind *McGinleyDynamic) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*McGinleyDynamic) BatchFastInto

func (ind *McGinleyDynamic) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*McGinleyDynamic) BatchInto

func (ind *McGinleyDynamic) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*McGinleyDynamic) Close

func (ind *McGinleyDynamic) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*McGinleyDynamic) IsReady

func (ind *McGinleyDynamic) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*McGinleyDynamic) Name

func (ind *McGinleyDynamic) Name() string

Name returns the indicator's canonical name.

func (*McGinleyDynamic) Reset

func (ind *McGinleyDynamic) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*McGinleyDynamic) Update

func (ind *McGinleyDynamic) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*McGinleyDynamic) WarmupPeriod

func (ind *McGinleyDynamic) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MedianAbsoluteDeviation

type MedianAbsoluteDeviation struct {
	// contains filtered or unexported fields
}

MedianAbsoluteDeviation wraps the MedianAbsoluteDeviation indicator over the Wickra C ABI.

func NewMedianAbsoluteDeviation

func NewMedianAbsoluteDeviation(period int) (*MedianAbsoluteDeviation, error)

NewMedianAbsoluteDeviation constructs a MedianAbsoluteDeviation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MedianAbsoluteDeviation) Batch

func (ind *MedianAbsoluteDeviation) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MedianAbsoluteDeviation) BatchFast

func (ind *MedianAbsoluteDeviation) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MedianAbsoluteDeviation) BatchFastInto

func (ind *MedianAbsoluteDeviation) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MedianAbsoluteDeviation) BatchInto

func (ind *MedianAbsoluteDeviation) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MedianAbsoluteDeviation) Close

func (ind *MedianAbsoluteDeviation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MedianAbsoluteDeviation) IsReady

func (ind *MedianAbsoluteDeviation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MedianAbsoluteDeviation) Name

func (ind *MedianAbsoluteDeviation) Name() string

Name returns the indicator's canonical name.

func (*MedianAbsoluteDeviation) Reset

func (ind *MedianAbsoluteDeviation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MedianAbsoluteDeviation) Update

func (ind *MedianAbsoluteDeviation) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MedianAbsoluteDeviation) WarmupPeriod

func (ind *MedianAbsoluteDeviation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MedianChannel

type MedianChannel struct {
	// contains filtered or unexported fields
}

MedianChannel wraps the MedianChannel indicator over the Wickra C ABI.

func NewMedianChannel

func NewMedianChannel(period int, multiplier float64) (*MedianChannel, error)

NewMedianChannel constructs a MedianChannel. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MedianChannel) Batch

func (ind *MedianChannel) Batch(input []float64) []MedianChannelOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MedianChannel) Close

func (ind *MedianChannel) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MedianChannel) IsReady

func (ind *MedianChannel) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MedianChannel) Name

func (ind *MedianChannel) Name() string

Name returns the indicator's canonical name.

func (*MedianChannel) Reset

func (ind *MedianChannel) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MedianChannel) Update

func (ind *MedianChannel) Update(value float64) (MedianChannelOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MedianChannel) WarmupPeriod

func (ind *MedianChannel) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MedianChannelOutput

type MedianChannelOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

MedianChannelOutput is the output of the MedianChannel indicator.

type MedianMa

type MedianMa struct {
	// contains filtered or unexported fields
}

MedianMa wraps the MedianMa indicator over the Wickra C ABI.

func NewMedianMa

func NewMedianMa(period int) (*MedianMa, error)

NewMedianMa constructs a MedianMa. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MedianMa) Batch

func (ind *MedianMa) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MedianMa) BatchFast

func (ind *MedianMa) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MedianMa) BatchFastInto

func (ind *MedianMa) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MedianMa) BatchInto

func (ind *MedianMa) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MedianMa) Close

func (ind *MedianMa) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MedianMa) IsReady

func (ind *MedianMa) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MedianMa) Name

func (ind *MedianMa) Name() string

Name returns the indicator's canonical name.

func (*MedianMa) Reset

func (ind *MedianMa) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MedianMa) Update

func (ind *MedianMa) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MedianMa) WarmupPeriod

func (ind *MedianMa) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MedianPrice

type MedianPrice struct {
	// contains filtered or unexported fields
}

MedianPrice wraps the MedianPrice indicator over the Wickra C ABI.

func NewMedianPrice

func NewMedianPrice() (*MedianPrice, error)

NewMedianPrice constructs a MedianPrice. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MedianPrice) Batch

func (ind *MedianPrice) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MedianPrice) BatchInto

func (ind *MedianPrice) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MedianPrice) Close

func (ind *MedianPrice) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MedianPrice) IsReady

func (ind *MedianPrice) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MedianPrice) Name

func (ind *MedianPrice) Name() string

Name returns the indicator's canonical name.

func (*MedianPrice) Reset

func (ind *MedianPrice) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MedianPrice) Update

func (ind *MedianPrice) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MedianPrice) WarmupPeriod

func (ind *MedianPrice) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Mfi

type Mfi struct {
	// contains filtered or unexported fields
}

Mfi wraps the Mfi indicator over the Wickra C ABI.

func NewMfi

func NewMfi(period int) (*Mfi, error)

NewMfi constructs a Mfi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Mfi) Batch

func (ind *Mfi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Mfi) BatchInto

func (ind *Mfi) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Mfi) Close

func (ind *Mfi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Mfi) IsReady

func (ind *Mfi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Mfi) Name

func (ind *Mfi) Name() string

Name returns the indicator's canonical name.

func (*Mfi) Reset

func (ind *Mfi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Mfi) Update

func (ind *Mfi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Mfi) WarmupPeriod

func (ind *Mfi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Microprice

type Microprice struct {
	// contains filtered or unexported fields
}

Microprice wraps the Microprice indicator over the Wickra C ABI.

func NewMicroprice

func NewMicroprice() (*Microprice, error)

NewMicroprice constructs a Microprice. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Microprice) Batch

func (ind *Microprice) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*Microprice) Close

func (ind *Microprice) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Microprice) IsReady

func (ind *Microprice) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Microprice) Name

func (ind *Microprice) Name() string

Name returns the indicator's canonical name.

func (*Microprice) Reset

func (ind *Microprice) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Microprice) Update

func (ind *Microprice) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*Microprice) WarmupPeriod

func (ind *Microprice) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MidPoint

type MidPoint struct {
	// contains filtered or unexported fields
}

MidPoint wraps the MidPoint indicator over the Wickra C ABI.

func NewMidPoint

func NewMidPoint(period int) (*MidPoint, error)

NewMidPoint constructs a MidPoint. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MidPoint) Batch

func (ind *MidPoint) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MidPoint) BatchFast

func (ind *MidPoint) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*MidPoint) BatchFastInto

func (ind *MidPoint) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MidPoint) BatchInto

func (ind *MidPoint) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MidPoint) Close

func (ind *MidPoint) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MidPoint) IsReady

func (ind *MidPoint) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MidPoint) Name

func (ind *MidPoint) Name() string

Name returns the indicator's canonical name.

func (*MidPoint) Reset

func (ind *MidPoint) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MidPoint) Update

func (ind *MidPoint) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MidPoint) WarmupPeriod

func (ind *MidPoint) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MidPrice

type MidPrice struct {
	// contains filtered or unexported fields
}

MidPrice wraps the MidPrice indicator over the Wickra C ABI.

func NewMidPrice

func NewMidPrice(period int) (*MidPrice, error)

NewMidPrice constructs a MidPrice. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MidPrice) Batch

func (ind *MidPrice) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MidPrice) BatchInto

func (ind *MidPrice) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MidPrice) Close

func (ind *MidPrice) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MidPrice) IsReady

func (ind *MidPrice) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MidPrice) Name

func (ind *MidPrice) Name() string

Name returns the indicator's canonical name.

func (*MidPrice) Reset

func (ind *MidPrice) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MidPrice) Update

func (ind *MidPrice) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MidPrice) WarmupPeriod

func (ind *MidPrice) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MinusDi

type MinusDi struct {
	// contains filtered or unexported fields
}

MinusDi wraps the MinusDi indicator over the Wickra C ABI.

func NewMinusDi

func NewMinusDi(period int) (*MinusDi, error)

NewMinusDi constructs a MinusDi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MinusDi) Batch

func (ind *MinusDi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MinusDi) BatchInto

func (ind *MinusDi) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MinusDi) Close

func (ind *MinusDi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MinusDi) IsReady

func (ind *MinusDi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MinusDi) Name

func (ind *MinusDi) Name() string

Name returns the indicator's canonical name.

func (*MinusDi) Reset

func (ind *MinusDi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MinusDi) Update

func (ind *MinusDi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MinusDi) WarmupPeriod

func (ind *MinusDi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MinusDm

type MinusDm struct {
	// contains filtered or unexported fields
}

MinusDm wraps the MinusDm indicator over the Wickra C ABI.

func NewMinusDm

func NewMinusDm(period int) (*MinusDm, error)

NewMinusDm constructs a MinusDm. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MinusDm) Batch

func (ind *MinusDm) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MinusDm) BatchInto

func (ind *MinusDm) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MinusDm) Close

func (ind *MinusDm) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MinusDm) IsReady

func (ind *MinusDm) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MinusDm) Name

func (ind *MinusDm) Name() string

Name returns the indicator's canonical name.

func (*MinusDm) Reset

func (ind *MinusDm) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MinusDm) Update

func (ind *MinusDm) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MinusDm) WarmupPeriod

func (ind *MinusDm) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ModifiedMaStop

type ModifiedMaStop struct {
	// contains filtered or unexported fields
}

ModifiedMaStop wraps the ModifiedMaStop indicator over the Wickra C ABI.

func NewModifiedMaStop

func NewModifiedMaStop(period int) (*ModifiedMaStop, error)

NewModifiedMaStop constructs a ModifiedMaStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ModifiedMaStop) Batch

func (ind *ModifiedMaStop) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ModifiedMaStopOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ModifiedMaStop) Close

func (ind *ModifiedMaStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ModifiedMaStop) IsReady

func (ind *ModifiedMaStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ModifiedMaStop) Name

func (ind *ModifiedMaStop) Name() string

Name returns the indicator's canonical name.

func (*ModifiedMaStop) Reset

func (ind *ModifiedMaStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ModifiedMaStop) Update

func (ind *ModifiedMaStop) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ModifiedMaStopOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ModifiedMaStop) WarmupPeriod

func (ind *ModifiedMaStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ModifiedMaStopOutput

type ModifiedMaStopOutput struct {
	Value     float64
	Direction float64
}

ModifiedMaStopOutput is the output of the ModifiedMaStop indicator.

type Mom

type Mom struct {
	// contains filtered or unexported fields
}

Mom wraps the Mom indicator over the Wickra C ABI.

func NewMom

func NewMom(period int) (*Mom, error)

NewMom constructs a Mom. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Mom) Batch

func (ind *Mom) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Mom) BatchFast

func (ind *Mom) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Mom) BatchFastInto

func (ind *Mom) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Mom) BatchInto

func (ind *Mom) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Mom) Close

func (ind *Mom) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Mom) IsReady

func (ind *Mom) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Mom) Name

func (ind *Mom) Name() string

Name returns the indicator's canonical name.

func (*Mom) Reset

func (ind *Mom) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Mom) Update

func (ind *Mom) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Mom) WarmupPeriod

func (ind *Mom) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MorningDojiStar

type MorningDojiStar struct {
	// contains filtered or unexported fields
}

MorningDojiStar wraps the MorningDojiStar indicator over the Wickra C ABI.

func NewMorningDojiStar

func NewMorningDojiStar() (*MorningDojiStar, error)

NewMorningDojiStar constructs a MorningDojiStar. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MorningDojiStar) Batch

func (ind *MorningDojiStar) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MorningDojiStar) BatchInto

func (ind *MorningDojiStar) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MorningDojiStar) Close

func (ind *MorningDojiStar) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MorningDojiStar) IsReady

func (ind *MorningDojiStar) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MorningDojiStar) Name

func (ind *MorningDojiStar) Name() string

Name returns the indicator's canonical name.

func (*MorningDojiStar) Reset

func (ind *MorningDojiStar) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MorningDojiStar) Update

func (ind *MorningDojiStar) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MorningDojiStar) WarmupPeriod

func (ind *MorningDojiStar) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MorningEveningStar

type MorningEveningStar struct {
	// contains filtered or unexported fields
}

MorningEveningStar wraps the MorningEveningStar indicator over the Wickra C ABI.

func NewMorningEveningStar

func NewMorningEveningStar() (*MorningEveningStar, error)

NewMorningEveningStar constructs a MorningEveningStar. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MorningEveningStar) Batch

func (ind *MorningEveningStar) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*MorningEveningStar) BatchInto

func (ind *MorningEveningStar) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*MorningEveningStar) Close

func (ind *MorningEveningStar) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MorningEveningStar) IsReady

func (ind *MorningEveningStar) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MorningEveningStar) Name

func (ind *MorningEveningStar) Name() string

Name returns the indicator's canonical name.

func (*MorningEveningStar) Reset

func (ind *MorningEveningStar) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MorningEveningStar) Update

func (ind *MorningEveningStar) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*MorningEveningStar) WarmupPeriod

func (ind *MorningEveningStar) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MurreyMathLines

type MurreyMathLines struct {
	// contains filtered or unexported fields
}

MurreyMathLines wraps the MurreyMathLines indicator over the Wickra C ABI.

func NewMurreyMathLines

func NewMurreyMathLines(period int) (*MurreyMathLines, error)

NewMurreyMathLines constructs a MurreyMathLines. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*MurreyMathLines) Batch

func (ind *MurreyMathLines) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []MurreyMathLinesOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*MurreyMathLines) Close

func (ind *MurreyMathLines) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*MurreyMathLines) IsReady

func (ind *MurreyMathLines) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*MurreyMathLines) Name

func (ind *MurreyMathLines) Name() string

Name returns the indicator's canonical name.

func (*MurreyMathLines) Reset

func (ind *MurreyMathLines) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*MurreyMathLines) Update

func (ind *MurreyMathLines) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (MurreyMathLinesOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*MurreyMathLines) WarmupPeriod

func (ind *MurreyMathLines) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type MurreyMathLinesOutput

type MurreyMathLinesOutput struct {
	Mm88 float64
	Mm78 float64
	Mm68 float64
	Mm58 float64
	Mm48 float64
	Mm38 float64
	Mm28 float64
	Mm18 float64
	Mm08 float64
}

MurreyMathLinesOutput is the output of the MurreyMathLines indicator.

type NakedPoc

type NakedPoc struct {
	// contains filtered or unexported fields
}

NakedPoc wraps the NakedPoc indicator over the Wickra C ABI.

func NewNakedPoc

func NewNakedPoc(sessionLen int, bins int) (*NakedPoc, error)

NewNakedPoc constructs a NakedPoc. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*NakedPoc) Batch

func (ind *NakedPoc) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*NakedPoc) BatchInto

func (ind *NakedPoc) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*NakedPoc) Close

func (ind *NakedPoc) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*NakedPoc) IsReady

func (ind *NakedPoc) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*NakedPoc) Name

func (ind *NakedPoc) Name() string

Name returns the indicator's canonical name.

func (*NakedPoc) Reset

func (ind *NakedPoc) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*NakedPoc) Update

func (ind *NakedPoc) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*NakedPoc) WarmupPeriod

func (ind *NakedPoc) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Natr

type Natr struct {
	// contains filtered or unexported fields
}

Natr wraps the Natr indicator over the Wickra C ABI.

func NewNatr

func NewNatr(period int) (*Natr, error)

NewNatr constructs a Natr. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Natr) Batch

func (ind *Natr) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Natr) BatchInto

func (ind *Natr) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Natr) Close

func (ind *Natr) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Natr) IsReady

func (ind *Natr) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Natr) Name

func (ind *Natr) Name() string

Name returns the indicator's canonical name.

func (*Natr) Reset

func (ind *Natr) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Natr) Update

func (ind *Natr) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Natr) WarmupPeriod

func (ind *Natr) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type NewHighsNewLows

type NewHighsNewLows struct {
	// contains filtered or unexported fields
}

NewHighsNewLows wraps the NewHighsNewLows indicator over the Wickra C ABI.

func NewNewHighsNewLows

func NewNewHighsNewLows() (*NewHighsNewLows, error)

NewNewHighsNewLows constructs a NewHighsNewLows. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*NewHighsNewLows) Batch

func (ind *NewHighsNewLows) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*NewHighsNewLows) Close

func (ind *NewHighsNewLows) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*NewHighsNewLows) IsReady

func (ind *NewHighsNewLows) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*NewHighsNewLows) Name

func (ind *NewHighsNewLows) Name() string

Name returns the indicator's canonical name.

func (*NewHighsNewLows) Reset

func (ind *NewHighsNewLows) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*NewHighsNewLows) Update

func (ind *NewHighsNewLows) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*NewHighsNewLows) WarmupPeriod

func (ind *NewHighsNewLows) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type NewPriceLines

type NewPriceLines struct {
	// contains filtered or unexported fields
}

NewPriceLines wraps the NewPriceLines indicator over the Wickra C ABI.

func NewNewPriceLines

func NewNewPriceLines(count int) (*NewPriceLines, error)

NewNewPriceLines constructs a NewPriceLines. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*NewPriceLines) Batch

func (ind *NewPriceLines) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*NewPriceLines) BatchInto

func (ind *NewPriceLines) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*NewPriceLines) Close

func (ind *NewPriceLines) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*NewPriceLines) IsReady

func (ind *NewPriceLines) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*NewPriceLines) Name

func (ind *NewPriceLines) Name() string

Name returns the indicator's canonical name.

func (*NewPriceLines) Reset

func (ind *NewPriceLines) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*NewPriceLines) Update

func (ind *NewPriceLines) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*NewPriceLines) WarmupPeriod

func (ind *NewPriceLines) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Nrtr

type Nrtr struct {
	// contains filtered or unexported fields
}

Nrtr wraps the Nrtr indicator over the Wickra C ABI.

func NewNrtr

func NewNrtr(pct float64) (*Nrtr, error)

NewNrtr constructs a Nrtr. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Nrtr) Batch

func (ind *Nrtr) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []NrtrOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Nrtr) Close

func (ind *Nrtr) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Nrtr) IsReady

func (ind *Nrtr) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Nrtr) Name

func (ind *Nrtr) Name() string

Name returns the indicator's canonical name.

func (*Nrtr) Reset

func (ind *Nrtr) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Nrtr) Update

func (ind *Nrtr) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (NrtrOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Nrtr) WarmupPeriod

func (ind *Nrtr) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type NrtrOutput

type NrtrOutput struct {
	Value     float64
	Direction float64
}

NrtrOutput is the output of the Nrtr indicator.

type Nvi

type Nvi struct {
	// contains filtered or unexported fields
}

Nvi wraps the Nvi indicator over the Wickra C ABI.

func NewNvi

func NewNvi() (*Nvi, error)

NewNvi constructs a Nvi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Nvi) Batch

func (ind *Nvi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Nvi) BatchInto

func (ind *Nvi) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Nvi) Close

func (ind *Nvi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Nvi) IsReady

func (ind *Nvi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Nvi) Name

func (ind *Nvi) Name() string

Name returns the indicator's canonical name.

func (*Nvi) Reset

func (ind *Nvi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Nvi) Update

func (ind *Nvi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Nvi) WarmupPeriod

func (ind *Nvi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OIPriceDivergence

type OIPriceDivergence struct {
	// contains filtered or unexported fields
}

OIPriceDivergence wraps the OIPriceDivergence indicator over the Wickra C ABI.

func NewOIPriceDivergence

func NewOIPriceDivergence(window int) (*OIPriceDivergence, error)

NewOIPriceDivergence constructs a OIPriceDivergence. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OIPriceDivergence) Batch

func (ind *OIPriceDivergence) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OIPriceDivergence) BatchInto

func (ind *OIPriceDivergence) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OIPriceDivergence) Close

func (ind *OIPriceDivergence) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OIPriceDivergence) IsReady

func (ind *OIPriceDivergence) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OIPriceDivergence) Name

func (ind *OIPriceDivergence) Name() string

Name returns the indicator's canonical name.

func (*OIPriceDivergence) Reset

func (ind *OIPriceDivergence) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OIPriceDivergence) Update

func (ind *OIPriceDivergence) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OIPriceDivergence) WarmupPeriod

func (ind *OIPriceDivergence) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OIWeighted

type OIWeighted struct {
	// contains filtered or unexported fields
}

OIWeighted wraps the OIWeighted indicator over the Wickra C ABI.

func NewOIWeighted

func NewOIWeighted() (*OIWeighted, error)

NewOIWeighted constructs a OIWeighted. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OIWeighted) Batch

func (ind *OIWeighted) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OIWeighted) BatchInto

func (ind *OIWeighted) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OIWeighted) Close

func (ind *OIWeighted) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OIWeighted) IsReady

func (ind *OIWeighted) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OIWeighted) Name

func (ind *OIWeighted) Name() string

Name returns the indicator's canonical name.

func (*OIWeighted) Reset

func (ind *OIWeighted) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OIWeighted) Update

func (ind *OIWeighted) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OIWeighted) WarmupPeriod

func (ind *OIWeighted) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Obv

type Obv struct {
	// contains filtered or unexported fields
}

Obv wraps the Obv indicator over the Wickra C ABI.

func NewObv

func NewObv() (*Obv, error)

NewObv constructs a Obv. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Obv) Batch

func (ind *Obv) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Obv) BatchInto

func (ind *Obv) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Obv) Close

func (ind *Obv) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Obv) IsReady

func (ind *Obv) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Obv) Name

func (ind *Obv) Name() string

Name returns the indicator's canonical name.

func (*Obv) Reset

func (ind *Obv) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Obv) Update

func (ind *Obv) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Obv) WarmupPeriod

func (ind *Obv) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OiToVolumeRatio

type OiToVolumeRatio struct {
	// contains filtered or unexported fields
}

OiToVolumeRatio wraps the OiToVolumeRatio indicator over the Wickra C ABI.

func NewOiToVolumeRatio

func NewOiToVolumeRatio() (*OiToVolumeRatio, error)

NewOiToVolumeRatio constructs a OiToVolumeRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OiToVolumeRatio) Batch

func (ind *OiToVolumeRatio) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OiToVolumeRatio) BatchInto

func (ind *OiToVolumeRatio) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OiToVolumeRatio) Close

func (ind *OiToVolumeRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OiToVolumeRatio) IsReady

func (ind *OiToVolumeRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OiToVolumeRatio) Name

func (ind *OiToVolumeRatio) Name() string

Name returns the indicator's canonical name.

func (*OiToVolumeRatio) Reset

func (ind *OiToVolumeRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OiToVolumeRatio) Update

func (ind *OiToVolumeRatio) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OiToVolumeRatio) WarmupPeriod

func (ind *OiToVolumeRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OmegaRatio

type OmegaRatio struct {
	// contains filtered or unexported fields
}

OmegaRatio wraps the OmegaRatio indicator over the Wickra C ABI.

func NewOmegaRatio

func NewOmegaRatio(period int, threshold float64) (*OmegaRatio, error)

NewOmegaRatio constructs a OmegaRatio. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OmegaRatio) Batch

func (ind *OmegaRatio) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OmegaRatio) BatchFast

func (ind *OmegaRatio) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*OmegaRatio) BatchFastInto

func (ind *OmegaRatio) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OmegaRatio) BatchInto

func (ind *OmegaRatio) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OmegaRatio) Close

func (ind *OmegaRatio) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OmegaRatio) IsReady

func (ind *OmegaRatio) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OmegaRatio) Name

func (ind *OmegaRatio) Name() string

Name returns the indicator's canonical name.

func (*OmegaRatio) Reset

func (ind *OmegaRatio) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OmegaRatio) Update

func (ind *OmegaRatio) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OmegaRatio) WarmupPeriod

func (ind *OmegaRatio) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OnNeck

type OnNeck struct {
	// contains filtered or unexported fields
}

OnNeck wraps the OnNeck indicator over the Wickra C ABI.

func NewOnNeck

func NewOnNeck() (*OnNeck, error)

NewOnNeck constructs a OnNeck. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OnNeck) Batch

func (ind *OnNeck) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OnNeck) BatchInto

func (ind *OnNeck) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OnNeck) Close

func (ind *OnNeck) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OnNeck) IsReady

func (ind *OnNeck) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OnNeck) Name

func (ind *OnNeck) Name() string

Name returns the indicator's canonical name.

func (*OnNeck) Reset

func (ind *OnNeck) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OnNeck) Update

func (ind *OnNeck) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OnNeck) WarmupPeriod

func (ind *OnNeck) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OpenInterestDelta

type OpenInterestDelta struct {
	// contains filtered or unexported fields
}

OpenInterestDelta wraps the OpenInterestDelta indicator over the Wickra C ABI.

func NewOpenInterestDelta

func NewOpenInterestDelta() (*OpenInterestDelta, error)

NewOpenInterestDelta constructs a OpenInterestDelta. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OpenInterestDelta) Batch

func (ind *OpenInterestDelta) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OpenInterestDelta) BatchInto

func (ind *OpenInterestDelta) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OpenInterestDelta) Close

func (ind *OpenInterestDelta) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OpenInterestDelta) IsReady

func (ind *OpenInterestDelta) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OpenInterestDelta) Name

func (ind *OpenInterestDelta) Name() string

Name returns the indicator's canonical name.

func (*OpenInterestDelta) Reset

func (ind *OpenInterestDelta) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OpenInterestDelta) Update

func (ind *OpenInterestDelta) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OpenInterestDelta) WarmupPeriod

func (ind *OpenInterestDelta) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OpenInterestMomentum

type OpenInterestMomentum struct {
	// contains filtered or unexported fields
}

OpenInterestMomentum wraps the OpenInterestMomentum indicator over the Wickra C ABI.

func NewOpenInterestMomentum

func NewOpenInterestMomentum(period int) (*OpenInterestMomentum, error)

NewOpenInterestMomentum constructs a OpenInterestMomentum. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OpenInterestMomentum) Batch

func (ind *OpenInterestMomentum) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OpenInterestMomentum) BatchInto

func (ind *OpenInterestMomentum) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OpenInterestMomentum) Close

func (ind *OpenInterestMomentum) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OpenInterestMomentum) IsReady

func (ind *OpenInterestMomentum) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OpenInterestMomentum) Name

func (ind *OpenInterestMomentum) Name() string

Name returns the indicator's canonical name.

func (*OpenInterestMomentum) Reset

func (ind *OpenInterestMomentum) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OpenInterestMomentum) Update

func (ind *OpenInterestMomentum) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OpenInterestMomentum) WarmupPeriod

func (ind *OpenInterestMomentum) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OpeningMarubozu

type OpeningMarubozu struct {
	// contains filtered or unexported fields
}

OpeningMarubozu wraps the OpeningMarubozu indicator over the Wickra C ABI.

func NewOpeningMarubozu

func NewOpeningMarubozu() (*OpeningMarubozu, error)

NewOpeningMarubozu constructs a OpeningMarubozu. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OpeningMarubozu) Batch

func (ind *OpeningMarubozu) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OpeningMarubozu) BatchInto

func (ind *OpeningMarubozu) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OpeningMarubozu) Close

func (ind *OpeningMarubozu) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OpeningMarubozu) IsReady

func (ind *OpeningMarubozu) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OpeningMarubozu) Name

func (ind *OpeningMarubozu) Name() string

Name returns the indicator's canonical name.

func (*OpeningMarubozu) Reset

func (ind *OpeningMarubozu) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OpeningMarubozu) Update

func (ind *OpeningMarubozu) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OpeningMarubozu) WarmupPeriod

func (ind *OpeningMarubozu) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OpeningRange

type OpeningRange struct {
	// contains filtered or unexported fields
}

OpeningRange wraps the OpeningRange indicator over the Wickra C ABI.

func NewOpeningRange

func NewOpeningRange(period int) (*OpeningRange, error)

NewOpeningRange constructs a OpeningRange. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OpeningRange) Batch

func (ind *OpeningRange) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []OpeningRangeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*OpeningRange) Close

func (ind *OpeningRange) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OpeningRange) IsReady

func (ind *OpeningRange) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OpeningRange) Name

func (ind *OpeningRange) Name() string

Name returns the indicator's canonical name.

func (*OpeningRange) Reset

func (ind *OpeningRange) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OpeningRange) Update

func (ind *OpeningRange) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (OpeningRangeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*OpeningRange) WarmupPeriod

func (ind *OpeningRange) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OpeningRangeOutput

type OpeningRangeOutput struct {
	High             float64
	Low              float64
	BreakoutDistance float64
}

OpeningRangeOutput is the output of the OpeningRange indicator.

type OrderBookImbalanceFull

type OrderBookImbalanceFull struct {
	// contains filtered or unexported fields
}

OrderBookImbalanceFull wraps the OrderBookImbalanceFull indicator over the Wickra C ABI.

func NewOrderBookImbalanceFull

func NewOrderBookImbalanceFull() (*OrderBookImbalanceFull, error)

NewOrderBookImbalanceFull constructs a OrderBookImbalanceFull. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OrderBookImbalanceFull) Batch

func (ind *OrderBookImbalanceFull) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*OrderBookImbalanceFull) Close

func (ind *OrderBookImbalanceFull) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OrderBookImbalanceFull) IsReady

func (ind *OrderBookImbalanceFull) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OrderBookImbalanceFull) Name

func (ind *OrderBookImbalanceFull) Name() string

Name returns the indicator's canonical name.

func (*OrderBookImbalanceFull) Reset

func (ind *OrderBookImbalanceFull) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OrderBookImbalanceFull) Update

func (ind *OrderBookImbalanceFull) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*OrderBookImbalanceFull) WarmupPeriod

func (ind *OrderBookImbalanceFull) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OrderBookImbalanceTop1

type OrderBookImbalanceTop1 struct {
	// contains filtered or unexported fields
}

OrderBookImbalanceTop1 wraps the OrderBookImbalanceTop1 indicator over the Wickra C ABI.

func NewOrderBookImbalanceTop1

func NewOrderBookImbalanceTop1() (*OrderBookImbalanceTop1, error)

NewOrderBookImbalanceTop1 constructs a OrderBookImbalanceTop1. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OrderBookImbalanceTop1) Batch

func (ind *OrderBookImbalanceTop1) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*OrderBookImbalanceTop1) Close

func (ind *OrderBookImbalanceTop1) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OrderBookImbalanceTop1) IsReady

func (ind *OrderBookImbalanceTop1) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OrderBookImbalanceTop1) Name

func (ind *OrderBookImbalanceTop1) Name() string

Name returns the indicator's canonical name.

func (*OrderBookImbalanceTop1) Reset

func (ind *OrderBookImbalanceTop1) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OrderBookImbalanceTop1) Update

func (ind *OrderBookImbalanceTop1) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*OrderBookImbalanceTop1) WarmupPeriod

func (ind *OrderBookImbalanceTop1) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OrderBookImbalanceTopN

type OrderBookImbalanceTopN struct {
	// contains filtered or unexported fields
}

OrderBookImbalanceTopN wraps the OrderBookImbalanceTopN indicator over the Wickra C ABI.

func NewOrderBookImbalanceTopN

func NewOrderBookImbalanceTopN(levels int) (*OrderBookImbalanceTopN, error)

NewOrderBookImbalanceTopN constructs a OrderBookImbalanceTopN. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OrderBookImbalanceTopN) Batch

func (ind *OrderBookImbalanceTopN) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*OrderBookImbalanceTopN) Close

func (ind *OrderBookImbalanceTopN) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OrderBookImbalanceTopN) IsReady

func (ind *OrderBookImbalanceTopN) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OrderBookImbalanceTopN) Name

func (ind *OrderBookImbalanceTopN) Name() string

Name returns the indicator's canonical name.

func (*OrderBookImbalanceTopN) Reset

func (ind *OrderBookImbalanceTopN) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OrderBookImbalanceTopN) Update

func (ind *OrderBookImbalanceTopN) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*OrderBookImbalanceTopN) WarmupPeriod

func (ind *OrderBookImbalanceTopN) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OrderFlowImbalance

type OrderFlowImbalance struct {
	// contains filtered or unexported fields
}

OrderFlowImbalance wraps the OrderFlowImbalance indicator over the Wickra C ABI.

func NewOrderFlowImbalance

func NewOrderFlowImbalance(period int) (*OrderFlowImbalance, error)

NewOrderFlowImbalance constructs a OrderFlowImbalance. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OrderFlowImbalance) Batch

func (ind *OrderFlowImbalance) Batch(bidPrice []float64, bidSize []float64, nBids int, askPrice []float64, askSize []float64, nAsks int) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*OrderFlowImbalance) Close

func (ind *OrderFlowImbalance) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OrderFlowImbalance) IsReady

func (ind *OrderFlowImbalance) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OrderFlowImbalance) Name

func (ind *OrderFlowImbalance) Name() string

Name returns the indicator's canonical name.

func (*OrderFlowImbalance) Reset

func (ind *OrderFlowImbalance) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OrderFlowImbalance) Update

func (ind *OrderFlowImbalance) Update(bidPrice []float64, bidSize []float64, askPrice []float64, askSize []float64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*OrderFlowImbalance) WarmupPeriod

func (ind *OrderFlowImbalance) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OuHalfLife

type OuHalfLife struct {
	// contains filtered or unexported fields
}

OuHalfLife wraps the OuHalfLife indicator over the Wickra C ABI.

func NewOuHalfLife

func NewOuHalfLife(period int) (*OuHalfLife, error)

NewOuHalfLife constructs a OuHalfLife. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OuHalfLife) Batch

func (ind *OuHalfLife) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OuHalfLife) BatchInto

func (ind *OuHalfLife) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OuHalfLife) Close

func (ind *OuHalfLife) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OuHalfLife) IsReady

func (ind *OuHalfLife) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OuHalfLife) Name

func (ind *OuHalfLife) Name() string

Name returns the indicator's canonical name.

func (*OuHalfLife) Reset

func (ind *OuHalfLife) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OuHalfLife) Update

func (ind *OuHalfLife) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OuHalfLife) WarmupPeriod

func (ind *OuHalfLife) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OvernightGap

type OvernightGap struct {
	// contains filtered or unexported fields
}

OvernightGap wraps the OvernightGap indicator over the Wickra C ABI.

func NewOvernightGap

func NewOvernightGap(utcOffsetMinutes int32) (*OvernightGap, error)

NewOvernightGap constructs a OvernightGap. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OvernightGap) Batch

func (ind *OvernightGap) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*OvernightGap) BatchInto

func (ind *OvernightGap) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*OvernightGap) Close

func (ind *OvernightGap) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OvernightGap) IsReady

func (ind *OvernightGap) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OvernightGap) Name

func (ind *OvernightGap) Name() string

Name returns the indicator's canonical name.

func (*OvernightGap) Reset

func (ind *OvernightGap) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OvernightGap) Update

func (ind *OvernightGap) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*OvernightGap) WarmupPeriod

func (ind *OvernightGap) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OvernightIntradayReturn

type OvernightIntradayReturn struct {
	// contains filtered or unexported fields
}

OvernightIntradayReturn wraps the OvernightIntradayReturn indicator over the Wickra C ABI.

func NewOvernightIntradayReturn

func NewOvernightIntradayReturn(utcOffsetMinutes int32) (*OvernightIntradayReturn, error)

NewOvernightIntradayReturn constructs a OvernightIntradayReturn. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*OvernightIntradayReturn) Batch

func (ind *OvernightIntradayReturn) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []OvernightIntradayReturnOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*OvernightIntradayReturn) Close

func (ind *OvernightIntradayReturn) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*OvernightIntradayReturn) IsReady

func (ind *OvernightIntradayReturn) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*OvernightIntradayReturn) Name

func (ind *OvernightIntradayReturn) Name() string

Name returns the indicator's canonical name.

func (*OvernightIntradayReturn) Reset

func (ind *OvernightIntradayReturn) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*OvernightIntradayReturn) Update

func (ind *OvernightIntradayReturn) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (OvernightIntradayReturnOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*OvernightIntradayReturn) WarmupPeriod

func (ind *OvernightIntradayReturn) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type OvernightIntradayReturnOutput

type OvernightIntradayReturnOutput struct {
	Overnight float64
	Intraday  float64
}

OvernightIntradayReturnOutput is the output of the OvernightIntradayReturn indicator.

type PainIndex

type PainIndex struct {
	// contains filtered or unexported fields
}

PainIndex wraps the PainIndex indicator over the Wickra C ABI.

func NewPainIndex

func NewPainIndex(period int) (*PainIndex, error)

NewPainIndex constructs a PainIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PainIndex) Batch

func (ind *PainIndex) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PainIndex) BatchFast

func (ind *PainIndex) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PainIndex) BatchFastInto

func (ind *PainIndex) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PainIndex) BatchInto

func (ind *PainIndex) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PainIndex) Close

func (ind *PainIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PainIndex) IsReady

func (ind *PainIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PainIndex) Name

func (ind *PainIndex) Name() string

Name returns the indicator's canonical name.

func (*PainIndex) Reset

func (ind *PainIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PainIndex) Update

func (ind *PainIndex) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PainIndex) WarmupPeriod

func (ind *PainIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PairSpreadZScore

type PairSpreadZScore struct {
	// contains filtered or unexported fields
}

PairSpreadZScore wraps the PairSpreadZScore indicator over the Wickra C ABI.

func NewPairSpreadZScore

func NewPairSpreadZScore(betaPeriod int, zPeriod int) (*PairSpreadZScore, error)

NewPairSpreadZScore constructs a PairSpreadZScore. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PairSpreadZScore) Batch

func (ind *PairSpreadZScore) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PairSpreadZScore) BatchInto

func (ind *PairSpreadZScore) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PairSpreadZScore) Close

func (ind *PairSpreadZScore) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PairSpreadZScore) IsReady

func (ind *PairSpreadZScore) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PairSpreadZScore) Name

func (ind *PairSpreadZScore) Name() string

Name returns the indicator's canonical name.

func (*PairSpreadZScore) Reset

func (ind *PairSpreadZScore) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PairSpreadZScore) Update

func (ind *PairSpreadZScore) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PairSpreadZScore) WarmupPeriod

func (ind *PairSpreadZScore) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PairwiseBeta

type PairwiseBeta struct {
	// contains filtered or unexported fields
}

PairwiseBeta wraps the PairwiseBeta indicator over the Wickra C ABI.

func NewPairwiseBeta

func NewPairwiseBeta(period int) (*PairwiseBeta, error)

NewPairwiseBeta constructs a PairwiseBeta. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PairwiseBeta) Batch

func (ind *PairwiseBeta) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PairwiseBeta) BatchInto

func (ind *PairwiseBeta) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PairwiseBeta) Close

func (ind *PairwiseBeta) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PairwiseBeta) IsReady

func (ind *PairwiseBeta) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PairwiseBeta) Name

func (ind *PairwiseBeta) Name() string

Name returns the indicator's canonical name.

func (*PairwiseBeta) Reset

func (ind *PairwiseBeta) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PairwiseBeta) Update

func (ind *PairwiseBeta) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PairwiseBeta) WarmupPeriod

func (ind *PairwiseBeta) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ParkinsonVolatility

type ParkinsonVolatility struct {
	// contains filtered or unexported fields
}

ParkinsonVolatility wraps the ParkinsonVolatility indicator over the Wickra C ABI.

func NewParkinsonVolatility

func NewParkinsonVolatility(period int, tradingPeriods int) (*ParkinsonVolatility, error)

NewParkinsonVolatility constructs a ParkinsonVolatility. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ParkinsonVolatility) Batch

func (ind *ParkinsonVolatility) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ParkinsonVolatility) BatchInto

func (ind *ParkinsonVolatility) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ParkinsonVolatility) Close

func (ind *ParkinsonVolatility) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ParkinsonVolatility) IsReady

func (ind *ParkinsonVolatility) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ParkinsonVolatility) Name

func (ind *ParkinsonVolatility) Name() string

Name returns the indicator's canonical name.

func (*ParkinsonVolatility) Reset

func (ind *ParkinsonVolatility) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ParkinsonVolatility) Update

func (ind *ParkinsonVolatility) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ParkinsonVolatility) WarmupPeriod

func (ind *ParkinsonVolatility) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PearsonCorrelation

type PearsonCorrelation struct {
	// contains filtered or unexported fields
}

PearsonCorrelation wraps the PearsonCorrelation indicator over the Wickra C ABI.

func NewPearsonCorrelation

func NewPearsonCorrelation(period int) (*PearsonCorrelation, error)

NewPearsonCorrelation constructs a PearsonCorrelation. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PearsonCorrelation) Batch

func (ind *PearsonCorrelation) Batch(x []float64, y []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PearsonCorrelation) BatchFast

func (ind *PearsonCorrelation) BatchFast(x []float64, y []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PearsonCorrelation) BatchFastInto

func (ind *PearsonCorrelation) BatchFastInto(dst []float64, x []float64, y []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PearsonCorrelation) BatchInto

func (ind *PearsonCorrelation) BatchInto(dst []float64, x []float64, y []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PearsonCorrelation) Close

func (ind *PearsonCorrelation) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PearsonCorrelation) IsReady

func (ind *PearsonCorrelation) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PearsonCorrelation) Name

func (ind *PearsonCorrelation) Name() string

Name returns the indicator's canonical name.

func (*PearsonCorrelation) Reset

func (ind *PearsonCorrelation) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PearsonCorrelation) Update

func (ind *PearsonCorrelation) Update(x float64, y float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PearsonCorrelation) WarmupPeriod

func (ind *PearsonCorrelation) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PercentAboveMa

type PercentAboveMa struct {
	// contains filtered or unexported fields
}

PercentAboveMa wraps the PercentAboveMa indicator over the Wickra C ABI.

func NewPercentAboveMa

func NewPercentAboveMa() (*PercentAboveMa, error)

NewPercentAboveMa constructs a PercentAboveMa. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PercentAboveMa) Batch

func (ind *PercentAboveMa) Batch(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, members int, timestamp []int64) []float64

Batch feeds a whole series in one FFI call and returns the per-bar output. Every snapshot carries the same width, so the per-member slices are flat: bar i occupies elements [i*width, (i+1)*width).

func (*PercentAboveMa) Close

func (ind *PercentAboveMa) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PercentAboveMa) IsReady

func (ind *PercentAboveMa) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PercentAboveMa) Name

func (ind *PercentAboveMa) Name() string

Name returns the indicator's canonical name.

func (*PercentAboveMa) Reset

func (ind *PercentAboveMa) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PercentAboveMa) Update

func (ind *PercentAboveMa) Update(change []float64, volume []float64, newHigh []bool, newLow []bool, aboveMa []bool, onBuySignal []bool, timestamp int64) float64

Update feeds one cross-sectional snapshot and returns the indicator value (NaN until warmed up). Slices in a group must share a length.

func (*PercentAboveMa) WarmupPeriod

func (ind *PercentAboveMa) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PercentB

type PercentB struct {
	// contains filtered or unexported fields
}

PercentB wraps the PercentB indicator over the Wickra C ABI.

func NewPercentB

func NewPercentB(period int, multiplier float64) (*PercentB, error)

NewPercentB constructs a PercentB. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PercentB) Batch

func (ind *PercentB) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PercentB) BatchFast

func (ind *PercentB) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PercentB) BatchFastInto

func (ind *PercentB) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PercentB) BatchInto

func (ind *PercentB) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PercentB) Close

func (ind *PercentB) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PercentB) IsReady

func (ind *PercentB) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PercentB) Name

func (ind *PercentB) Name() string

Name returns the indicator's canonical name.

func (*PercentB) Reset

func (ind *PercentB) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PercentB) Update

func (ind *PercentB) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PercentB) WarmupPeriod

func (ind *PercentB) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PercentageTrailingStop

type PercentageTrailingStop struct {
	// contains filtered or unexported fields
}

PercentageTrailingStop wraps the PercentageTrailingStop indicator over the Wickra C ABI.

func NewPercentageTrailingStop

func NewPercentageTrailingStop(percent float64) (*PercentageTrailingStop, error)

NewPercentageTrailingStop constructs a PercentageTrailingStop. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PercentageTrailingStop) Batch

func (ind *PercentageTrailingStop) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PercentageTrailingStop) BatchFast

func (ind *PercentageTrailingStop) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PercentageTrailingStop) BatchFastInto

func (ind *PercentageTrailingStop) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PercentageTrailingStop) BatchInto

func (ind *PercentageTrailingStop) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PercentageTrailingStop) Close

func (ind *PercentageTrailingStop) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PercentageTrailingStop) IsReady

func (ind *PercentageTrailingStop) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PercentageTrailingStop) Name

func (ind *PercentageTrailingStop) Name() string

Name returns the indicator's canonical name.

func (*PercentageTrailingStop) Reset

func (ind *PercentageTrailingStop) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PercentageTrailingStop) Update

func (ind *PercentageTrailingStop) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PercentageTrailingStop) WarmupPeriod

func (ind *PercentageTrailingStop) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PerpetualPremiumIndex

type PerpetualPremiumIndex struct {
	// contains filtered or unexported fields
}

PerpetualPremiumIndex wraps the PerpetualPremiumIndex indicator over the Wickra C ABI.

func NewPerpetualPremiumIndex

func NewPerpetualPremiumIndex() (*PerpetualPremiumIndex, error)

NewPerpetualPremiumIndex constructs a PerpetualPremiumIndex. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PerpetualPremiumIndex) Batch

func (ind *PerpetualPremiumIndex) Batch(fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PerpetualPremiumIndex) BatchInto

func (ind *PerpetualPremiumIndex) BatchInto(dst []float64, fundingRate []float64, markPrice []float64, indexPrice []float64, futuresPrice []float64, openInterest []float64, longSize []float64, shortSize []float64, takerBuyVolume []float64, takerSellVolume []float64, longLiquidation []float64, shortLiquidation []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PerpetualPremiumIndex) Close

func (ind *PerpetualPremiumIndex) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PerpetualPremiumIndex) IsReady

func (ind *PerpetualPremiumIndex) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PerpetualPremiumIndex) Name

func (ind *PerpetualPremiumIndex) Name() string

Name returns the indicator's canonical name.

func (*PerpetualPremiumIndex) Reset

func (ind *PerpetualPremiumIndex) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PerpetualPremiumIndex) Update

func (ind *PerpetualPremiumIndex) Update(fundingRate float64, markPrice float64, indexPrice float64, futuresPrice float64, openInterest float64, longSize float64, shortSize float64, takerBuyVolume float64, takerSellVolume float64, longLiquidation float64, shortLiquidation float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PerpetualPremiumIndex) WarmupPeriod

func (ind *PerpetualPremiumIndex) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Pgo

type Pgo struct {
	// contains filtered or unexported fields
}

Pgo wraps the Pgo indicator over the Wickra C ABI.

func NewPgo

func NewPgo(period int) (*Pgo, error)

NewPgo constructs a Pgo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Pgo) Batch

func (ind *Pgo) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Pgo) BatchInto

func (ind *Pgo) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Pgo) Close

func (ind *Pgo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Pgo) IsReady

func (ind *Pgo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Pgo) Name

func (ind *Pgo) Name() string

Name returns the indicator's canonical name.

func (*Pgo) Reset

func (ind *Pgo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Pgo) Update

func (ind *Pgo) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Pgo) WarmupPeriod

func (ind *Pgo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PiercingDarkCloud

type PiercingDarkCloud struct {
	// contains filtered or unexported fields
}

PiercingDarkCloud wraps the PiercingDarkCloud indicator over the Wickra C ABI.

func NewPiercingDarkCloud

func NewPiercingDarkCloud() (*PiercingDarkCloud, error)

NewPiercingDarkCloud constructs a PiercingDarkCloud. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PiercingDarkCloud) Batch

func (ind *PiercingDarkCloud) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PiercingDarkCloud) BatchInto

func (ind *PiercingDarkCloud) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PiercingDarkCloud) Close

func (ind *PiercingDarkCloud) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PiercingDarkCloud) IsReady

func (ind *PiercingDarkCloud) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PiercingDarkCloud) Name

func (ind *PiercingDarkCloud) Name() string

Name returns the indicator's canonical name.

func (*PiercingDarkCloud) Reset

func (ind *PiercingDarkCloud) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PiercingDarkCloud) Update

func (ind *PiercingDarkCloud) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PiercingDarkCloud) WarmupPeriod

func (ind *PiercingDarkCloud) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Pin

type Pin struct {
	// contains filtered or unexported fields
}

Pin wraps the Pin indicator over the Wickra C ABI.

func NewPin

func NewPin(window int) (*Pin, error)

NewPin constructs a Pin. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Pin) Batch

func (ind *Pin) Batch(price []float64, size []float64, isBuy []bool, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Pin) BatchInto

func (ind *Pin) BatchInto(dst []float64, price []float64, size []float64, isBuy []bool, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Pin) Close

func (ind *Pin) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Pin) IsReady

func (ind *Pin) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Pin) Name

func (ind *Pin) Name() string

Name returns the indicator's canonical name.

func (*Pin) Reset

func (ind *Pin) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Pin) Update

func (ind *Pin) Update(price float64, size float64, isBuy bool, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Pin) WarmupPeriod

func (ind *Pin) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PivotReversal

type PivotReversal struct {
	// contains filtered or unexported fields
}

PivotReversal wraps the PivotReversal indicator over the Wickra C ABI.

func NewPivotReversal

func NewPivotReversal(left int, right int) (*PivotReversal, error)

NewPivotReversal constructs a PivotReversal. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PivotReversal) Batch

func (ind *PivotReversal) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PivotReversal) BatchInto

func (ind *PivotReversal) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PivotReversal) Close

func (ind *PivotReversal) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PivotReversal) IsReady

func (ind *PivotReversal) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PivotReversal) Name

func (ind *PivotReversal) Name() string

Name returns the indicator's canonical name.

func (*PivotReversal) Reset

func (ind *PivotReversal) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PivotReversal) Update

func (ind *PivotReversal) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PivotReversal) WarmupPeriod

func (ind *PivotReversal) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PlusDi

type PlusDi struct {
	// contains filtered or unexported fields
}

PlusDi wraps the PlusDi indicator over the Wickra C ABI.

func NewPlusDi

func NewPlusDi(period int) (*PlusDi, error)

NewPlusDi constructs a PlusDi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PlusDi) Batch

func (ind *PlusDi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PlusDi) BatchInto

func (ind *PlusDi) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PlusDi) Close

func (ind *PlusDi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PlusDi) IsReady

func (ind *PlusDi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PlusDi) Name

func (ind *PlusDi) Name() string

Name returns the indicator's canonical name.

func (*PlusDi) Reset

func (ind *PlusDi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PlusDi) Update

func (ind *PlusDi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PlusDi) WarmupPeriod

func (ind *PlusDi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PlusDm

type PlusDm struct {
	// contains filtered or unexported fields
}

PlusDm wraps the PlusDm indicator over the Wickra C ABI.

func NewPlusDm

func NewPlusDm(period int) (*PlusDm, error)

NewPlusDm constructs a PlusDm. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PlusDm) Batch

func (ind *PlusDm) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PlusDm) BatchInto

func (ind *PlusDm) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PlusDm) Close

func (ind *PlusDm) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PlusDm) IsReady

func (ind *PlusDm) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PlusDm) Name

func (ind *PlusDm) Name() string

Name returns the indicator's canonical name.

func (*PlusDm) Reset

func (ind *PlusDm) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PlusDm) Update

func (ind *PlusDm) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PlusDm) WarmupPeriod

func (ind *PlusDm) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Pmo

type Pmo struct {
	// contains filtered or unexported fields
}

Pmo wraps the Pmo indicator over the Wickra C ABI.

func NewPmo

func NewPmo(smoothing1 int, smoothing2 int) (*Pmo, error)

NewPmo constructs a Pmo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Pmo) Batch

func (ind *Pmo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Pmo) BatchFast

func (ind *Pmo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Pmo) BatchFastInto

func (ind *Pmo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Pmo) BatchInto

func (ind *Pmo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Pmo) Close

func (ind *Pmo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Pmo) IsReady

func (ind *Pmo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Pmo) Name

func (ind *Pmo) Name() string

Name returns the indicator's canonical name.

func (*Pmo) Reset

func (ind *Pmo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Pmo) Update

func (ind *Pmo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Pmo) WarmupPeriod

func (ind *Pmo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PnfColumn

type PnfColumn struct {
	Direction int8
	High      float64
	Low       float64
}

PnfColumn is the output of the PnfColumn indicator.

type PointAndFigureBars

type PointAndFigureBars struct {
	// contains filtered or unexported fields
}

PointAndFigureBars wraps the PointAndFigureBars indicator over the Wickra C ABI.

func NewPointAndFigureBars

func NewPointAndFigureBars(boxSize float64, reversal int) (*PointAndFigureBars, error)

NewPointAndFigureBars constructs a PointAndFigureBars. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PointAndFigureBars) Batch

func (ind *PointAndFigureBars) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []PnfColumn

Batch feeds a whole series in one FFI call and returns every bar it completed. The count depends on the data, not on the input length.

func (*PointAndFigureBars) Close

func (ind *PointAndFigureBars) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PointAndFigureBars) Name

func (ind *PointAndFigureBars) Name() string

Name returns the indicator's canonical name.

func (*PointAndFigureBars) Reset

func (ind *PointAndFigureBars) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PointAndFigureBars) Update

func (ind *PointAndFigureBars) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) []PnfColumn

Update feeds one candle and returns any bars completed by it (a single candle may complete several).

type PolarizedFractalEfficiency

type PolarizedFractalEfficiency struct {
	// contains filtered or unexported fields
}

PolarizedFractalEfficiency wraps the PolarizedFractalEfficiency indicator over the Wickra C ABI.

func NewPolarizedFractalEfficiency

func NewPolarizedFractalEfficiency(period int, smoothing int) (*PolarizedFractalEfficiency, error)

NewPolarizedFractalEfficiency constructs a PolarizedFractalEfficiency. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PolarizedFractalEfficiency) Batch

func (ind *PolarizedFractalEfficiency) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PolarizedFractalEfficiency) BatchFast

func (ind *PolarizedFractalEfficiency) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PolarizedFractalEfficiency) BatchFastInto

func (ind *PolarizedFractalEfficiency) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PolarizedFractalEfficiency) BatchInto

func (ind *PolarizedFractalEfficiency) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PolarizedFractalEfficiency) Close

func (ind *PolarizedFractalEfficiency) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PolarizedFractalEfficiency) IsReady

func (ind *PolarizedFractalEfficiency) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PolarizedFractalEfficiency) Name

func (ind *PolarizedFractalEfficiency) Name() string

Name returns the indicator's canonical name.

func (*PolarizedFractalEfficiency) Reset

func (ind *PolarizedFractalEfficiency) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PolarizedFractalEfficiency) Update

func (ind *PolarizedFractalEfficiency) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PolarizedFractalEfficiency) WarmupPeriod

func (ind *PolarizedFractalEfficiency) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Ppo

type Ppo struct {
	// contains filtered or unexported fields
}

Ppo wraps the Ppo indicator over the Wickra C ABI.

func NewPpo

func NewPpo(fast int, slow int) (*Ppo, error)

NewPpo constructs a Ppo. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Ppo) Batch

func (ind *Ppo) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Ppo) BatchFast

func (ind *Ppo) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*Ppo) BatchFastInto

func (ind *Ppo) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ppo) BatchInto

func (ind *Ppo) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Ppo) Close

func (ind *Ppo) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Ppo) IsReady

func (ind *Ppo) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Ppo) Name

func (ind *Ppo) Name() string

Name returns the indicator's canonical name.

func (*Ppo) Reset

func (ind *Ppo) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Ppo) Update

func (ind *Ppo) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Ppo) WarmupPeriod

func (ind *Ppo) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type PpoHistogram

type PpoHistogram struct {
	// contains filtered or unexported fields
}

PpoHistogram wraps the PpoHistogram indicator over the Wickra C ABI.

func NewPpoHistogram

func NewPpoHistogram(fast int, slow int, signal int) (*PpoHistogram, error)

NewPpoHistogram constructs a PpoHistogram. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*PpoHistogram) Batch

func (ind *PpoHistogram) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*PpoHistogram) BatchFast

func (ind *PpoHistogram) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*PpoHistogram) BatchFastInto

func (ind *PpoHistogram) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PpoHistogram) BatchInto

func (ind *PpoHistogram) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*PpoHistogram) Close

func (ind *PpoHistogram) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*PpoHistogram) IsReady

func (ind *PpoHistogram) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*PpoHistogram) Name

func (ind *PpoHistogram) Name() string

Name returns the indicator's canonical name.

func (*PpoHistogram) Reset

func (ind *PpoHistogram) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*PpoHistogram) Update

func (ind *PpoHistogram) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*PpoHistogram) WarmupPeriod

func (ind *PpoHistogram) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ProfileShape

type ProfileShape struct {
	// contains filtered or unexported fields
}

ProfileShape wraps the ProfileShape indicator over the Wickra C ABI.

func NewProfileShape

func NewProfileShape(period int, bins int) (*ProfileShape, error)

NewProfileShape constructs a ProfileShape. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ProfileShape) Batch

func (ind *ProfileShape) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ProfileShape) BatchInto

func (ind *ProfileShape) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ProfileShape) Close

func (ind *ProfileShape) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ProfileShape) IsReady

func (ind *ProfileShape) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ProfileShape) Name

func (ind *ProfileShape) Name() string

Name returns the indicator's canonical name.

func (*ProfileShape) Reset

func (ind *ProfileShape) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ProfileShape) Update

func (ind *ProfileShape) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ProfileShape) WarmupPeriod

func (ind *ProfileShape) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ProfitFactor

type ProfitFactor struct {
	// contains filtered or unexported fields
}

ProfitFactor wraps the ProfitFactor indicator over the Wickra C ABI.

func NewProfitFactor

func NewProfitFactor(period int) (*ProfitFactor, error)

NewProfitFactor constructs a ProfitFactor. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ProfitFactor) Batch

func (ind *ProfitFactor) Batch(input []float64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ProfitFactor) BatchFast

func (ind *ProfitFactor) BatchFast(input []float64) []float64

BatchFast is the opt-in fast batch: a SIMD kernel may reassociate the arithmetic, so each value agrees with Batch to within a few units in the last place rather than bit for bit; NaN placement and length are identical, and the result is the same on every platform. Without a kernel it is exactly Batch.

func (*ProfitFactor) BatchFastInto

func (ind *ProfitFactor) BatchFastInto(dst []float64, input []float64)

BatchFastInto is BatchFast writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ProfitFactor) BatchInto

func (ind *ProfitFactor) BatchInto(dst []float64, input []float64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ProfitFactor) Close

func (ind *ProfitFactor) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ProfitFactor) IsReady

func (ind *ProfitFactor) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ProfitFactor) Name

func (ind *ProfitFactor) Name() string

Name returns the indicator's canonical name.

func (*ProfitFactor) Reset

func (ind *ProfitFactor) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ProfitFactor) Update

func (ind *ProfitFactor) Update(value float64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ProfitFactor) WarmupPeriod

func (ind *ProfitFactor) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ProjectionBands

type ProjectionBands struct {
	// contains filtered or unexported fields
}

ProjectionBands wraps the ProjectionBands indicator over the Wickra C ABI.

func NewProjectionBands

func NewProjectionBands(period int) (*ProjectionBands, error)

NewProjectionBands constructs a ProjectionBands. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ProjectionBands) Batch

func (ind *ProjectionBands) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []ProjectionBandsOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*ProjectionBands) Close

func (ind *ProjectionBands) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ProjectionBands) IsReady

func (ind *ProjectionBands) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ProjectionBands) Name

func (ind *ProjectionBands) Name() string

Name returns the indicator's canonical name.

func (*ProjectionBands) Reset

func (ind *ProjectionBands) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ProjectionBands) Update

func (ind *ProjectionBands) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) (ProjectionBandsOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*ProjectionBands) WarmupPeriod

func (ind *ProjectionBands) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type ProjectionBandsOutput

type ProjectionBandsOutput struct {
	Upper  float64
	Middle float64
	Lower  float64
}

ProjectionBandsOutput is the output of the ProjectionBands indicator.

type ProjectionOscillator

type ProjectionOscillator struct {
	// contains filtered or unexported fields
}

ProjectionOscillator wraps the ProjectionOscillator indicator over the Wickra C ABI.

func NewProjectionOscillator

func NewProjectionOscillator(period int) (*ProjectionOscillator, error)

NewProjectionOscillator constructs a ProjectionOscillator. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*ProjectionOscillator) Batch

func (ind *ProjectionOscillator) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*ProjectionOscillator) BatchInto

func (ind *ProjectionOscillator) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*ProjectionOscillator) Close

func (ind *ProjectionOscillator) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*ProjectionOscillator) IsReady

func (ind *ProjectionOscillator) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*ProjectionOscillator) Name

func (ind *ProjectionOscillator) Name() string

Name returns the indicator's canonical name.

func (*ProjectionOscillator) Reset

func (ind *ProjectionOscillator) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*ProjectionOscillator) Update

func (ind *ProjectionOscillator) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*ProjectionOscillator) WarmupPeriod

func (ind *ProjectionOscillator) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Psar

type Psar struct {
	// contains filtered or unexported fields
}

Psar wraps the Psar indicator over the Wickra C ABI.

func NewPsar

func NewPsar(afStart float64, afStep float64, afMax float64) (*Psar, error)

NewPsar constructs a Psar. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Psar) Batch

func (ind *Psar) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Psar) BatchInto

func (ind *Psar) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Psar) Close

func (ind *Psar) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Psar) IsReady

func (ind *Psar) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Psar) Name

func (ind *Psar) Name() string

Name returns the indicator's canonical name.

func (*Psar) Reset

func (ind *Psar) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Psar) Update

func (ind *Psar) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Psar) WarmupPeriod

func (ind *Psar) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Pvi

type Pvi struct {
	// contains filtered or unexported fields
}

Pvi wraps the Pvi indicator over the Wickra C ABI.

func NewPvi

func NewPvi() (*Pvi, error)

NewPvi constructs a Pvi. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Pvi) Batch

func (ind *Pvi) Batch(open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64) []float64

Batch runs the indicator over a whole slice in one FFI call and returns the per-element output (NaN during warmup), bit for bit what feeding the values one by one through Update gives.

func (*Pvi) BatchInto

func (ind *Pvi) BatchInto(dst []float64, open []float64, high []float64, low []float64, close []float64, volume []float64, timestamp []int64)

BatchInto is Batch writing into dst, which must be as long as the input, so a caller that reuses its buffer allocates nothing.

func (*Pvi) Close

func (ind *Pvi) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Pvi) IsReady

func (ind *Pvi) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Pvi) Name

func (ind *Pvi) Name() string

Name returns the indicator's canonical name.

func (*Pvi) Reset

func (ind *Pvi) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Pvi) Update

func (ind *Pvi) Update(open float64, high float64, low float64, close float64, volume float64, timestamp int64) float64

Update feeds one observation and returns the indicator value (NaN until warmed up).

func (*Pvi) WarmupPeriod

func (ind *Pvi) WarmupPeriod() int

WarmupPeriod returns the number of updates required before Update yields a non-NaN value.

type Qqe

type Qqe struct {
	// contains filtered or unexported fields
}

Qqe wraps the Qqe indicator over the Wickra C ABI.

func NewQqe

func NewQqe(rsiPeriod int, smoothing int, factor float64) (*Qqe, error)

NewQqe constructs a Qqe. It returns ErrInvalidParams when the native constructor rejects the arguments.

func (*Qqe) Batch

func (ind *Qqe) Batch(input []float64) []QqeOutput

Batch runs the indicator over whole slices in one FFI call and returns one output per input. A row the indicator did not produce -- warmup, or an input it rejected -- carries NaN in every floating-point field.

func (*Qqe) Close

func (ind *Qqe) Close()

Close frees the native handle. It is idempotent and safe to call alongside the finalizer.

func (*Qqe) IsReady

func (ind *Qqe) IsReady() bool

IsReady reports whether the indicator has consumed enough input to emit a value.

func (*Qqe) Name

func (ind *Qqe) Name() string

Name returns the indicator's canonical name.

func (*Qqe) Reset

func (ind *Qqe) Reset()

Reset clears all internal state, returning the indicator to warmup.

func (*Qqe) Update

func (ind *Qqe) Update(value float64) (QqeOutput, bool)

Update feeds one observation. The bool reports whether a value is available yet (false during warmup).

func (*Qqe) WarmupPeriod

func (ind *Qqe) War