hikyuu 2.2.4__py3-none-win_amd64.whl → 2.3.0__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. hikyuu/cpp/core310.pyd +0 -0
  2. hikyuu/cpp/core311.pyd +0 -0
  3. hikyuu/cpp/core312.pyd +0 -0
  4. hikyuu/cpp/core313.pyd +0 -0
  5. hikyuu/cpp/core38.pyd +0 -0
  6. hikyuu/cpp/core39.pyd +0 -0
  7. hikyuu/cpp/hikyuu.dll +0 -0
  8. hikyuu/cpp/hikyuu.lib +0 -0
  9. hikyuu/draw/__init__.py +12 -6
  10. hikyuu/draw/drawplot/__init__.py +7 -1
  11. hikyuu/draw/drawplot/icon/1.png +0 -0
  12. hikyuu/draw/drawplot/icon/10.png +0 -0
  13. hikyuu/draw/drawplot/icon/11.png +0 -0
  14. hikyuu/draw/drawplot/icon/12.png +0 -0
  15. hikyuu/draw/drawplot/icon/13.png +0 -0
  16. hikyuu/draw/drawplot/icon/14.png +0 -0
  17. hikyuu/draw/drawplot/icon/15.png +0 -0
  18. hikyuu/draw/drawplot/icon/16.png +0 -0
  19. hikyuu/draw/drawplot/icon/17.png +0 -0
  20. hikyuu/draw/drawplot/icon/18.png +0 -0
  21. hikyuu/draw/drawplot/icon/19.png +0 -0
  22. hikyuu/draw/drawplot/icon/2.png +0 -0
  23. hikyuu/draw/drawplot/icon/20.png +0 -0
  24. hikyuu/draw/drawplot/icon/21.png +0 -0
  25. hikyuu/draw/drawplot/icon/22.png +0 -0
  26. hikyuu/draw/drawplot/icon/23.png +0 -0
  27. hikyuu/draw/drawplot/icon/24.png +0 -0
  28. hikyuu/draw/drawplot/icon/25.png +0 -0
  29. hikyuu/draw/drawplot/icon/26.png +0 -0
  30. hikyuu/draw/drawplot/icon/27.png +0 -0
  31. hikyuu/draw/drawplot/icon/28.png +0 -0
  32. hikyuu/draw/drawplot/icon/29.png +0 -0
  33. hikyuu/draw/drawplot/icon/3.png +0 -0
  34. hikyuu/draw/drawplot/icon/30.png +0 -0
  35. hikyuu/draw/drawplot/icon/31.png +0 -0
  36. hikyuu/draw/drawplot/icon/32.png +0 -0
  37. hikyuu/draw/drawplot/icon/33.png +0 -0
  38. hikyuu/draw/drawplot/icon/34.png +0 -0
  39. hikyuu/draw/drawplot/icon/35.png +0 -0
  40. hikyuu/draw/drawplot/icon/36.png +0 -0
  41. hikyuu/draw/drawplot/icon/37.png +0 -0
  42. hikyuu/draw/drawplot/icon/38.png +0 -0
  43. hikyuu/draw/drawplot/icon/39.png +0 -0
  44. hikyuu/draw/drawplot/icon/4.png +0 -0
  45. hikyuu/draw/drawplot/icon/40.png +0 -0
  46. hikyuu/draw/drawplot/icon/41.png +0 -0
  47. hikyuu/draw/drawplot/icon/42.png +0 -0
  48. hikyuu/draw/drawplot/icon/43.png +0 -0
  49. hikyuu/draw/drawplot/icon/44.png +0 -0
  50. hikyuu/draw/drawplot/icon/45.png +0 -0
  51. hikyuu/draw/drawplot/icon/46.png +0 -0
  52. hikyuu/draw/drawplot/icon/47.png +0 -0
  53. hikyuu/draw/drawplot/icon/48.png +0 -0
  54. hikyuu/draw/drawplot/icon/49.png +0 -0
  55. hikyuu/draw/drawplot/icon/5.png +0 -0
  56. hikyuu/draw/drawplot/icon/6.png +0 -0
  57. hikyuu/draw/drawplot/icon/7.png +0 -0
  58. hikyuu/draw/drawplot/icon/8.png +0 -0
  59. hikyuu/draw/drawplot/icon/9.png +0 -0
  60. hikyuu/draw/drawplot/icon/__init__.py +0 -0
  61. hikyuu/draw/drawplot/matplotlib_draw.py +547 -3
  62. hikyuu/gui/HikyuuTDX.py +3 -1
  63. hikyuu/gui/data/MainWindow.py +3 -3
  64. hikyuu/gui/hikyuu_small.png +0 -0
  65. hikyuu/hub.py +1 -1
  66. hikyuu/include/hikyuu/config.h +3 -0
  67. hikyuu/include/hikyuu/indicator/Indicator.h +4 -4
  68. hikyuu/include/hikyuu/indicator/IndicatorImp.h +11 -8
  69. hikyuu/include/hikyuu/indicator/build_in.h +3 -0
  70. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +30 -0
  71. hikyuu/include/hikyuu/indicator/crt/CORR.h +1 -1
  72. hikyuu/include/hikyuu/indicator/crt/ISLASTBAR.h +30 -0
  73. hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +2 -2
  74. hikyuu/include/hikyuu/indicator/crt/WMA.h +46 -0
  75. hikyuu/include/hikyuu/indicator/imp/IContext.h +44 -0
  76. hikyuu/include/hikyuu/indicator/imp/ICorr.h +0 -1
  77. hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +27 -0
  78. hikyuu/include/hikyuu/indicator/imp/ISpearman.h +0 -1
  79. hikyuu/include/hikyuu/indicator/imp/IWma.h +30 -0
  80. hikyuu/include/hikyuu/indicator_talib/__init__.py +1 -0
  81. hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +26 -0
  82. hikyuu/include/hikyuu/indicator_talib/imp/TaApo.h +24 -0
  83. hikyuu/include/hikyuu/indicator_talib/imp/TaBbands.h +24 -0
  84. hikyuu/include/hikyuu/indicator_talib/imp/TaMa.h +24 -0
  85. hikyuu/include/hikyuu/indicator_talib/imp/TaMacd.h +24 -0
  86. hikyuu/include/hikyuu/indicator_talib/imp/TaMacdext.h +24 -0
  87. hikyuu/include/hikyuu/indicator_talib/imp/TaMama.h +24 -0
  88. hikyuu/include/hikyuu/indicator_talib/imp/TaMavp.h +41 -0
  89. hikyuu/include/hikyuu/indicator_talib/imp/TaPpo.h +24 -0
  90. hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +26 -0
  91. hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +31 -0
  92. hikyuu/include/hikyuu/indicator_talib/imp/TaStddev.h +24 -0
  93. hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +27 -0
  94. hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +26 -0
  95. hikyuu/include/hikyuu/indicator_talib/imp/TaStochrsi.h +24 -0
  96. hikyuu/include/hikyuu/indicator_talib/imp/TaT3.h +24 -0
  97. hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +26 -0
  98. hikyuu/include/hikyuu/indicator_talib/imp/TaVar.h +24 -0
  99. hikyuu/include/hikyuu/indicator_talib/imp/__init__.py +1 -0
  100. hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +288 -0
  101. hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +1364 -0
  102. hikyuu/include/hikyuu/indicator_talib/ta_crt.h +320 -0
  103. hikyuu/include/hikyuu/utilities/Null.h +33 -0
  104. hikyuu/include/hikyuu/utilities/Parameter.h +7 -7
  105. hikyuu/include/hikyuu/version.h +5 -5
  106. hikyuu/indicator/talib_wrap.py +424 -415
  107. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/METADATA +3 -3
  108. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/RECORD +112 -32
  109. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/top_level.txt +3 -0
  110. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/LICENSE +0 -0
  111. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/WHEEL +0 -0
  112. {hikyuu-2.2.4.dist-info → hikyuu-2.3.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,320 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-18
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/config.h"
11
+ #include "hikyuu/indicator/Indicator.h"
12
+ #include "hikyuu/indicator/crt/CVAL.h"
13
+
14
+ #if HKU_ENABLE_TA_LIB
15
+
16
+ #define TA_IN1_OUT_CRT(func) \
17
+ Indicator HKU_API func(); \
18
+ inline Indicator func(const Indicator& ind) { \
19
+ return func()(ind); \
20
+ } \
21
+ inline Indicator func(Indicator::value_t val) { \
22
+ return func(CVAL(val)); \
23
+ }
24
+
25
+ #define TA_IN1_OUT_N_CRT(func, period) \
26
+ Indicator HKU_API func(int n = period); \
27
+ Indicator HKU_API func(const IndParam& n); \
28
+ inline Indicator func(const Indicator& ind, int n = period) { \
29
+ return func(n)(ind); \
30
+ } \
31
+ inline Indicator func(const Indicator& data, const IndParam& n) { \
32
+ return func(n)(data); \
33
+ } \
34
+ inline Indicator func(const Indicator& data, const Indicator& n) { \
35
+ return func(IndParam(n))(data); \
36
+ }
37
+
38
+ #define TA_IN2_OUT_CRT(func) \
39
+ Indicator HKU_API func(const Indicator& ind1, const Indicator& ind2); \
40
+ Indicator HKU_API func();
41
+
42
+ #define TA_IN2_OUT_N_CRT(func, period) \
43
+ Indicator HKU_API func(const Indicator& ind1, const Indicator& ind2, int n = period); \
44
+ Indicator HKU_API func(int n = period);
45
+
46
+ #define TA_K_OUT_CRT(func) \
47
+ Indicator HKU_API func(); \
48
+ Indicator HKU_API func(const KData& k);
49
+
50
+ #define TA_K_OUT_N_CRT(func, period) \
51
+ Indicator HKU_API func(int n = period); \
52
+ Indicator HKU_API func(const KData& k, int n = period);
53
+
54
+ #define TA_K_OUT_P_D_CRT(func, param_val) \
55
+ Indicator HKU_API func(double p = param_val); \
56
+ Indicator HKU_API func(const KData& k, double p = param_val);
57
+
58
+ namespace hku {
59
+
60
+ TA_K_OUT_N_CRT(TA_ACCBANDS, 20)
61
+ TA_IN1_OUT_CRT(TA_ACOS)
62
+ TA_K_OUT_CRT(TA_AD)
63
+ TA_IN2_OUT_CRT(TA_ADD)
64
+
65
+ Indicator HKU_API TA_ADOSC(int fast_n = 3, int slow_n = 10);
66
+ Indicator HKU_API TA_ADOSC(const KData& k, int fast_n = 3, int slow_n = 10);
67
+
68
+ TA_K_OUT_N_CRT(TA_ADX, 14)
69
+ TA_K_OUT_N_CRT(TA_ADXR, 14)
70
+
71
+ Indicator HKU_API TA_APO(int fast_n = 12, int slow_n = 26, int matype = 0);
72
+ inline Indicator TA_APO(const Indicator& ind, int fast_n = 12, int slow_n = 26, int matype = 0) {
73
+ return TA_APO(fast_n, slow_n, matype)(ind);
74
+ }
75
+
76
+ TA_K_OUT_N_CRT(TA_AROON, 14)
77
+ TA_K_OUT_N_CRT(TA_AROONOSC, 14)
78
+
79
+ TA_IN1_OUT_CRT(TA_ASIN)
80
+ TA_IN1_OUT_CRT(TA_ATAN)
81
+ TA_K_OUT_N_CRT(TA_ATR, 14)
82
+
83
+ TA_IN1_OUT_N_CRT(TA_AVGDEV, 14)
84
+ TA_K_OUT_CRT(TA_AVGPRICE)
85
+
86
+ Indicator HKU_API TA_AVGPRICE();
87
+ Indicator HKU_API TA_AVGPRICE(const KData& k);
88
+
89
+ Indicator HKU_API TA_BBANDS(int n = 5, double nbdevup = 2., double nbdevdn = 2., int matype = 0);
90
+ inline Indicator TA_BBANDS(const Indicator& ind, int n = 5, double nbdevup = 2.,
91
+ double nbdevdn = 2., int matype = 0) {
92
+ return TA_BBANDS(n, nbdevup, nbdevdn, matype)(ind);
93
+ }
94
+
95
+ TA_IN2_OUT_N_CRT(TA_BETA, 5)
96
+ TA_K_OUT_CRT(TA_BOP)
97
+ TA_K_OUT_N_CRT(TA_CCI, 14)
98
+ TA_K_OUT_CRT(TA_CDL2CROWS)
99
+ TA_K_OUT_CRT(TA_CDL3BLACKCROWS)
100
+ TA_K_OUT_CRT(TA_CDL3INSIDE)
101
+ TA_K_OUT_CRT(TA_CDL3LINESTRIKE)
102
+ TA_K_OUT_CRT(TA_CDL3OUTSIDE)
103
+ TA_K_OUT_CRT(TA_CDL3STARSINSOUTH)
104
+ TA_K_OUT_CRT(TA_CDL3WHITESOLDIERS)
105
+ TA_K_OUT_P_D_CRT(TA_CDLABANDONEDBABY, 3.000000e-1)
106
+ TA_K_OUT_CRT(TA_CDLADVANCEBLOCK)
107
+ TA_K_OUT_CRT(TA_CDLBELTHOLD)
108
+ TA_K_OUT_CRT(TA_CDLBREAKAWAY)
109
+ TA_K_OUT_CRT(TA_CDLCLOSINGMARUBOZU)
110
+ TA_K_OUT_CRT(TA_CDLCONCEALBABYSWALL)
111
+ TA_K_OUT_CRT(TA_CDLCOUNTERATTACK)
112
+ TA_K_OUT_P_D_CRT(TA_CDLDARKCLOUDCOVER, 5.000000e-1)
113
+ TA_K_OUT_CRT(TA_CDLDOJI)
114
+ TA_K_OUT_CRT(TA_CDLDOJISTAR)
115
+ TA_K_OUT_CRT(TA_CDLDRAGONFLYDOJI)
116
+ TA_K_OUT_CRT(TA_CDLENGULFING)
117
+ TA_K_OUT_P_D_CRT(TA_CDLEVENINGDOJISTAR, 3.000000e-1)
118
+ TA_K_OUT_P_D_CRT(TA_CDLEVENINGSTAR, 3.000000e-1)
119
+ TA_K_OUT_CRT(TA_CDLGAPSIDESIDEWHITE)
120
+ TA_K_OUT_CRT(TA_CDLGRAVESTONEDOJI)
121
+ TA_K_OUT_CRT(TA_CDLHAMMER)
122
+ TA_K_OUT_CRT(TA_CDLHANGINGMAN)
123
+ TA_K_OUT_CRT(TA_CDLHARAMI)
124
+ TA_K_OUT_CRT(TA_CDLHARAMICROSS)
125
+ TA_K_OUT_CRT(TA_CDLHIGHWAVE)
126
+ TA_K_OUT_CRT(TA_CDLHIKKAKE)
127
+ TA_K_OUT_CRT(TA_CDLHIKKAKEMOD)
128
+ TA_K_OUT_CRT(TA_CDLHOMINGPIGEON)
129
+ TA_K_OUT_CRT(TA_CDLIDENTICAL3CROWS)
130
+ TA_K_OUT_CRT(TA_CDLINNECK)
131
+ TA_K_OUT_CRT(TA_CDLINVERTEDHAMMER)
132
+ TA_K_OUT_CRT(TA_CDLKICKING)
133
+ TA_K_OUT_CRT(TA_CDLKICKINGBYLENGTH)
134
+ TA_K_OUT_CRT(TA_CDLLADDERBOTTOM)
135
+ TA_K_OUT_CRT(TA_CDLLONGLEGGEDDOJI)
136
+ TA_K_OUT_CRT(TA_CDLLONGLINE)
137
+ TA_K_OUT_CRT(TA_CDLMARUBOZU)
138
+ TA_K_OUT_CRT(TA_CDLMATCHINGLOW)
139
+ TA_K_OUT_P_D_CRT(TA_CDLMATHOLD, 5.000000e-1)
140
+ TA_K_OUT_P_D_CRT(TA_CDLMORNINGDOJISTAR, 3.000000e-1)
141
+ TA_K_OUT_P_D_CRT(TA_CDLMORNINGSTAR, 3.000000e-1)
142
+ TA_K_OUT_CRT(TA_CDLONNECK)
143
+ TA_K_OUT_CRT(TA_CDLPIERCING)
144
+ TA_K_OUT_CRT(TA_CDLRICKSHAWMAN)
145
+ TA_K_OUT_CRT(TA_CDLRISEFALL3METHODS)
146
+ TA_K_OUT_CRT(TA_CDLSEPARATINGLINES)
147
+ TA_K_OUT_CRT(TA_CDLSHOOTINGSTAR)
148
+ TA_K_OUT_CRT(TA_CDLSHORTLINE)
149
+ TA_K_OUT_CRT(TA_CDLSPINNINGTOP)
150
+ TA_K_OUT_CRT(TA_CDLSTALLEDPATTERN)
151
+ TA_K_OUT_CRT(TA_CDLSTICKSANDWICH)
152
+ TA_K_OUT_CRT(TA_CDLTAKURI)
153
+ TA_K_OUT_CRT(TA_CDLTASUKIGAP)
154
+ TA_K_OUT_CRT(TA_CDLTHRUSTING)
155
+ TA_K_OUT_CRT(TA_CDLTRISTAR)
156
+ TA_K_OUT_CRT(TA_CDLUNIQUE3RIVER)
157
+ TA_K_OUT_CRT(TA_CDLUPSIDEGAP2CROWS)
158
+ TA_K_OUT_CRT(TA_CDLXSIDEGAP3METHODS)
159
+
160
+ TA_IN1_OUT_CRT(TA_CEIL)
161
+ TA_IN1_OUT_N_CRT(TA_CMO, 14)
162
+ TA_IN2_OUT_N_CRT(TA_CORREL, 30)
163
+ TA_IN1_OUT_CRT(TA_COS)
164
+ TA_IN1_OUT_CRT(TA_COSH)
165
+ TA_IN1_OUT_N_CRT(TA_DEMA, 30)
166
+ TA_IN2_OUT_CRT(TA_DIV)
167
+ TA_K_OUT_N_CRT(TA_DX, 14)
168
+ TA_IN1_OUT_N_CRT(TA_EMA, 30)
169
+ TA_IN1_OUT_CRT(TA_EXP)
170
+ TA_IN1_OUT_CRT(TA_FLOOR)
171
+ TA_IN1_OUT_CRT(TA_HT_DCPERIOD)
172
+ TA_IN1_OUT_CRT(TA_HT_DCPHASE)
173
+ TA_IN1_OUT_CRT(TA_HT_PHASOR)
174
+ TA_IN1_OUT_CRT(TA_HT_SINE)
175
+ TA_IN1_OUT_CRT(TA_HT_TRENDLINE)
176
+ TA_IN1_OUT_CRT(TA_HT_TRENDMODE)
177
+ TA_K_OUT_N_CRT(TA_IMI, 14)
178
+ TA_IN1_OUT_N_CRT(TA_KAMA, 30)
179
+ TA_IN1_OUT_N_CRT(TA_LINEARREG_ANGLE, 14)
180
+ TA_IN1_OUT_N_CRT(TA_LINEARREG_INTERCEPT, 14)
181
+ TA_IN1_OUT_N_CRT(TA_LINEARREG_SLOPE, 14)
182
+ TA_IN1_OUT_N_CRT(TA_LINEARREG, 14)
183
+ TA_IN1_OUT_CRT(TA_LN)
184
+ TA_IN1_OUT_CRT(TA_LOG10)
185
+
186
+ Indicator HKU_API TA_MA(int n = 30, int matype = 0);
187
+ inline Indicator TA_MA(const Indicator& ind, int n = 30, int matype = 0) {
188
+ return TA_MA(n, matype)(ind);
189
+ }
190
+
191
+ Indicator HKU_API TA_MACD(int fast_n = 12, int slow_n = 26, int signal_n = 9);
192
+ inline Indicator TA_MACD(const Indicator& ind, int fast_n = 12, int slow_n = 26, int signal_n = 9) {
193
+ return TA_MACD(fast_n, slow_n, signal_n)(ind);
194
+ }
195
+
196
+ Indicator HKU_API TA_MACDEXT(int fast_n = 12, int slow_n = 26, int signal_n = 9,
197
+ int fast_matype = 0, int slow_matype = 0, int signal_matype = 0);
198
+ inline Indicator TA_MACDEXT(const Indicator& ind, int fast_n = 12, int slow_n = 26,
199
+ int signal_n = 9, int fast_matype = 0, int slow_matype = 0,
200
+ int signal_matype = 0) {
201
+ return TA_MACDEXT(fast_n, slow_n, signal_n, fast_matype, slow_matype, signal_matype)(ind);
202
+ }
203
+
204
+ TA_IN1_OUT_N_CRT(TA_MACDFIX, 9)
205
+
206
+ Indicator HKU_API TA_MAMA(double fast_limit = 5.000000e-1, double slow_limit = 5.000000e-2);
207
+ inline Indicator TA_MAMA(const Indicator& ind, double fast_limit = 5.000000e-1,
208
+ double slow_limit = 5.000000e-2) {
209
+ return TA_MAMA(fast_limit, slow_limit)(ind);
210
+ }
211
+
212
+ Indicator HKU_API TA_MAVP(const Indicator& ref_ind, int min_n = 2, int max_n = 30, int matype = 0);
213
+ inline Indicator TA_MAVP(const Indicator& ind1, const Indicator& ind2, int min_n = 2,
214
+ int max_n = 30, int matype = 0) {
215
+ return TA_MAVP(ind2, min_n, max_n, matype)(ind1);
216
+ }
217
+
218
+ TA_IN1_OUT_N_CRT(TA_MAX, 30)
219
+ TA_IN1_OUT_N_CRT(TA_MAXINDEX, 30)
220
+
221
+ TA_K_OUT_CRT(TA_MEDPRICE)
222
+ TA_K_OUT_N_CRT(TA_MFI, 14)
223
+ TA_IN1_OUT_N_CRT(TA_MIDPOINT, 14)
224
+
225
+ Indicator HKU_API TA_MIDPRICE(int n = 14);
226
+ Indicator HKU_API TA_MIDPRICE(const KData& k, int n = 14);
227
+
228
+ TA_IN1_OUT_N_CRT(TA_MIN, 30)
229
+ TA_IN1_OUT_N_CRT(TA_MININDEX, 30)
230
+ TA_IN1_OUT_N_CRT(TA_MINMAX, 30)
231
+ TA_IN1_OUT_N_CRT(TA_MINMAXINDEX, 30)
232
+
233
+ TA_K_OUT_N_CRT(TA_MINUS_DI, 14)
234
+ TA_K_OUT_N_CRT(TA_MINUS_DM, 14)
235
+ TA_IN1_OUT_N_CRT(TA_MOM, 10)
236
+ TA_IN2_OUT_CRT(TA_MULT)
237
+ TA_K_OUT_N_CRT(TA_NATR, 14)
238
+ TA_K_OUT_CRT(TA_OBV)
239
+ TA_K_OUT_N_CRT(TA_PLUS_DI, 14)
240
+ TA_K_OUT_N_CRT(TA_PLUS_DM, 14)
241
+
242
+ Indicator HKU_API TA_PPO(int fast_n = 12, int slow_n = 26, int matype = 0);
243
+ inline Indicator TA_PPO(const Indicator& ind, int fast_n = 12, int slow_n = 26, int matype = 0) {
244
+ return TA_PPO(fast_n, slow_n, matype)(ind);
245
+ }
246
+
247
+ TA_IN1_OUT_N_CRT(TA_ROC, 10)
248
+ TA_IN1_OUT_N_CRT(TA_ROCP, 10)
249
+ TA_IN1_OUT_N_CRT(TA_ROCR, 10)
250
+ TA_IN1_OUT_N_CRT(TA_ROCR100, 10)
251
+ TA_IN1_OUT_N_CRT(TA_RSI, 14)
252
+
253
+ Indicator HKU_API TA_SAR(double acceleration = 0.02, double maximum = 0.2);
254
+ Indicator HKU_API TA_SAR(const KData& k, double acceleration = 0.02, double maximum = 0.2);
255
+
256
+ Indicator HKU_API TA_SAREXT(double startvalue = 0.0, double offsetonreverse = 0.0,
257
+ double accelerationinitlong = 0.02, double accelerationlong = 0.02,
258
+ double accelerationmaxlong = 0.2, double accelerationinitshort = 0.02,
259
+ double accelerationshort = 0.02, double accelerationmaxshort = 0.2);
260
+ Indicator HKU_API TA_SAREXT(const KData& k, double startvalue = 0.0, double offsetonreverse = 0.0,
261
+ double accelerationinitlong = 0.02, double accelerationlong = 0.02,
262
+ double accelerationmaxlong = 0.2, double accelerationinitshort = 0.02,
263
+ double accelerationshort = 0.02, double accelerationmaxshort = 0.2);
264
+
265
+ TA_IN1_OUT_CRT(TA_SIN)
266
+ TA_IN1_OUT_CRT(TA_SINH)
267
+ TA_IN1_OUT_N_CRT(TA_SMA, 30)
268
+ TA_IN1_OUT_CRT(TA_SQRT)
269
+
270
+ Indicator HKU_API TA_STDDEV(int n = 5, double nbdev = 1.0);
271
+ inline Indicator TA_STDDEV(const Indicator& ind, int n = 5, double nbdev = 1.0) {
272
+ return TA_STDDEV(n, nbdev)(ind);
273
+ }
274
+
275
+ Indicator HKU_API TA_STOCH(int fastk_n = 5, int slowk_n = 3, int slowk_matype = 0, int slowd_n = 3,
276
+ int slowd_matype = 0);
277
+ Indicator HKU_API TA_STOCH(const KData& k, int fastk_n = 5, int slowk_n = 3, int slowk_matype = 0,
278
+ int slowd_n = 3, int slowd_matype = 0);
279
+
280
+ Indicator HKU_API TA_STOCHF(int fastk_n = 5, int fastd_n = 3, int fastd_matype = 0);
281
+ Indicator HKU_API TA_STOCHF(const KData& k, int fastk_n = 5, int fastd_n = 3, int fastd_matype = 0);
282
+
283
+ Indicator HKU_API TA_STOCHRSI(int n = 14, int fastk_n = 5, int fastd_n = 3, int matype = 0);
284
+ inline Indicator TA_STOCHRSI(const Indicator& ind, int n = 14, int fastk_n = 5, int fastd_n = 3,
285
+ int matype = 0) {
286
+ return TA_STOCHRSI(n, fastk_n, fastd_n, matype)(ind);
287
+ }
288
+
289
+ TA_IN2_OUT_CRT(TA_SUB)
290
+ TA_IN1_OUT_N_CRT(TA_SUM, 30)
291
+
292
+ Indicator HKU_API TA_T3(int n = 5, double vfactor = 7.000000e-1);
293
+ inline Indicator TA_T3(const Indicator& ind, int n = 5, double vfactor = 7.000000e-1) {
294
+ return TA_T3(n, vfactor)(ind);
295
+ }
296
+
297
+ TA_IN1_OUT_CRT(TA_TAN)
298
+ TA_IN1_OUT_CRT(TA_TANH)
299
+ TA_IN1_OUT_N_CRT(TA_TEMA, 30)
300
+ TA_K_OUT_CRT(TA_TRANGE)
301
+ TA_IN1_OUT_N_CRT(TA_TRIMA, 30)
302
+ TA_IN1_OUT_N_CRT(TA_TRIX, 30)
303
+ TA_IN1_OUT_N_CRT(TA_TSF, 14)
304
+ TA_K_OUT_CRT(TA_TYPPRICE)
305
+
306
+ Indicator HKU_API TA_ULTOSC(int n1 = 7, int n2 = 14, int n3 = 28);
307
+ Indicator HKU_API TA_ULTOSC(const KData& k, int n1 = 7, int n2 = 14, int n3 = 28);
308
+
309
+ Indicator HKU_API TA_VAR(int n = 5, double nbdev = 1.0);
310
+ inline Indicator TA_VAR(const Indicator& ind, int n = 5, double nbdev = 1.0) {
311
+ return TA_VAR(n, nbdev)(ind);
312
+ }
313
+
314
+ TA_K_OUT_CRT(TA_WCLPRICE)
315
+ TA_K_OUT_N_CRT(TA_WILLR, 14)
316
+ TA_IN1_OUT_N_CRT(TA_WMA, 30)
317
+
318
+ } // namespace hku
319
+
320
+ #endif
@@ -11,6 +11,7 @@
11
11
 
12
12
  #include <cstddef>
13
13
  #include <cstdint>
14
+ #include <cmath>
14
15
  #include <limits>
15
16
  #include <type_traits>
16
17
  #include "osdef.h"
@@ -123,8 +124,24 @@ public:
123
124
  return (std::numeric_limits<double>::quiet_NaN)();
124
125
  // return (std::numeric_limits<double>::max)();
125
126
  }
127
+
128
+ bool operator==(double val) const {
129
+ return std::isnan(val);
130
+ }
131
+
132
+ bool operator==(float val) const {
133
+ return std::isnan(val);
134
+ }
126
135
  };
127
136
 
137
+ inline bool operator==(double val, const Null<double>&) {
138
+ return std::isnan(val);
139
+ }
140
+
141
+ inline bool operator==(float val, const Null<double>&) {
142
+ return std::isnan(val);
143
+ }
144
+
128
145
  /**
129
146
  * 提供double的Null值
130
147
  */
@@ -135,8 +152,24 @@ public:
135
152
  operator float() const {
136
153
  return (std::numeric_limits<float>::quiet_NaN)();
137
154
  }
155
+
156
+ bool operator==(float val) const {
157
+ return std::isnan(val);
158
+ }
159
+
160
+ bool operator==(double val) const {
161
+ return std::isnan(val);
162
+ }
138
163
  };
139
164
 
165
+ inline bool operator==(float val, const Null<float>&) {
166
+ return std::isnan(val);
167
+ }
168
+
169
+ inline bool operator==(double val, const Null<float>&) {
170
+ return std::isnan(val);
171
+ }
172
+
140
173
  /** @} */
141
174
  } // namespace hku
142
175
 
@@ -208,30 +208,30 @@ private:
208
208
  type = "double";
209
209
  double x = boost::any_cast<double>(arg);
210
210
  value = boost::lexical_cast<string>(x);
211
- } else if (arg.type() == typeid(string)) {
211
+ } else if (strcmp(arg.type().name(), typeid(string).name()) == 0) {
212
212
  type = "string";
213
213
  value = boost::any_cast<string>(arg);
214
- } else if (arg.type() == typeid(Stock)) {
214
+ } else if (strcmp(arg.type().name(), typeid(Stock).name()) == 0) {
215
215
  type = "stock";
216
216
  value = "stock";
217
217
  stock = boost::any_cast<Stock>(arg);
218
- } else if (arg.type() == typeid(Block)) {
218
+ } else if (strcmp(arg.type().name(), typeid(Block).name()) == 0) {
219
219
  type = "block";
220
220
  value = "block";
221
221
  block = boost::any_cast<Block>(arg);
222
- } else if (arg.type() == typeid(KQuery)) {
222
+ } else if (strcmp(arg.type().name(), typeid(KQuery).name()) == 0) {
223
223
  type = "query";
224
224
  value = "query";
225
225
  query = boost::any_cast<KQuery>(arg);
226
- } else if (arg.type() == typeid(KData)) {
226
+ } else if (strcmp(arg.type().name(), typeid(KData).name()) == 0) {
227
227
  type = "kdata";
228
228
  value = "kdata";
229
229
  kdata = boost::any_cast<KData>(arg);
230
- } else if (arg.type() == typeid(PriceList)) {
230
+ } else if (strcmp(arg.type().name(), typeid(PriceList).name()) == 0) {
231
231
  type = "PriceList";
232
232
  value = "price_list";
233
233
  price_list = boost::any_cast<PriceList>(arg);
234
- } else if (arg.type() == typeid(DatetimeList)) {
234
+ } else if (strcmp(arg.type().name(), typeid(DatetimeList).name()) == 0) {
235
235
  type = "DatetimeList";
236
236
  value = "date_list";
237
237
  date_list = boost::any_cast<DatetimeList>(arg);
@@ -12,13 +12,13 @@
12
12
  #define HKU_VERSION_H
13
13
 
14
14
  // clang-format off
15
- #define HKU_VERSION "2.2.4"
15
+ #define HKU_VERSION "2.3.0"
16
16
  #define HKU_VERSION_MAJOR 2
17
- #define HKU_VERSION_MINOR 2
18
- #define HKU_VERSION_ALTER 4
19
- #define HKU_VERSION_BUILD 202412082122
17
+ #define HKU_VERSION_MINOR 3
18
+ #define HKU_VERSION_ALTER 0
19
+ #define HKU_VERSION_BUILD 202501010140
20
20
  #define HKU_VERSION_MODE "RELEASE"
21
- #define HKU_VERSION_GIT "2.2.4 master.2fafc6fb (RELEASE)"
21
+ #define HKU_VERSION_GIT "2.3.0 master.48495654 (RELEASE)"
22
22
  // clang-format on
23
23
 
24
24
  #endif /* HKU_VERSION_H */