hikyuu 2.7.0__py3-none-manylinux2014_aarch64.whl → 2.7.5__py3-none-manylinux2014_aarch64.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 (295) hide show
  1. hikyuu/__init__.py +28 -8
  2. hikyuu/__init__.pyi +26 -14
  3. hikyuu/analysis/__init__.pyi +7 -1
  4. hikyuu/analysis/analysis.pyi +8 -2
  5. hikyuu/core.pyi +9 -3
  6. hikyuu/cpp/core310.pyi +172 -68
  7. hikyuu/cpp/core310.so +0 -0
  8. hikyuu/cpp/core311.pyi +172 -68
  9. hikyuu/cpp/core311.so +0 -0
  10. hikyuu/cpp/core312.pyi +172 -68
  11. hikyuu/cpp/core312.so +0 -0
  12. hikyuu/cpp/core313.pyi +172 -68
  13. hikyuu/cpp/core313.so +0 -0
  14. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  15. hikyuu/cpp/i18n/zh_CN/hikyuu_plugin.mo +0 -0
  16. hikyuu/cpp/libboost_atomic.so +0 -0
  17. hikyuu/cpp/libboost_atomic.so.1.90.0 +0 -0
  18. hikyuu/cpp/{libboost_charconv-mt.so → libboost_charconv.so} +0 -0
  19. hikyuu/cpp/{libboost_charconv-mt.so.1.88.0 → libboost_charconv.so.1.90.0} +0 -0
  20. hikyuu/cpp/libboost_chrono.so +0 -0
  21. hikyuu/cpp/libboost_chrono.so.1.90.0 +0 -0
  22. hikyuu/cpp/libboost_container.so +0 -0
  23. hikyuu/cpp/libboost_container.so.1.90.0 +0 -0
  24. hikyuu/cpp/libboost_date_time.so +0 -0
  25. hikyuu/cpp/libboost_date_time.so.1.90.0 +0 -0
  26. hikyuu/cpp/libboost_locale.so +0 -0
  27. hikyuu/cpp/libboost_locale.so.1.90.0 +0 -0
  28. hikyuu/cpp/libboost_random.so +0 -0
  29. hikyuu/cpp/libboost_random.so.1.90.0 +0 -0
  30. hikyuu/cpp/libboost_serialization.so +0 -0
  31. hikyuu/cpp/libboost_serialization.so.1.90.0 +0 -0
  32. hikyuu/cpp/libboost_thread.so +0 -0
  33. hikyuu/cpp/libboost_thread.so.1.90.0 +0 -0
  34. hikyuu/cpp/libboost_wserialization.so +0 -0
  35. hikyuu/cpp/libboost_wserialization.so.1.90.0 +0 -0
  36. hikyuu/cpp/libhikyuu.so +0 -0
  37. hikyuu/cpp/libmimalloc.so +0 -0
  38. hikyuu/cpp/libmimalloc.so.3 +0 -0
  39. hikyuu/cpp/libmimalloc.so.3.1 +0 -0
  40. hikyuu/cpp/libsqlite3.so +0 -0
  41. hikyuu/data/clickhouse_upgrade/0001.sql +2 -0
  42. hikyuu/data/clickhouse_upgrade/0002.sql +9 -0
  43. hikyuu/data/common_clickhouse.py +1 -3
  44. hikyuu/data/common_mysql.py +1 -1
  45. hikyuu/data/download_block.py +1 -1
  46. hikyuu/data/em_block_to_mysql.py +16 -4
  47. hikyuu/data/em_block_to_sqlite.py +16 -4
  48. hikyuu/data/hku_config_template.py +31 -4
  49. hikyuu/data/mysql_upgrade/0029.sql +2 -0
  50. hikyuu/data/mysql_upgrade/0030.sql +3 -0
  51. hikyuu/data/pytdx_to_clickhouse.py +86 -32
  52. hikyuu/data/pytdx_to_h5.py +73 -28
  53. hikyuu/data/pytdx_to_mysql.py +65 -21
  54. hikyuu/data/pytdx_weight_to_clickhouse.py +2 -0
  55. hikyuu/data/pytdx_weight_to_mysql.py +2 -0
  56. hikyuu/data/pytdx_weight_to_sqlite.py +2 -0
  57. hikyuu/data/sqlite_upgrade/0029.sql +4 -0
  58. hikyuu/data/sqlite_upgrade/0030.sql +5 -0
  59. hikyuu/data/tdx_to_clickhouse.py +2 -2
  60. hikyuu/data/tdx_to_h5.py +11 -11
  61. hikyuu/data/tdx_to_mysql.py +2 -2
  62. hikyuu/draw/__init__.pyi +1 -1
  63. hikyuu/draw/drawplot/__init__.pyi +1 -1
  64. hikyuu/draw/drawplot/bokeh_draw.pyi +17 -9
  65. hikyuu/draw/drawplot/echarts_draw.pyi +17 -9
  66. hikyuu/draw/drawplot/matplotlib_draw.py +23 -9
  67. hikyuu/draw/drawplot/matplotlib_draw.pyi +17 -9
  68. hikyuu/examples/notebook/001-overview.ipynb +112 -78
  69. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +52 -65
  70. hikyuu/examples/notebook/006-TradeManager.ipynb +402 -291
  71. hikyuu/examples/notebook/008-Pickle.ipynb +25 -17
  72. hikyuu/examples/notebook/009-RealData.ipynb +36 -38
  73. hikyuu/examples/notebook/Demo/Demo2.ipynb +146 -116
  74. hikyuu/extend.pyi +10 -4
  75. hikyuu/gui/HikyuuTDX.py +42 -3
  76. hikyuu/gui/data/MainWindow.py +189 -129
  77. hikyuu/gui/data/UseTdxImportToH5Thread.py +4 -2
  78. hikyuu/gui/start_qmt.py +1 -1
  79. hikyuu/hub.pyi +6 -6
  80. hikyuu/include/hikyuu/Block.h +9 -9
  81. hikyuu/include/hikyuu/HistoryFinanceInfo.h +3 -3
  82. hikyuu/include/hikyuu/KData.h +51 -28
  83. hikyuu/include/hikyuu/KDataImp.h +12 -7
  84. hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +13 -7
  85. hikyuu/include/hikyuu/KDataSharedBufferImp.h +8 -6
  86. hikyuu/include/hikyuu/KQuery.h +11 -11
  87. hikyuu/include/hikyuu/KRecord.h +1 -1
  88. hikyuu/include/hikyuu/MarketInfo.h +10 -10
  89. hikyuu/include/hikyuu/Stock.h +30 -30
  90. hikyuu/include/hikyuu/StockManager.h +28 -12
  91. hikyuu/include/hikyuu/StockTypeInfo.h +9 -9
  92. hikyuu/include/hikyuu/StockWeight.h +9 -9
  93. hikyuu/include/hikyuu/StrategyContext.h +4 -4
  94. hikyuu/include/hikyuu/TimeLineRecord.h +1 -1
  95. hikyuu/include/hikyuu/TransRecord.h +1 -1
  96. hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +2 -1
  97. hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
  98. hikyuu/include/hikyuu/data_driver/KDataDriver.h +6 -7
  99. hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +5 -1
  100. hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
  101. hikyuu/include/hikyuu/global/sysinfo.h +24 -5
  102. hikyuu/include/hikyuu/indicator/IndParam.h +1 -1
  103. hikyuu/include/hikyuu/indicator/Indicator.h +56 -27
  104. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +0 -4
  105. hikyuu/include/hikyuu/indicator/IndicatorImp.h +147 -74
  106. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +11 -1
  107. hikyuu/include/hikyuu/indicator/crt/IC.h +19 -14
  108. hikyuu/include/hikyuu/indicator/crt/ICIR.h +4 -7
  109. hikyuu/include/hikyuu/indicator/imp/IAbs.h +1 -0
  110. hikyuu/include/hikyuu/indicator/imp/IAcos.h +1 -0
  111. hikyuu/include/hikyuu/indicator/imp/IAd.h +0 -2
  112. hikyuu/include/hikyuu/indicator/imp/IAdvance.h +3 -0
  113. hikyuu/include/hikyuu/indicator/imp/IAma.h +3 -0
  114. hikyuu/include/hikyuu/indicator/imp/IAsin.h +1 -0
  115. hikyuu/include/hikyuu/indicator/imp/IAtan.h +1 -0
  116. hikyuu/include/hikyuu/indicator/imp/IAtr.h +2 -3
  117. hikyuu/include/hikyuu/indicator/imp/IBackset.h +2 -4
  118. hikyuu/include/hikyuu/indicator/imp/IBlockSetNum.h +3 -0
  119. hikyuu/include/hikyuu/indicator/imp/ICeil.h +1 -0
  120. hikyuu/include/hikyuu/indicator/imp/IContext.h +0 -3
  121. hikyuu/include/hikyuu/indicator/imp/ICorr.h +3 -0
  122. hikyuu/include/hikyuu/indicator/imp/ICos.h +1 -0
  123. hikyuu/include/hikyuu/indicator/imp/ICost.h +0 -2
  124. hikyuu/include/hikyuu/indicator/imp/ICount.h +2 -1
  125. hikyuu/include/hikyuu/indicator/imp/ICval.h +1 -4
  126. hikyuu/include/hikyuu/indicator/imp/ICycle.h +0 -2
  127. hikyuu/include/hikyuu/indicator/imp/IDecline.h +3 -0
  128. hikyuu/include/hikyuu/indicator/imp/IDevsq.h +4 -1
  129. hikyuu/include/hikyuu/indicator/imp/IDiff.h +1 -0
  130. hikyuu/include/hikyuu/indicator/imp/IDma.h +2 -0
  131. hikyuu/include/hikyuu/indicator/imp/IDropna.h +0 -4
  132. hikyuu/include/hikyuu/indicator/imp/IEma.h +3 -1
  133. hikyuu/include/hikyuu/indicator/imp/IEvery.h +5 -1
  134. hikyuu/include/hikyuu/indicator/imp/IExist.h +5 -1
  135. hikyuu/include/hikyuu/indicator/imp/IExp.h +1 -0
  136. hikyuu/include/hikyuu/indicator/imp/IFilter.h +4 -5
  137. hikyuu/include/hikyuu/indicator/imp/IFinance.h +1 -2
  138. hikyuu/include/hikyuu/indicator/imp/IFloor.h +1 -0
  139. hikyuu/include/hikyuu/indicator/imp/IHhvbars.h +5 -1
  140. hikyuu/include/hikyuu/indicator/imp/IHighLine.h +5 -1
  141. hikyuu/include/hikyuu/indicator/imp/IHsl.h +0 -2
  142. hikyuu/include/hikyuu/indicator/imp/IIc.h +3 -6
  143. hikyuu/include/hikyuu/indicator/imp/IInBlock.h +1 -2
  144. hikyuu/include/hikyuu/indicator/imp/IIntpart.h +1 -0
  145. hikyuu/include/hikyuu/indicator/imp/IIsInf.h +1 -0
  146. hikyuu/include/hikyuu/indicator/imp/IIsInfa.h +1 -0
  147. hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +0 -1
  148. hikyuu/include/hikyuu/indicator/imp/IIsNa.h +1 -0
  149. hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +1 -0
  150. hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +1 -0
  151. hikyuu/include/hikyuu/indicator/imp/IKData.h +1 -2
  152. hikyuu/include/hikyuu/indicator/imp/ILiuTongPan.h +0 -2
  153. hikyuu/include/hikyuu/indicator/imp/ILn.h +1 -0
  154. hikyuu/include/hikyuu/indicator/imp/ILog.h +1 -0
  155. hikyuu/include/hikyuu/indicator/imp/ILowLine.h +5 -1
  156. hikyuu/include/hikyuu/indicator/imp/ILowLineBars.h +5 -1
  157. hikyuu/include/hikyuu/indicator/imp/IMa.h +6 -1
  158. hikyuu/include/hikyuu/indicator/imp/IMacd.h +2 -0
  159. hikyuu/include/hikyuu/indicator/imp/INot.h +1 -0
  160. hikyuu/include/hikyuu/indicator/imp/IPow.h +3 -1
  161. hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +1 -0
  162. hikyuu/include/hikyuu/indicator/imp/IRecover.h +3 -0
  163. hikyuu/include/hikyuu/indicator/imp/IRef.h +3 -1
  164. hikyuu/include/hikyuu/indicator/imp/IResult.h +1 -0
  165. hikyuu/include/hikyuu/indicator/imp/IReverse.h +1 -0
  166. hikyuu/include/hikyuu/indicator/imp/IRoc.h +6 -1
  167. hikyuu/include/hikyuu/indicator/imp/IRocp.h +5 -1
  168. hikyuu/include/hikyuu/indicator/imp/IRocr.h +5 -1
  169. hikyuu/include/hikyuu/indicator/imp/IRocr100.h +5 -1
  170. hikyuu/include/hikyuu/indicator/imp/IRound.h +1 -0
  171. hikyuu/include/hikyuu/indicator/imp/IRoundDown.h +1 -0
  172. hikyuu/include/hikyuu/indicator/imp/IRoundUp.h +1 -0
  173. hikyuu/include/hikyuu/indicator/imp/ISaftyLoss.h +1 -0
  174. hikyuu/include/hikyuu/indicator/imp/ISign.h +1 -0
  175. hikyuu/include/hikyuu/indicator/imp/ISin.h +1 -0
  176. hikyuu/include/hikyuu/indicator/imp/ISlope.h +5 -1
  177. hikyuu/include/hikyuu/indicator/imp/ISma.h +2 -0
  178. hikyuu/include/hikyuu/indicator/imp/ISpearman.h +3 -0
  179. hikyuu/include/hikyuu/indicator/imp/ISqrt.h +1 -0
  180. hikyuu/include/hikyuu/indicator/imp/IStdev.h +5 -1
  181. hikyuu/include/hikyuu/indicator/imp/IStdp.h +5 -1
  182. hikyuu/include/hikyuu/indicator/imp/ISum.h +6 -1
  183. hikyuu/include/hikyuu/indicator/imp/ITan.h +1 -0
  184. hikyuu/include/hikyuu/indicator/imp/ITime.h +1 -2
  185. hikyuu/include/hikyuu/indicator/imp/ITimeLine.h +0 -2
  186. hikyuu/include/hikyuu/indicator/imp/ITr.h +1 -2
  187. hikyuu/include/hikyuu/indicator/imp/IVar.h +5 -1
  188. hikyuu/include/hikyuu/indicator/imp/IVarp.h +5 -1
  189. hikyuu/include/hikyuu/indicator/imp/IVigor.h +0 -2
  190. hikyuu/include/hikyuu/indicator/imp/IWma.h +5 -1
  191. hikyuu/include/hikyuu/indicator/imp/IZongGuBen.h +1 -2
  192. hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +0 -2
  193. hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +0 -2
  194. hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +0 -4
  195. hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +0 -3
  196. hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +0 -2
  197. hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +0 -2
  198. hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +2 -4
  199. hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +70 -90
  200. hikyuu/include/hikyuu/plugin/KDataToClickHouseImporter.h +40 -0
  201. hikyuu/include/hikyuu/plugin/KDataToMySQLImporter.h +40 -0
  202. hikyuu/include/hikyuu/plugin/checkdata.h +20 -0
  203. hikyuu/include/hikyuu/plugin/extind.h +3 -0
  204. hikyuu/include/hikyuu/plugin/hkuextra.h +4 -0
  205. hikyuu/include/hikyuu/plugin/interface/CheckDataPluginInterface.h +25 -0
  206. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +4 -0
  207. hikyuu/include/hikyuu/plugin/interface/ImportKDataToClickHousePluginInterface.h +44 -0
  208. hikyuu/include/hikyuu/plugin/interface/ImportKDataToMySQLPluginInterface.h +42 -0
  209. hikyuu/include/hikyuu/plugin/interface/plugins.h +6 -0
  210. hikyuu/include/hikyuu/python/convert_any.h +9 -6
  211. hikyuu/include/hikyuu/python/pybind_utils.h +22 -5
  212. hikyuu/include/hikyuu/strategy/Strategy.h +1 -1
  213. hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -3
  214. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +9 -3
  215. hikyuu/include/hikyuu/trade_manage/TradeRecord.h +2 -1
  216. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +8 -4
  217. hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +1 -0
  218. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedAmount.h +26 -0
  219. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixAmountFunds.h +18 -0
  220. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -3
  221. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +6 -3
  222. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -3
  223. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +23 -20
  224. hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +6 -4
  225. hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +5 -3
  226. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_EqualWeight.h +3 -3
  227. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICIRWeight.h +4 -4
  228. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICWeight.h +4 -4
  229. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +4 -4
  230. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +16 -13
  231. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +13 -13
  232. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +12 -3
  233. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor.h +1 -1
  234. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +1 -1
  235. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +1 -0
  236. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +1 -0
  237. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalSelectorBase.h +0 -2
  238. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/PerformanceOptimalSelector.h +0 -4
  239. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -3
  240. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -3
  241. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +5 -3
  242. hikyuu/include/hikyuu/trade_sys/system/System.h +6 -4
  243. hikyuu/include/hikyuu/utilities/Log.h +6 -7
  244. hikyuu/include/hikyuu/utilities/LruCache.h +299 -0
  245. hikyuu/include/hikyuu/utilities/Parameter.h +17 -0
  246. hikyuu/include/hikyuu/utilities/arithmetic.h +2 -2
  247. hikyuu/include/hikyuu/utilities/config.h +28 -0
  248. hikyuu/include/hikyuu/utilities/omp_macro.h +25 -0
  249. hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +17 -2
  250. hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +46 -22
  251. hikyuu/include/hikyuu/utilities/thread/GlobalStealThreadPool.h +71 -19
  252. hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -5
  253. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +286 -0
  254. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -0
  255. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +297 -0
  256. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -4
  257. hikyuu/include/hikyuu/utilities/thread/WorkStealQueue.h +9 -8
  258. hikyuu/include/hikyuu/utilities/thread/algorithm.h +350 -14
  259. hikyuu/include/hikyuu/version.h +4 -4
  260. hikyuu/plugin/libbacktest.so +0 -0
  261. hikyuu/plugin/libcheckdata.so +0 -0
  262. hikyuu/plugin/libclickhousedriver.so +0 -0
  263. hikyuu/plugin/libdataserver.so +0 -0
  264. hikyuu/plugin/libdataserver_parquet.so +0 -0
  265. hikyuu/plugin/libdevice.so +0 -0
  266. hikyuu/plugin/libextind.so +0 -0
  267. hikyuu/plugin/libhkuextra.so +0 -0
  268. hikyuu/plugin/libimport2ch.so +0 -0
  269. hikyuu/plugin/libimport2hdf5.so +0 -0
  270. hikyuu/plugin/libimport2mysql.so +0 -0
  271. hikyuu/plugin/libtmreport.so +0 -0
  272. hikyuu/test/Indicator.py +1 -2
  273. hikyuu/trade_manage/__init__.pyi +14 -8
  274. hikyuu/trade_manage/trade.pyi +14 -8
  275. hikyuu/trade_sys/trade_sys.py +54 -5
  276. hikyuu/util/__init__.pyi +2 -2
  277. hikyuu/util/singleton.pyi +1 -1
  278. {hikyuu-2.7.0.dist-info → hikyuu-2.7.5.dist-info}/METADATA +10 -4
  279. {hikyuu-2.7.0.dist-info → hikyuu-2.7.5.dist-info}/RECORD +282 -252
  280. hikyuu/cpp/libboost_chrono-mt.so +0 -0
  281. hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
  282. hikyuu/cpp/libboost_date_time-mt.so +0 -0
  283. hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
  284. hikyuu/cpp/libboost_serialization-mt.so +0 -0
  285. hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
  286. hikyuu/cpp/libboost_system-mt.so +0 -0
  287. hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
  288. hikyuu/cpp/libboost_thread-mt.so +0 -0
  289. hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
  290. hikyuu/cpp/libboost_wserialization-mt.so +0 -0
  291. hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
  292. hikyuu/data/pytdx_to_taos.py +0 -736
  293. {hikyuu-2.7.0.dist-info → hikyuu-2.7.5.dist-info}/WHEEL +0 -0
  294. {hikyuu-2.7.0.dist-info → hikyuu-2.7.5.dist-info}/entry_points.txt +0 -0
  295. {hikyuu-2.7.0.dist-info → hikyuu-2.7.5.dist-info}/top_level.txt +0 -0
@@ -113,7 +113,7 @@
113
113
  \
114
114
  void Cls_##func::_dyn_run_one_step(const Indicator &ind, size_t curPos, size_t step) { \
115
115
  int back = func_lookback(step); \
116
- HKU_IF_RETURN(back<0 || back + ind.discard()> curPos, void()); \
116
+ HKU_IF_RETURN(back < 0 || back + ind.discard() > curPos, void()); \
117
117
  \
118
118
  std::unique_ptr<double[]> buf = std::make_unique<double[]>(curPos); \
119
119
  auto const *src = ind.data(); \
@@ -181,7 +181,7 @@
181
181
  \
182
182
  void Cls_##func::_dyn_run_one_step(const Indicator &ind, size_t curPos, size_t step) { \
183
183
  int back = func_lookback(step); \
184
- HKU_IF_RETURN(back<0 || back + ind.discard()> curPos, void()); \
184
+ HKU_IF_RETURN(back < 0 || back + ind.discard() > curPos, void()); \
185
185
  \
186
186
  std::unique_ptr<int[]> buf = std::make_unique<int[]>(curPos); \
187
187
  auto const *src = ind.data(); \
@@ -283,7 +283,7 @@
283
283
  \
284
284
  void Cls_##func::_dyn_run_one_step(const Indicator &ind, size_t curPos, size_t step) { \
285
285
  int back = func_lookback(step); \
286
- HKU_IF_RETURN(back<0 || back + ind.discard()> curPos, void()); \
286
+ HKU_IF_RETURN(back < 0 || back + ind.discard() > curPos, void()); \
287
287
  \
288
288
  std::unique_ptr<int[]> buf = std::make_unique<int[]>(2 * curPos); \
289
289
  int *buf0 = buf.get(); \
@@ -350,7 +350,7 @@
350
350
  \
351
351
  void Cls_##func::_dyn_run_one_step(const Indicator &ind, size_t curPos, size_t step) { \
352
352
  int back = func_lookback(step); \
353
- HKU_IF_RETURN(back<0 || back + ind.discard()> curPos, void()); \
353
+ HKU_IF_RETURN(back < 0 || back + ind.discard() > curPos, void()); \
354
354
  \
355
355
  std::unique_ptr<double[]> buf = std::make_unique<double[]>(2 * curPos); \
356
356
  double *dst0 = buf.get(); \
@@ -418,7 +418,7 @@
418
418
  \
419
419
  void Cls_##func::_dyn_run_one_step(const Indicator &ind, size_t curPos, size_t step) { \
420
420
  int back = func_lookback(step); \
421
- HKU_IF_RETURN(back<0 || back + ind.discard()> curPos, void()); \
421
+ HKU_IF_RETURN(back < 0 || back + ind.discard() > curPos, void()); \
422
422
  \
423
423
  std::unique_ptr<double[]> buf = std::make_unique<double[]>(3 * curPos); \
424
424
  double *dst0 = buf.get(); \
@@ -558,11 +558,8 @@
558
558
  }
559
559
 
560
560
  #define TA_OHLC_OUT1_IMP(func, func_lookback) \
561
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
562
- \
563
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
564
- setParam<KData>("kdata", k); \
565
- Cls_##func::_calculate(Indicator()); \
561
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
562
+ m_need_context = true; \
566
563
  } \
567
564
  \
568
565
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -607,15 +604,14 @@
607
604
  } \
608
605
  \
609
606
  Indicator HKU_API func(const KData &k) { \
610
- return Indicator(make_shared<Cls_##func>(k)); \
607
+ auto p = make_shared<Cls_##func>(); \
608
+ p->setContext(k); \
609
+ return Indicator(p); \
611
610
  }
612
611
 
613
612
  #define TA_OHLC_OUT1_INT_IMP(func, func_lookback) \
614
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
615
- \
616
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
617
- setParam<KData>("kdata", k); \
618
- Cls_##func::_calculate(Indicator()); \
613
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
614
+ m_need_context = true; \
619
615
  } \
620
616
  \
621
617
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -665,21 +661,18 @@
665
661
  } \
666
662
  \
667
663
  Indicator HKU_API func(const KData &k) { \
668
- return Indicator(make_shared<Cls_##func>(k)); \
664
+ auto p = make_shared<Cls_##func>(); \
665
+ p->setContext(k); \
666
+ return Indicator(p); \
669
667
  }
670
668
 
671
669
  #define TA_OHLC_OUT1_INT_P1_D_IMP(func, func_lookback, param1, param1_value, param1_min, \
672
670
  param1_max) \
673
671
  Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
672
+ m_need_context = true; \
674
673
  setParam<double>(#param1, param1_value); \
675
674
  } \
676
675
  \
677
- Cls_##func::Cls_##func(const KData &k, double p) : IndicatorImp(#func, 1) { \
678
- setParam<KData>("kdata", k); \
679
- setParam<double>(#param1, p); \
680
- Cls_##func::_calculate(Indicator()); \
681
- } \
682
- \
683
676
  void Cls_##func::_checkParam(const string &name) const { \
684
677
  if (name == #param1) { \
685
678
  double p = getParam<double>(#param1); \
@@ -737,15 +730,15 @@
737
730
  } \
738
731
  \
739
732
  Indicator HKU_API func(const KData &k, double p) { \
740
- return Indicator(make_shared<Cls_##func>(k, p)); \
733
+ auto ptr = make_shared<Cls_##func>(); \
734
+ ptr->setParam<double>(#param1, p); \
735
+ ptr->setContext(k); \
736
+ return Indicator(ptr); \
741
737
  }
742
738
 
743
739
  #define TA_HLCV_OUT1_IMP(func, func_lookback) \
744
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
745
- \
746
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
747
- setParam<KData>("kdata", k); \
748
- Cls_##func::_calculate(Indicator()); \
740
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
741
+ m_need_context = true; \
749
742
  } \
750
743
  \
751
744
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -790,15 +783,14 @@
790
783
  } \
791
784
  \
792
785
  Indicator HKU_API func(const KData &k) { \
793
- return Indicator(make_shared<Cls_##func>(k)); \
786
+ auto ptr = make_shared<Cls_##func>(); \
787
+ ptr->setContext(k); \
788
+ return Indicator(ptr); \
794
789
  }
795
790
 
796
791
  #define TA_HL_OUT1_IMP(func, func_lookback) \
797
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
798
- \
799
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
800
- setParam<KData>("kdata", k); \
801
- Cls_##func::_calculate(Indicator()); \
792
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
793
+ m_need_context = true; \
802
794
  } \
803
795
  \
804
796
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -838,15 +830,14 @@
838
830
  } \
839
831
  \
840
832
  Indicator HKU_API func(const KData &k) { \
841
- return Indicator(make_shared<Cls_##func>(k)); \
833
+ auto ptr = make_shared<Cls_##func>(); \
834
+ ptr->setContext(k); \
835
+ return Indicator(ptr); \
842
836
  }
843
837
 
844
838
  #define TA_CV_OUT1_IMP(func, func_lookback) \
845
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
846
- \
847
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
848
- setParam<KData>("kdata", k); \
849
- Cls_##func::_calculate(Indicator()); \
839
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
840
+ m_need_context = true; \
850
841
  } \
851
842
  \
852
843
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -886,15 +877,14 @@
886
877
  } \
887
878
  \
888
879
  Indicator HKU_API func(const KData &k) { \
889
- return Indicator(make_shared<Cls_##func>(k)); \
880
+ auto ptr = make_shared<Cls_##func>(); \
881
+ ptr->setContext(k); \
882
+ return Indicator(ptr); \
890
883
  }
891
884
 
892
885
  #define TA_HLC_OUT1_IMP(func, func_lookback) \
893
- Cls_##func::Cls_##func() : IndicatorImp(#func, 1) {} \
894
- \
895
- Cls_##func::Cls_##func(const KData &k) : IndicatorImp(#func, 1) { \
896
- setParam<KData>("kdata", k); \
897
- Cls_##func::_calculate(Indicator()); \
886
+ Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
887
+ m_need_context = true; \
898
888
  } \
899
889
  \
900
890
  void Cls_##func::_calculate(const Indicator &data) { \
@@ -936,20 +926,17 @@
936
926
  } \
937
927
  \
938
928
  Indicator HKU_API func(const KData &k) { \
939
- return Indicator(make_shared<Cls_##func>(k)); \
929
+ auto ptr = make_shared<Cls_##func>(); \
930
+ ptr->setContext(k); \
931
+ return Indicator(ptr); \
940
932
  }
941
933
 
942
934
  #define TA_HLC_OUT1_N_IMP(func, func_lookback, period, period_min, period_max) \
943
935
  Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
936
+ m_need_context = true; \
944
937
  setParam<int>("n", period); \
945
938
  } \
946
939
  \
947
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 1) { \
948
- setParam<KData>("kdata", k); \
949
- setParam<int>("n", n); \
950
- Cls_##func::_calculate(Indicator()); \
951
- } \
952
- \
953
940
  void Cls_##func::_checkParam(const string &name) const { \
954
941
  if (name == "n") { \
955
942
  int n = getParam<int>("n"); \
@@ -1001,20 +988,18 @@
1001
988
  } \
1002
989
  \
1003
990
  Indicator HKU_API func(const KData &k, int n) { \
1004
- return Indicator(make_shared<Cls_##func>(k, n)); \
991
+ auto p = make_shared<Cls_##func>(); \
992
+ p->setParam<int>("n", n); \
993
+ p->setContext(k); \
994
+ return Indicator(p); \
1005
995
  }
1006
996
 
1007
997
  #define TA_HLCV_OUT1_N_IMP(func, func_lookback, period, period_min, period_max) \
1008
998
  Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
999
+ m_need_context = true; \
1009
1000
  setParam<int>("n", period); \
1010
1001
  } \
1011
1002
  \
1012
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 1) { \
1013
- setParam<KData>("kdata", k); \
1014
- setParam<int>("n", n); \
1015
- Cls_##func::_calculate(Indicator()); \
1016
- } \
1017
- \
1018
1003
  void Cls_##func::_checkParam(const string &name) const { \
1019
1004
  if (name == "n") { \
1020
1005
  int n = getParam<int>("n"); \
@@ -1069,20 +1054,18 @@
1069
1054
  } \
1070
1055
  \
1071
1056
  Indicator HKU_API func(const KData &k, int n) { \
1072
- return Indicator(make_shared<Cls_##func>(k, n)); \
1057
+ auto p = make_shared<Cls_##func>(); \
1058
+ p->setParam<int>("n", n); \
1059
+ p->setContext(k); \
1060
+ return Indicator(p); \
1073
1061
  }
1074
1062
 
1075
1063
  #define TA_HL_OUT1_N_IMP(func, func_lookback, period, period_min, period_max) \
1076
1064
  Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
1065
+ m_need_context = true; \
1077
1066
  setParam<int>("n", period); \
1078
1067
  } \
1079
1068
  \
1080
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 1) { \
1081
- setParam<KData>("kdata", k); \
1082
- setParam<int>("n", n); \
1083
- Cls_##func::_calculate(Indicator()); \
1084
- } \
1085
- \
1086
1069
  void Cls_##func::_checkParam(const string &name) const { \
1087
1070
  if (name == "n") { \
1088
1071
  int n = getParam<int>("n"); \
@@ -1131,20 +1114,18 @@
1131
1114
  } \
1132
1115
  \
1133
1116
  Indicator HKU_API func(const KData &k, int n) { \
1134
- return Indicator(make_shared<Cls_##func>(k, n)); \
1117
+ auto p = make_shared<Cls_##func>(); \
1118
+ p->setParam<int>("n", n); \
1119
+ p->setContext(k); \
1120
+ return Indicator(p); \
1135
1121
  }
1136
1122
 
1137
1123
  #define TA_HL_OUT2_N_IMP(func, func_lookback, period, period_min, period_max) \
1138
1124
  Cls_##func::Cls_##func() : IndicatorImp(#func, 2) { \
1125
+ m_need_context = true; \
1139
1126
  setParam<int>("n", period); \
1140
1127
  } \
1141
1128
  \
1142
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 2) { \
1143
- setParam<KData>("kdata", k); \
1144
- setParam<int>("n", n); \
1145
- Cls_##func::_calculate(Indicator()); \
1146
- } \
1147
- \
1148
1129
  void Cls_##func::_checkParam(const string &name) const { \
1149
1130
  if (name == "n") { \
1150
1131
  int n = getParam<int>("n"); \
@@ -1195,20 +1176,18 @@
1195
1176
  } \
1196
1177
  \
1197
1178
  Indicator HKU_API func(const KData &k, int n) { \
1198
- return Indicator(make_shared<Cls_##func>(k, n)); \
1179
+ auto p = make_shared<Cls_##func>(); \
1180
+ p->setParam<int>("n", n); \
1181
+ p->setContext(k); \
1182
+ return Indicator(p); \
1199
1183
  }
1200
1184
 
1201
1185
  #define TA_HLC_OUT3_N_IMP(func, func_lookback, period, period_min, period_max) \
1202
1186
  Cls_##func::Cls_##func() : IndicatorImp(#func, 3) { \
1187
+ m_need_context = true; \
1203
1188
  setParam<int>("n", period); \
1204
1189
  } \
1205
1190
  \
1206
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 3) { \
1207
- setParam<KData>("kdata", k); \
1208
- setParam<int>("n", n); \
1209
- Cls_##func::_calculate(Indicator()); \
1210
- } \
1211
- \
1212
1191
  void Cls_##func::_checkParam(const string &name) const { \
1213
1192
  if (name == "n") { \
1214
1193
  int n = getParam<int>("n"); \
@@ -1262,20 +1241,18 @@
1262
1241
  } \
1263
1242
  \
1264
1243
  Indicator HKU_API func(const KData &k, int n) { \
1265
- return Indicator(make_shared<Cls_##func>(k, n)); \
1244
+ auto p = make_shared<Cls_##func>(); \
1245
+ p->setParam<int>("n", n); \
1246
+ p->setContext(k); \
1247
+ return Indicator(p); \
1266
1248
  }
1267
1249
 
1268
1250
  #define TA_OC_OUT1_N_IMP(func, func_lookback, period, period_min, period_max) \
1269
1251
  Cls_##func::Cls_##func() : IndicatorImp(#func, 1) { \
1252
+ m_need_context = true; \
1270
1253
  setParam<int>("n", period); \
1271
1254
  } \
1272
1255
  \
1273
- Cls_##func::Cls_##func(const KData &k, int n) : IndicatorImp(#func, 1) { \
1274
- setParam<KData>("kdata", k); \
1275
- setParam<int>("n", n); \
1276
- Cls_##func::_calculate(Indicator()); \
1277
- } \
1278
- \
1279
1256
  void Cls_##func::_checkParam(const string &name) const { \
1280
1257
  if (name == "n") { \
1281
1258
  int n = getParam<int>("n"); \
@@ -1324,5 +1301,8 @@
1324
1301
  } \
1325
1302
  \
1326
1303
  Indicator HKU_API func(const KData &k, int n) { \
1327
- return Indicator(make_shared<Cls_##func>(k, n)); \
1304
+ auto p = make_shared<Cls_##func>(); \
1305
+ p->setParam<int>("n", n); \
1306
+ p->setContext(k); \
1307
+ return Indicator(p); \
1328
1308
  }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-05-06
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/DataType.h"
11
+ #include "interface/ImportKDataToClickHousePluginInterface.h"
12
+
13
+ namespace hku {
14
+
15
+ class HKU_API KDataToClickHouseImporter {
16
+ public:
17
+ KDataToClickHouseImporter();
18
+ virtual ~KDataToClickHouseImporter();
19
+
20
+ bool setConfig(const string& host, int port, const string& user, const string& pwd);
21
+
22
+ Datetime getLastDatetime(const string& market, const string& code, const KQuery::KType& ktype);
23
+
24
+ void addKRecordList(const string& market, const string& code, const vector<KRecord>& krecords,
25
+ const KQuery::KType& ktype);
26
+
27
+ void addTimeLineList(const string& market, const string& code, const TimeLineList& timeline);
28
+
29
+ void addTransList(const string& market, const string& code, const TransRecordList& translist);
30
+
31
+ void updateIndex(const string& market, const string& code, const KQuery::KType& ktype);
32
+
33
+ void remove(const string& market, const string& code, const KQuery::KType& ktype,
34
+ Datetime start);
35
+
36
+ private:
37
+ ImportKDataToClickHousePluginInterface* m_plugin{nullptr};
38
+ };
39
+
40
+ } // namespace hku
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-05-06
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/DataType.h"
11
+ #include "interface/ImportKDataToMySQLPluginInterface.h"
12
+
13
+ namespace hku {
14
+
15
+ class HKU_API KDataToMySQLImporter {
16
+ public:
17
+ KDataToMySQLImporter();
18
+ virtual ~KDataToMySQLImporter();
19
+
20
+ bool setConfig(const string& host, int port, const string& user, const string& pwd);
21
+
22
+ Datetime getLastDatetime(const string& market, const string& code, const KQuery::KType& ktype);
23
+
24
+ void addKRecordList(const string& market, const string& code, const vector<KRecord>& krecords,
25
+ const KQuery::KType& ktype);
26
+
27
+ void addTimeLineList(const string& market, const string& code, const TimeLineList& timeline);
28
+
29
+ void addTransList(const string& market, const string& code, const TransRecordList& translist);
30
+
31
+ void updateIndex(const string& market, const string& code, const KQuery::KType& ktype);
32
+
33
+ void remove(const string& market, const string& code, const KQuery::KType& ktype,
34
+ Datetime start);
35
+
36
+ private:
37
+ ImportKDataToMySQLPluginInterface* m_plugin{nullptr};
38
+ };
39
+
40
+ } // namespace hku
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-12-20
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/DataType.h"
11
+ #include "interface/CheckDataPluginInterface.h"
12
+
13
+ namespace hku {
14
+
15
+ std::pair<std::string, vector<std::string>> HKU_API checkData(const StockList& stock_list,
16
+ const Datetime& start_date,
17
+ const Datetime& end_date,
18
+ const KQuery::KType& check_ktype);
19
+
20
+ }
@@ -191,6 +191,9 @@ Indicator HKU_API AGG_VAR(const Indicator& ind, const KQuery::KType& ktype = KQu
191
191
  Indicator HKU_API AGG_QUANTILE(const Indicator& ind, const KQuery::KType& ktype = KQuery::MIN,
192
192
  bool fill_null = false, int unit = 1, double quantile = 0.75);
193
193
 
194
+ Indicator HKU_API AGG_VWAP(const KQuery::KType& ktype = KQuery::MIN, bool fill_null = false,
195
+ int unit = 1);
196
+
194
197
  using agg_func_t = std::function<double(const DatetimeList& src_ds, const Indicator::value_t* src,
195
198
  size_t group_start, size_t group_last)>;
196
199
  Indicator HKU_API AGG_FUNC(const Indicator& ind, agg_func_t agg_func,
@@ -37,6 +37,8 @@ void HKU_API registerExtraKType(const string& ktype, const string& basetype, int
37
37
  */
38
38
  void HKU_API releaseExtraKType();
39
39
 
40
+ void HKU_API enableKDataCache(bool enable);
41
+
40
42
  //-------------------------------
41
43
  // 以下函数为内部使用,无需引出
42
44
  //-------------------------------
@@ -56,4 +58,6 @@ bool getStockExtraIndexRange(const Stock& stk, const KQuery& query, size_t& out_
56
58
 
57
59
  KDataImpPtr getKDataImp(const Stock& stk, const KQuery& query);
58
60
 
61
+ bool canLazyLoad(const KQuery::KType& ktype);
62
+
59
63
  } // namespace hku
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-05-19
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/Stock.h"
11
+ #include "hikyuu/utilities/plugin/PluginBase.h"
12
+
13
+ namespace hku {
14
+
15
+ class CheckDataPluginInterface : public PluginBase {
16
+ public:
17
+ CheckDataPluginInterface() = default;
18
+ virtual ~CheckDataPluginInterface() = default;
19
+
20
+ virtual std::pair<std::string, vector<std::string>> checkData(
21
+ const StockList& stock_list, const Datetime& start_date, const Datetime& end_date,
22
+ const KQuery::KType& check_ktype) = 0;
23
+ };
24
+
25
+ } // namespace hku
@@ -35,6 +35,10 @@ public:
35
35
  size_t& out_end) = 0;
36
36
 
37
37
  virtual KDataImpPtr getKDataImp(const Stock& stk, const KQuery& query) = 0;
38
+
39
+ virtual bool canLazyLoad(const KQuery::KType& ktype) = 0;
40
+
41
+ virtual void enableKDataCache(bool enable) = 0;
38
42
  };
39
43
 
40
44
  } // namespace hku
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-04-08
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/KRecord.h"
11
+ #include "hikyuu/KQuery.h"
12
+ #include "hikyuu/TimeLineRecord.h"
13
+ #include "hikyuu/TransRecord.h"
14
+ #include "hikyuu/utilities/plugin/PluginBase.h"
15
+
16
+ namespace hku {
17
+
18
+ class ImportKDataToClickHousePluginInterface : public PluginBase {
19
+ public:
20
+ ImportKDataToClickHousePluginInterface() = default;
21
+ virtual ~ImportKDataToClickHousePluginInterface() = default;
22
+
23
+ virtual bool setConfig(const string& host, int port, const string& user, const string& pwd) = 0;
24
+
25
+ virtual Datetime getLastDatetime(const string& market, const string& code,
26
+ const KQuery::KType& ktype) = 0;
27
+
28
+ virtual void addKRecordList(const string& market, const string& code,
29
+ const vector<KRecord>& krecords, const KQuery::KType& ktype) = 0;
30
+
31
+ virtual void addTimeLineList(const string& market, const string& code,
32
+ const TimeLineList& timeline) = 0;
33
+
34
+ virtual void addTransList(const string& market, const string& code,
35
+ const TransRecordList& translist) = 0;
36
+
37
+ virtual void updateIndex(const string& market, const string& code,
38
+ const KQuery::KType& ktype) = 0;
39
+
40
+ virtual void remove(const string& market, const string& code, const KQuery::KType& ktype,
41
+ Datetime start) = 0;
42
+ };
43
+
44
+ } // namespace hku
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-04-08
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/KRecord.h"
11
+ #include "hikyuu/KQuery.h"
12
+ #include "hikyuu/utilities/plugin/PluginBase.h"
13
+
14
+ namespace hku {
15
+
16
+ class ImportKDataToMySQLPluginInterface : public PluginBase {
17
+ public:
18
+ ImportKDataToMySQLPluginInterface() = default;
19
+ virtual ~ImportKDataToMySQLPluginInterface() = default;
20
+
21
+ virtual bool setConfig(const string& host, int port, const string& user, const string& pwd) = 0;
22
+
23
+ virtual Datetime getLastDatetime(const string& market, const string& code,
24
+ const KQuery::KType& ktype) = 0;
25
+
26
+ virtual void addKRecordList(const string& market, const string& code,
27
+ const vector<KRecord>& krecords, const KQuery::KType& ktype) = 0;
28
+
29
+ virtual void updateIndex(const string& market, const string& code,
30
+ const KQuery::KType& ktype) = 0;
31
+
32
+ virtual void addTimeLineList(const string& market, const string& code,
33
+ const TimeLineList& timeline) = 0;
34
+
35
+ virtual void addTransList(const string& market, const string& code,
36
+ const TransRecordList& translist) = 0;
37
+
38
+ virtual void remove(const string& market, const string& code, const KQuery::KType& ktype,
39
+ Datetime start) = 0;
40
+ };
41
+
42
+ } // namespace hku
@@ -13,10 +13,13 @@
13
13
  #include "DevicePluginInterface.h"
14
14
  #include "DataServerPluginInterface.h"
15
15
  #include "ImportKDataToHdf5PluginInterface.h"
16
+ #include "ImportKDataToClickHousePluginInterface.h"
17
+ #include "ImportKDataToMySQLPluginInterface.h"
16
18
  #include "ExtendIndicatorsPluginInterface.h"
17
19
  #include "TMReportPluginInterface.h"
18
20
  #include "DataDriverPluginInterface.h"
19
21
  #include "HkuExtraPluginInterface.h"
22
+ #include "CheckDataPluginInterface.h"
20
23
 
21
24
  namespace hku {
22
25
 
@@ -24,9 +27,12 @@ namespace hku {
24
27
  #define HKU_PLUGIN_DEVICE "device"
25
28
  #define HKU_PLUGIN_DATASERVER "dataserver"
26
29
  #define HKU_PLUGIN_IMPORTKDATATOHDF5 "import2hdf5"
30
+ #define HKU_PLUGIN_IMPORTKDATATOCLICKHOUSE "import2ch"
31
+ #define HKU_PLUGIN_IMPORTKDATATOMYSQL "import2mysql"
27
32
  #define HKU_PLUGIN_EXTEND_INDICATOR "extind"
28
33
  #define HKU_PLUGIN_TMREPORT "tmreport"
29
34
  #define HKU_PLUGIN_CLICKHOUSE_DRIVER "clickhousedriver"
30
35
  #define HKU_PLUGIN_HKU_EXTRA "hkuextra"
36
+ #define HKU_PLUGIN_CHECK_DATA "checkdata"
31
37
 
32
38
  } // namespace hku