Documentation ¶
Index ¶
- func AESDecrypt(encrypted []byte, key []byte) (decrypted []byte)
- func AESEncrypt(src []byte, key []byte) (encrypted []byte)
- func Abs(n int64) int64
- func Accumulate(data []float64) float64
- func AppendBool(a []bool, v bool, limit bool) []bool
- func AppendFloat(a []float64, v float64, limit bool) []float64
- func AppendInt(a []int64, v int64, limit bool) []int64
- func ArrayDivideFloat(data []float64, divisor float64) []float64
- func ArrayPositon(array []float64, value float64) int
- func ArrayToString(array []string) string
- func BlueString(s string) string
- func CrossOver(a []float64, b []float64) bool
- func CrossUnder(a []float64, b []float64) bool
- func CyanString(s string) string
- func DecryptString(encrypted []byte) string
- func Diff(data []float64, leg int) []float64
- func EncryptString(src []byte) string
- func Exists(path string) bool
- func FindPosition(data []float64, condition string, threshold float64) ([]int, int)
- func GetBetweenDates(sdate, edate string) ([]string, error)
- func GetDiffDays(startdate string, enddate string) int
- func GetFileByPath(path string) ([]string, error)
- func GetGoogleToken(secret string) string
- func GreenString(s string) string
- func IntArrayToFloat(data []int) []float64
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsFileExists(filename string) bool
- func IsInArray(value string, array []string) bool
- func IsKlineExists(klines []common.Kline, symbol string, timestamp int64) bool
- func MagentaString(s string) string
- func MaxArrayFloat(data []float64) float64
- func MaxArrayInt(data []int) int
- func MinArrayFloat(data []float64) float64
- func MinArrayInt(data []int) int
- func MovingAverage(data []float64, length int) []float64
- func OnesFloat(length int) []float64
- func OnesInt(length int) []int
- func ReadLine(fileName string) ([]string, error)
- func RedString(s string) string
- func SetArrayFloat(data []float64, value float64, start int, end int) []float64
- func SetArrayInt(data []int, value int, start int, end int) []int
- func Sign(data float64) float64
- func Square(data []float64) []float64
- func TrueRange(C []float64, H []float64, L []float64) []float64
- func ValidLimitPrice(price float64, last common.LastPrice) float64
- func YellowString(s string) string
- func ZerosFloat(length int) []float64
- func ZerosInt(length int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accumulate ¶ added in v1.1.0
func AppendBool ¶
*
- @Description: 向前添加bool类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []bool
func AppendFloat ¶
*
- @Description: 向前添加float类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []float64
func AppendInt ¶
*
- @Description: 向前添加int类型到数组
- @param a 原数组
- @param v 新值
- @param limit 是否限制数组长度 false:增加长度 true:保持原有长度
- @return []int64
func ArrayDivideFloat ¶ added in v1.1.0
func ArrayPositon ¶ added in v1.1.0
找出value在数组里的索引
func CrossUnder ¶ added in v1.1.0
func FindPosition ¶ added in v1.1.0
func GetBetweenDates ¶
*
- @Description: 根据开始日期和结束日期计算出时间段内所有日期 参数为日期格式,如:2020-01-01
- @param sdate 开始日期
- @param edate 结束日期
- @return []string
func GetDiffDays ¶
*
- @Description: 获取两个时间相差的天数,0表同一天,正数表t1>t2,负数表t1<t2
- @param startdate 开始日期
- @param enddate 结束日期
- @return int
func IntArrayToFloat ¶ added in v1.1.0
func IsKlineExists ¶
*
- @Description: 判断Kline原素是否存在
- @param klines
- @param symbol
- @param timestamp
- @return bool
func MaxArrayFloat ¶ added in v1.1.0
func MaxArrayInt ¶ added in v1.1.0
func MinArrayFloat ¶ added in v1.1.0
func MinArrayInt ¶ added in v1.1.0
func MovingAverage ¶ added in v1.1.0
func SetArrayFloat ¶ added in v1.1.0
func SetArrayInt ¶ added in v1.1.0
func ZerosFloat ¶ added in v1.1.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.