realtime

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package realtime 实时数据相关的功能集合

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DynamicMovingAverage added in v1.0.0

func DynamicMovingAverage(previousHalfValue float64, period int, snapshot factors.QuoteSnapshot) (ma, maHigh, maLow float64)

DynamicMovingAverage 增量计算移动平均线的范围

period 周期数
previousHalfValue 前period-1的平均值
price 现价

func IncrementalMovingAverage added in v0.7.9

func IncrementalMovingAverage(previousHalfValue float64, period int, price float64) float64

IncrementalMovingAverage 增量计算移动平均线

period 周期数
previousHalfValue 前period-1的平均值
price 现价

func MovingAverage

func MovingAverage(CLOSE, HIGH, LOW stat.Series, PN int) (ma, half, maMax, maMin stat.Series)

MovingAverage 计算均线范围

func TradeSessionHasEnd

func TradeSessionHasEnd(date string) bool

TradeSessionHasEnd 是否收盘

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL