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
@@ -115,7 +115,8 @@ public:
115
115
  /** 返回形如:Name(param1=val,param2=val,...) */
116
116
  string long_name() const;
117
117
 
118
- string formula() const;
118
+ virtual string formula() const;
119
+ virtual string str() const;
119
120
 
120
121
  bool isLeaf() const;
121
122
 
@@ -142,13 +143,15 @@ public:
142
143
  typedef std::map<string, IndicatorImpPtr> ind_param_map_t;
143
144
  const ind_param_map_t& getIndParams() const;
144
145
 
145
- value_t* data(size_t result_num = 0);
146
- value_t const* data(size_t result_num = 0) const;
146
+ value_t* data(size_t result_idx = 0);
147
+ value_t const* data(size_t result_idx = 0) const;
147
148
 
148
149
  // ===================
149
150
  // 子类接口
150
151
  // ===================
151
- virtual void _calculate(const Indicator&) {}
152
+ virtual void _calculate(const Indicator&) {
153
+ HKU_WARN("{} will be empty always!", m_name);
154
+ }
152
155
 
153
156
  virtual void _dyn_run_one_step(const Indicator& ind, size_t curPos, size_t step) {}
154
157
 
@@ -391,12 +394,12 @@ inline bool IndicatorImp::haveIndParam(const string& name) const {
391
394
  return m_ind_params.find(name) != m_ind_params.end();
392
395
  }
393
396
 
394
- inline IndicatorImp::value_t* IndicatorImp::data(size_t result_num) {
395
- return m_pBuffer[result_num] ? m_pBuffer[result_num]->data() : nullptr;
397
+ inline IndicatorImp::value_t* IndicatorImp::data(size_t result_idx) {
398
+ return m_pBuffer[result_idx] ? m_pBuffer[result_idx]->data() : nullptr;
396
399
  }
397
400
 
398
- inline IndicatorImp::value_t const* IndicatorImp::data(size_t result_num) const {
399
- return m_pBuffer[result_num] ? m_pBuffer[result_num]->data() : nullptr;
401
+ inline IndicatorImp::value_t const* IndicatorImp::data(size_t result_idx) const {
402
+ return m_pBuffer[result_idx] ? m_pBuffer[result_idx]->data() : nullptr;
400
403
  }
401
404
 
402
405
  inline size_t IndicatorImp::_get_step_start(size_t pos, size_t step, size_t discard) {
@@ -28,6 +28,7 @@
28
28
  #include "crt/BETWEEN.h"
29
29
  #include "crt/BLOCKSETNUM.h"
30
30
  #include "crt/CEILING.h"
31
+ #include "crt/CONTEXT.h"
31
32
  #include "crt/CORR.h"
32
33
  #include "crt/COS.h"
33
34
  #include "crt/COST.h"
@@ -55,6 +56,7 @@
55
56
  #include "crt/INSUM.h"
56
57
  #include "crt/IR.h"
57
58
  #include "crt/INTPART.h"
59
+ #include "crt/ISLASTBAR.h"
58
60
  #include "crt/LAST.h"
59
61
  #include "crt/LIUTONGPAN.h"
60
62
  #include "crt/LLV.h"
@@ -107,6 +109,7 @@
107
109
  #include "crt/VAR.h"
108
110
  #include "crt/VARP.h"
109
111
  #include "crt/VIGOR.h"
112
+ #include "crt/WMA.h"
110
113
  #include "crt/ZHBOND10.h"
111
114
  #include "crt/ZONGGUBEN.h"
112
115
  #include "crt/ZSCORE.h"
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-28
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "../Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ /**
15
+ * 独立上下文指标
16
+ * @ingroup Indicator
17
+ */
18
+ Indicator HKU_API CONTEXT(const Indicator& ind);
19
+ Indicator HKU_API CONTEXT();
20
+
21
+ /**
22
+ * 获取指标上下文
23
+ * @note Indicator::getContext()方法获取的是当前的上下文,但对于 CONTEXT
24
+ * 独立上下文指标无法获取其指定的独立上下文,需用此方法获取
25
+ * @param ind
26
+ * @return KData
27
+ */
28
+ KData HKU_API CONTEXT_K(const Indicator& ind);
29
+
30
+ } // namespace hku
@@ -19,6 +19,6 @@ namespace hku {
19
19
  * @ingroup Indicator
20
20
  */
21
21
  Indicator HKU_API CORR(const Indicator& ind1, const Indicator& ind2, int n = 10);
22
- Indicator HKU_API CORR(int n = 10);
22
+ Indicator HKU_API CORR(const Indicator& ref_ind, int n = 10);
23
23
 
24
24
  } // namespace hku
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-16
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+ #ifndef INDICATOR_CRT_LASTBAR_H_
10
+ #define INDICATOR_CRT_LASTBAR_H_
11
+
12
+ #include "../Indicator.h"
13
+
14
+ namespace hku {
15
+
16
+ /**
17
+ * 判断当前数据是否为最后一个数据,若为最后一个数据,则返回1,否则返回0.
18
+ * @ingroup Indicator
19
+ */
20
+ Indicator HKU_API ISLASTBAR();
21
+ Indicator HKU_API ISLASTBAR(const KData& kdata);
22
+ Indicator ISLASTBAR(const Indicator& ind);
23
+
24
+ inline Indicator ISLASTBAR(const Indicator& ind) {
25
+ return ISLASTBAR()(ind);
26
+ }
27
+
28
+ } // namespace hku
29
+
30
+ #endif /* INDICATOR_CRT_LASTBAR_H_ */
@@ -17,7 +17,7 @@ namespace hku {
17
17
  * @param n 滚动窗口(大于2 或 等于0),等于0时,代表 n 实际使用 ind 的长度
18
18
  * @ingroup Indicator
19
19
  */
20
- Indicator HKU_API SPEARMAN(const Indicator& ind1, const Indicator& ind2, int n = 0);
21
- Indicator HKU_API SPEARMAN(int n = 0);
20
+ Indicator HKU_API SPEARMAN(const Indicator& ind, const Indicator& ref_ind, int n = 0);
21
+ Indicator HKU_API SPEARMAN(const Indicator& ref_ind, int n = 0);
22
22
 
23
23
  } // namespace hku
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-15
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+ #ifndef WMA_H_
10
+ #define WMA_H_
11
+
12
+ #include "../Indicator.h"
13
+
14
+ namespace hku {
15
+
16
+ /**
17
+ * 加权移动平均
18
+ * 算法:Yn=(1*X1+2*X2+...+n*Xn)/(1+2+...+n)
19
+ * @param n 计算均值的周期窗口,n >= 1
20
+ * @ingroup Indicator
21
+ */
22
+ Indicator HKU_API WMA(int n = 22);
23
+ Indicator HKU_API WMA(const IndParam& n);
24
+
25
+ /**
26
+ * 加权移动平均
27
+ * 算法:Yn=(1*X1+2*X2+...+n*Xn)/(1+2+...+n)
28
+ * @param ind 待计算的数据
29
+ * @param n 计算均值的周期窗口
30
+ * @ingroup Indicator
31
+ */
32
+ inline Indicator HKU_API WMA(const Indicator& ind, int n = 22) {
33
+ return WMA(n)(ind);
34
+ }
35
+
36
+ inline Indicator HKU_API WMA(const Indicator& ind, const IndParam& n) {
37
+ return WMA(n)(ind);
38
+ }
39
+
40
+ inline Indicator WMA(const Indicator& ind, const Indicator& n) {
41
+ return WMA(IndParam(n))(ind);
42
+ }
43
+
44
+ } // namespace hku
45
+
46
+ #endif /* MA_H_ */
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-28
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "../Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class IContext : public IndicatorImp {
15
+ public:
16
+ IContext();
17
+ IContext(const Indicator& ref_ind);
18
+ virtual ~IContext();
19
+
20
+ virtual string str() const override;
21
+ virtual string formula() const override;
22
+ virtual void _calculate(const Indicator& data) override;
23
+ virtual IndicatorImpPtr _clone() override;
24
+
25
+ KData getContextKdata() const;
26
+
27
+ private:
28
+ Indicator m_ref_ind;
29
+
30
+ //============================================
31
+ // 序列化支持
32
+ //============================================
33
+ #if HKU_SUPPORT_SERIALIZATION
34
+ private:
35
+ friend class boost::serialization::access;
36
+ template <class Archive>
37
+ void serialize(Archive& ar, const unsigned int version) {
38
+ ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
39
+ ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
40
+ }
41
+ #endif
42
+ };
43
+
44
+ } // namespace hku
@@ -14,7 +14,6 @@ namespace hku {
14
14
  class ICorr : public IndicatorImp {
15
15
  public:
16
16
  ICorr();
17
- explicit ICorr(int n);
18
17
  ICorr(const Indicator& ref_ind, int n);
19
18
  virtual ~ICorr();
20
19
 
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-16
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+ #ifndef INDICATOR_IMP_IISLASTBAR_H_
10
+ #define INDICATOR_IMP_IISLASTBAR_H_
11
+
12
+ #include "../Indicator.h"
13
+
14
+ namespace hku {
15
+
16
+ class IIsLastBar : public IndicatorImp {
17
+ INDICATOR_IMP(IIsLastBar)
18
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
19
+
20
+ public:
21
+ IIsLastBar();
22
+ explicit IIsLastBar(const KData&);
23
+ virtual ~IIsLastBar();
24
+ };
25
+
26
+ } /* namespace hku */
27
+ #endif /* INDICATOR_IMP_IISLASTBAR_H_ */
@@ -14,7 +14,6 @@ namespace hku {
14
14
  class ISpearman : public IndicatorImp {
15
15
  public:
16
16
  ISpearman();
17
- explicit ISpearman(int n);
18
17
  ISpearman(const Indicator& ref_ind, int n);
19
18
  virtual ~ISpearman();
20
19
 
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-15
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+ #ifndef INDICATOR_IMP_IWMA_H_
10
+ #define INDICATOR_IMP_IWMA_H_
11
+
12
+ #include "../Indicator.h"
13
+
14
+ namespace hku {
15
+
16
+ /*
17
+ * WMA(X,N):X的N日加权移动平均.算法:Yn=(1*X1+2*X2+...+n*Xn)/(1+2+...+n)。
18
+ */
19
+ class IWma : public IndicatorImp {
20
+ INDICATOR_IMP_SUPPORT_DYNAMIC_STEP(IWma)
21
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
22
+
23
+ public:
24
+ IWma();
25
+ virtual ~IWma();
26
+ virtual void _checkParam(const string& name) const override;
27
+ };
28
+
29
+ } /* namespace hku */
30
+ #endif /* INDICATOR_IMP_IWMA_H_ */
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-20
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaAdosc : public IndicatorImp {
15
+ INDICATOR_IMP(TaAdosc)
16
+ INDICATOR_NEED_CONTEXT
17
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
18
+
19
+ public:
20
+ TaAdosc();
21
+ explicit TaAdosc(const KData&, int fast_n, int slow_n);
22
+ virtual ~TaAdosc() = default;
23
+ virtual void _checkParam(const string& name) const override;
24
+ };
25
+
26
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-21
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaApo : public IndicatorImp {
15
+ INDICATOR_IMP(TaApo)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaApo();
20
+ virtual ~TaApo() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-20
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaBbands : public IndicatorImp {
15
+ INDICATOR_IMP(TaBbands)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaBbands();
20
+ virtual ~TaBbands() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-21
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaMa : public IndicatorImp {
15
+ INDICATOR_IMP(TaMa)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaMa();
20
+ virtual ~TaMa() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-21
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaMacd : public IndicatorImp {
15
+ INDICATOR_IMP(TaMacd)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaMacd();
20
+ virtual ~TaMacd() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-21
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaMacdext : public IndicatorImp {
15
+ INDICATOR_IMP(TaMacdext)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaMacdext();
20
+ virtual ~TaMacdext() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-21
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaMama : public IndicatorImp {
15
+ INDICATOR_IMP(TaMama)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaMama();
20
+ virtual ~TaMama() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-03-10
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaMavp : public IndicatorImp {
15
+ public:
16
+ TaMavp();
17
+ TaMavp(const Indicator& ref_ind, int min_n, int max_n, int matype);
18
+ virtual ~TaMavp();
19
+
20
+ virtual void _checkParam(const string& name) const override;
21
+ virtual void _calculate(const Indicator& data) override;
22
+ virtual IndicatorImpPtr _clone() override;
23
+
24
+ private:
25
+ Indicator m_ref_ind;
26
+
27
+ //============================================
28
+ // 序列化支持
29
+ //============================================
30
+ #if HKU_SUPPORT_SERIALIZATION
31
+ private:
32
+ friend class boost::serialization::access;
33
+ template <class Archive>
34
+ void serialize(Archive& ar, const unsigned int version) {
35
+ ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
36
+ ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
37
+ }
38
+ #endif
39
+ };
40
+
41
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-22
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaPpo : public IndicatorImp {
15
+ INDICATOR_IMP(TaPpo)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaPpo();
20
+ virtual ~TaPpo() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-22
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaSar : public IndicatorImp {
15
+ INDICATOR_IMP(TaSar)
16
+ INDICATOR_NEED_CONTEXT
17
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
18
+
19
+ public:
20
+ TaSar();
21
+ explicit TaSar(const KData&, double acceleration, double maximum);
22
+ virtual ~TaSar() = default;
23
+ virtual void _checkParam(const string& name) const override;
24
+ };
25
+
26
+ } // namespace hku
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-22
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaSarext : public IndicatorImp {
15
+ INDICATOR_IMP(TaSarext)
16
+ INDICATOR_NEED_CONTEXT
17
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
18
+
19
+ public:
20
+ TaSarext();
21
+ TaSarext(double startvalue, double offsetonreverse, double accelerationinitlong,
22
+ double accelerationlong, double accelerationmaxlong, double accelerationinitshort,
23
+ double accelerationshort, double accelerationmaxshort);
24
+ TaSarext(const KData&, double startvalue, double offsetonreverse, double accelerationinitlong,
25
+ double accelerationlong, double accelerationmaxlong, double accelerationinitshort,
26
+ double accelerationshort, double accelerationmaxshort);
27
+ virtual ~TaSarext() = default;
28
+ virtual void _checkParam(const string& name) const override;
29
+ };
30
+
31
+ } // namespace hku
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-22
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaStddev : public IndicatorImp {
15
+ INDICATOR_IMP(TaStddev)
16
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
17
+
18
+ public:
19
+ TaStddev();
20
+ virtual ~TaStddev() = default;
21
+ virtual void _checkParam(const string& name) const override;
22
+ };
23
+
24
+ } // namespace hku
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright (c) 2024 hikyuu.org
3
+ *
4
+ * Created on: 2024-12-20
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/indicator/Indicator.h"
11
+
12
+ namespace hku {
13
+
14
+ class TaStoch : public IndicatorImp {
15
+ INDICATOR_IMP(TaStoch)
16
+ INDICATOR_NEED_CONTEXT
17
+ INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
18
+
19
+ public:
20
+ TaStoch();
21
+ explicit TaStoch(const KData&, int fastk_n, int slowk_n, int slowk_matype, int slowd_n,
22
+ int slowd_matype);
23
+ virtual ~TaStoch() = default;
24
+ virtual void _checkParam(const string& name) const override;
25
+ };
26
+
27
+ } // namespace hku