package
0.0.5
Repository: https://github.com/tradexplus/ctpgo.git
Documentation: pkg.go.dev

# Functions

Acos - Vector Trigonometric ACOS.
Ad - Chaikin A/D Line.
Add - Vector arithmetic addition.
AdOsc - Chaikin A/D Oscillator.
Adx - Average Directional Movement Index.
AdxR - Average Directional Movement Index Rating.
Apo - Absolute Price Oscillator.
Aroon - Aroon aroondown, aroonup = AROON(high, low, timeperiod=14).
AroonOsc - Aroon Oscillator.
Asin - Vector Trigonometric ASIN.
Atan - Vector Trigonometric ATAN.
Atr - Average True Range.
AvgPrice - Average Price (o+h+l+c)/4.
BBands - Bollinger Bands upperband, middleband, lowerband = BBands(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0).
Beta - Beta.
Bop - Balance Of Power.
Cci - Commodity Channel Index.
Ceil - Vector CEIL.
CheckErr 检查错误,有就抛出.
Cmo - Chande Momentum Oscillator.
* * ConvertToString 编码转换 * * 例: result = ConvertToString(text, "gbk", "utf-8") */.
Correl - Pearson's Correlation Coefficient (r).
Cos - Vector Trigonometric COS.
Cosh - Vector Trigonometric COSH.
Crossover returns true if series1 is crossing over series2.
Crossunder returns true if series1 is crossing under series2.
Decimal float64 保留几位小数点.
Dema - Double Exponential Moving Average.
Div - Vector arithmetic division.
Dx - Directional Movement Index.
Ema - Exponential Moving Average.
Exp - Vector atrithmetic EXP.
Find Find获取一个切片并在其中查找元素。如果找到它,它将返回它的密钥,否则它将返回-1和一个错误的bool。.
Float64ToString float64 转 string.
Floor - Vector FLOOR.
No description provided by the author
GetDirectionTitle 获得报单多空方向.
GetHedgeFlagTitle 获得投机套保标志.
GetOffsetFlagTitle 获得开平标志.
GetOrderStatusTitle 获得报单状态.
GetPosiDirectionTitle 获得持仓多空方向.
GetPositionDateTitle 获得持仓日期类型.
GroupCandles groups a set of candles in another set of candles, basing on a grouping factor.
HeikinashiCandles - from candle values extracts heikinashi candle values.
Hlc3 returns the Hlc3 values NOTE: Every Hlc item is defined as follows : (high + low + close) / 3 It is used as AvgPrice candle.
HtDcPeriod - Hilbert Transform - Dominant Cycle Period (lookback=32).
HtDcPhase - Hilbert Transform - Dominant Cycle Phase (lookback=63).
HtPhasor - Hibert Transform - Phasor Components (lookback=32).
HtSine - Hilbert Transform - SineWave (lookback=63).
HtTrendline - Hilbert Transform - Instantaneous Trendline (lookback=63).
HtTrendMode - Hilbert Transform - Trend vs Cycle Mode (lookback=63).
Int64ToString int 转 string.
IntToString int 转 string.
IsDirExist 目录是否存在.
IsFileExist 文件是否存在.
No description provided by the author
IsNullPointer 是否空指针.
Kama - Kaufman Adaptive Moving Average.
LinearReg - Linear Regression.
LinearRegAngle - Linear Regression Angle.
LinearRegIntercept - Linear Regression Intercept.
LinearRegSlope - Linear Regression Slope.
Ln - Vector natural log LN.
No description provided by the author
No description provided by the author
Log10 - Vector LOG10.
Ma - Moving average.
Macd - Moving Average Convergence/Divergence unstable period ~= 100.
MacdExt - MACD with controllable MA type unstable period ~= 100.
MacdFix - MACD Fix 12/26 unstable period ~= 100.
Mama - MESA Adaptive Moving Average (lookback=32).
MaVp - Moving average with variable period.
Max - Highest value over a period.
MaxIndex - Index of highest value over a specified period.
MedPrice - Median Price (h+l)/2.
Mfi - Money Flow Index.
MidPoint - MidPoint over period.
MidPrice - Midpoint Price over period.
Min - Lowest value over a period.
MinIndex - Index of lowest value over a specified period.
MinMax - Lowest and highest values over a specified period.
MinMaxIndex - Indexes of lowest and highest values over a specified period.
MinusDI - Minus Directional Indicator.
MinusDM - Minus Directional Movement.
Mom - Momentum.
Mult - Vector arithmetic multiply.
Natr - Normalized Average True Range.
Obv - On Balance Volume.
PlusDI - Plus Directional Indicator.
PlusDM - Plus Directional Movement.
Ppo - Percentage Price Oscillator.
fmt.Printf.
fmt.Println.
ReqFailMsg 请求 api 出现错误.
ReqMsg 请求日志.
Roc - Rate of change : ((price/prevPrice)-1)*100.
Rocp - Rate of change Percentage: (price-prevPrice)/prevPrice.
Rocr - Rate of change ratio: (price/prevPrice).
Rocr100 - Rate of change ratio 100 scale: (price/prevPrice)*100.
Rsi - Relative strength index.
Sar - Parabolic SAR real = Sar(high, low, acceleration=0, maximum=0).
SarExt - Parabolic SAR - Extended real = SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0, accelerationlong=0, accelerationmaxlong=0, accelerationinitshort=0, accelerationshort=0, accelerationmaxshort=0).
Sin - Vector Trigonometric SIN.
Sinh - Vector Trigonometric SINH.
Sma - Simple Moving Average.
fmt.Sprintf.
Sqrt - Vector SQRT.
StdDev - Standard Deviation.
Stoch - Stochastic.
StochF - Stochastic Fast.
StochRsi - Stochastic Relative Strength Index.
No description provided by the author
StringToFloat64 string 转 float64.
string 转 int.
No description provided by the author
StrToTime 转换 17:59:24 到具体的秒.
Sub - Vector arithmetic subtraction.
Sum - Vector summation.
T3 - Triple Exponential Moving Average (T3) (lookback=6*inTimePeriod).
Tan - Vector Trigonometric TAN.
Tanh - Vector Trigonometric TANH.
Tema - Triple Exponential Moving Average.
No description provided by the author
TRange - True Range.
Trima - Triangular Moving Average.
TrimSpace 去掉左右两边空格.
Trix - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA.
Tsf - Time Series Forecast.
TypPrice - Typical Price (h+l+c)/3.
UltOsc - Ultimate Oscillator.
Var - Variance.
WclPrice - Weighted Close Price.
WillR - Williams' %R.
Wma - Weighted Moving Average.

# Constants

Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.
Kinds of moving averages.

# Structs

Map 一级 Map.
Map2 二级 Map.

# Type aliases

MaType - Moving average type.