hikyuu 2.5.6__py3-none-win_amd64.whl → 2.6.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 (72) hide show
  1. hikyuu/__init__.py +15 -0
  2. hikyuu/__init__.pyi +16 -7
  3. hikyuu/analysis/__init__.pyi +7 -0
  4. hikyuu/analysis/analysis.pyi +8 -1
  5. hikyuu/core.pyi +9 -2
  6. hikyuu/cpp/core310.pyd +0 -0
  7. hikyuu/cpp/core310.pyi +150 -19
  8. hikyuu/cpp/core311.pyd +0 -0
  9. hikyuu/cpp/core311.pyi +150 -19
  10. hikyuu/cpp/core312.pyd +0 -0
  11. hikyuu/cpp/core312.pyi +150 -19
  12. hikyuu/cpp/core313.pyd +0 -0
  13. hikyuu/cpp/core313.pyi +149 -19
  14. hikyuu/cpp/core39.pyd +0 -0
  15. hikyuu/cpp/core39.pyi +150 -19
  16. hikyuu/cpp/hikyuu.dll +0 -0
  17. hikyuu/cpp/hikyuu.lib +0 -0
  18. hikyuu/draw/drawplot/__init__.py +2 -0
  19. hikyuu/draw/drawplot/__init__.pyi +1 -0
  20. hikyuu/draw/drawplot/bokeh_draw.pyi +12 -4
  21. hikyuu/draw/drawplot/echarts_draw.pyi +12 -4
  22. hikyuu/draw/drawplot/matplotlib_draw.py +80 -0
  23. hikyuu/draw/drawplot/matplotlib_draw.pyi +22 -4
  24. hikyuu/examples/notebook/002-HowToGetStock.ipynb +1 -1
  25. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +117 -52
  26. hikyuu/extend.pyi +9 -2
  27. hikyuu/gui/HikyuuTDX.py +19 -3
  28. hikyuu/gui/data/MainWindow.py +87 -24
  29. hikyuu/gui/dataserver.py +25 -0
  30. hikyuu/gui/images/star.png +0 -0
  31. hikyuu/hub.pyi +6 -6
  32. hikyuu/include/hikyuu/StockManager.h +23 -0
  33. hikyuu/include/hikyuu/global/agent/spot_generated.h +3 -3
  34. hikyuu/include/hikyuu/plugin/__init__.py +1 -0
  35. hikyuu/include/hikyuu/plugin/backtest.h +37 -0
  36. hikyuu/include/hikyuu/plugin/dataserver.h +18 -0
  37. hikyuu/include/hikyuu/plugin/device.h +29 -0
  38. hikyuu/include/hikyuu/plugin/interface/BackTestPluginInterface.h +26 -0
  39. hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +23 -0
  40. hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +25 -0
  41. hikyuu/include/hikyuu/plugin/interface/__init__.py +1 -0
  42. hikyuu/include/hikyuu/plugin/interface/plugins.h +20 -0
  43. hikyuu/include/hikyuu/python/pybind_utils.h +8 -0
  44. hikyuu/include/hikyuu/strategy/BrokerTradeManager.h +2 -1
  45. hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +1 -0
  46. hikyuu/include/hikyuu/strategy/Strategy.h +96 -16
  47. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +4 -2
  48. hikyuu/include/hikyuu/trade_sys/system/imp/WalkForwardTradeManager.h +3 -2
  49. hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +2 -2
  50. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +66 -13
  51. hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +72 -0
  52. hikyuu/include/hikyuu/version.h +5 -5
  53. hikyuu/plugin/__init__.py +1 -0
  54. hikyuu/plugin/backtest.dll +0 -0
  55. hikyuu/plugin/dataserver.dll +0 -0
  56. hikyuu/plugin/device.dll +0 -0
  57. hikyuu/strategy/strategy_demo1.py +7 -8
  58. hikyuu/strategy/strategy_demo2.py +1 -1
  59. hikyuu/trade_manage/__init__.pyi +11 -3
  60. hikyuu/trade_manage/trade.pyi +11 -3
  61. hikyuu/util/__init__.pyi +1 -1
  62. hikyuu/util/singleton.pyi +1 -1
  63. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/METADATA +6 -2
  64. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/RECORD +69 -56
  65. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/entry_points.txt +1 -0
  66. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/top_level.txt +4 -0
  67. hikyuu/cpp/core38.pyd +0 -0
  68. hikyuu/cpp/core38.pyi +0 -13173
  69. hikyuu/examples/notebook/011-PyechartsDrawplot.ipynb +0 -21821
  70. /hikyuu/gui/{hikyuu_small.png → images/hikyuu_small.png} +0 -0
  71. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/LICENSE +0 -0
  72. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/WHEEL +0 -0
hikyuu/extend.pyi CHANGED
@@ -446,11 +446,13 @@ from hikyuu.cpp.core312 import ZSCORE
446
446
  from hikyuu.cpp.core312 import __add__ as __old_Datetime_add__
447
447
  from hikyuu.cpp.core312 import __add__ as __old_TimeDelta_add__
448
448
  from hikyuu.cpp.core312 import __init__ as __old_Datetime_init__
449
+ from hikyuu.cpp.core312 import __init__ as __old_TimeDelta_init__
449
450
  from hikyuu.cpp.core312 import __init__ as old_Query_init
450
451
  from hikyuu.cpp.core312 import __init__ as __old_StrategyContext_init__
451
- from hikyuu.cpp.core312 import __init__ as __old_TimeDelta_init__
452
452
  from hikyuu.cpp.core312 import __sub__ as __old_Datetime_sub__
453
453
  from hikyuu.cpp.core312 import __sub__ as __old_TimeDelta_sub__
454
+ from hikyuu.cpp.core312 import active_device
455
+ from hikyuu.cpp.core312 import backtest
454
456
  from hikyuu.cpp.core312 import batch_calculate_inds
455
457
  from hikyuu.cpp.core312 import can_upgrade
456
458
  from hikyuu.cpp.core312 import close_ostream_to_python
@@ -462,6 +464,7 @@ from hikyuu.cpp.core312 import crtSEOptimal
462
464
  from hikyuu.cpp.core312 import crtTM
463
465
  from hikyuu.cpp.core312 import crt_pf_strategy
464
466
  from hikyuu.cpp.core312 import crt_sys_strategy
467
+ from hikyuu.cpp.core312 import fetch_trial_license
465
468
  from hikyuu.cpp.core312 import find_optimal_system
466
469
  from hikyuu.cpp.core312 import find_optimal_system_multi
467
470
  from hikyuu.cpp.core312 import get_block
@@ -485,6 +488,7 @@ from hikyuu.cpp.core312 import isinf
485
488
  from hikyuu.cpp.core312 import isnan
486
489
  from hikyuu.cpp.core312 import open_ostream_to_python
487
490
  from hikyuu.cpp.core312 import open_spend_time
491
+ from hikyuu.cpp.core312 import remove_license
488
492
  from hikyuu.cpp.core312 import roundDown
489
493
  from hikyuu.cpp.core312 import roundEx
490
494
  from hikyuu.cpp.core312 import roundUp
@@ -492,14 +496,17 @@ from hikyuu.cpp.core312 import run_in_strategy
492
496
  from hikyuu.cpp.core312 import set_log_level
493
497
  from hikyuu.cpp.core312 import set_python_in_interactive
494
498
  from hikyuu.cpp.core312 import set_python_in_jupyter
499
+ from hikyuu.cpp.core312 import start_data_server
495
500
  from hikyuu.cpp.core312 import start_spot_agent
501
+ from hikyuu.cpp.core312 import stop_data_server
496
502
  from hikyuu.cpp.core312 import stop_spot_agent
497
503
  from hikyuu.cpp.core312 import toPriceList
504
+ from hikyuu.cpp.core312 import view_license
498
505
  import numpy as np
499
506
  import os as os
500
507
  import pandas as pd
501
508
  import sys as sys
502
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CEILING', 'CN_Bool', 'CN_OPLine', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'HHV', 'HHVBARS', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA_PART', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockManager', 'StockTypeInfo', 'StockWeight', 'StockWeightList', 'StoplossBase', 'Strategy', 'StrategyContext', 'System', 'SystemPart', 'SystemWeight', 'SystemWeightList', 'TAN', 'TA_ACCBANDS', 'TA_ACOS', 'TA_AD', 'TA_ADD', 'TA_ADOSC', 'TA_ADX', 'TA_ADXR', 'TA_APO', 'TA_AROON', 'TA_AROONOSC', 'TA_ASIN', 'TA_ATAN', 'TA_ATR', 'TA_AVGDEV', 'TA_AVGPRICE', 'TA_BBANDS', 'TA_BETA', 'TA_BOP', 'TA_CCI', 'TA_CDL2CROWS', 'TA_CDL3BLACKCROWS', 'TA_CDL3INSIDE', 'TA_CDL3LINESTRIKE', 'TA_CDL3OUTSIDE', 'TA_CDL3STARSINSOUTH', 'TA_CDL3WHITESOLDIERS', 'TA_CDLABANDONEDBABY', 'TA_CDLADVANCEBLOCK', 'TA_CDLBELTHOLD', 'TA_CDLBREAKAWAY', 'TA_CDLCLOSINGMARUBOZU', 'TA_CDLCONCEALBABYSWALL', 'TA_CDLCOUNTERATTACK', 'TA_CDLDARKCLOUDCOVER', 'TA_CDLDOJI', 'TA_CDLDOJISTAR', 'TA_CDLDRAGONFLYDOJI', 'TA_CDLENGULFING', 'TA_CDLEVENINGDOJISTAR', 'TA_CDLEVENINGSTAR', 'TA_CDLGAPSIDESIDEWHITE', 'TA_CDLGRAVESTONEDOJI', 'TA_CDLHAMMER', 'TA_CDLHANGINGMAN', 'TA_CDLHARAMI', 'TA_CDLHARAMICROSS', 'TA_CDLHIGHWAVE', 'TA_CDLHIKKAKE', 'TA_CDLHIKKAKEMOD', 'TA_CDLHOMINGPIGEON', 'TA_CDLIDENTICAL3CROWS', 'TA_CDLINNECK', 'TA_CDLINVERTEDHAMMER', 'TA_CDLKICKING', 'TA_CDLKICKINGBYLENGTH', 'TA_CDLLADDERBOTTOM', 'TA_CDLLONGLEGGEDDOJI', 'TA_CDLLONGLINE', 'TA_CDLMARUBOZU', 'TA_CDLMATCHINGLOW', 'TA_CDLMATHOLD', 'TA_CDLMORNINGDOJISTAR', 'TA_CDLMORNINGSTAR', 'TA_CDLONNECK', 'TA_CDLPIERCING', 'TA_CDLRICKSHAWMAN', 'TA_CDLRISEFALL3METHODS', 'TA_CDLSEPARATINGLINES', 'TA_CDLSHOOTINGSTAR', 'TA_CDLSHORTLINE', 'TA_CDLSPINNINGTOP', 'TA_CDLSTALLEDPATTERN', 'TA_CDLSTICKSANDWICH', 'TA_CDLTAKURI', 'TA_CDLTASUKIGAP', 'TA_CDLTHRUSTING', 'TA_CDLTRISTAR', 'TA_CDLUNIQUE3RIVER', 'TA_CDLUPSIDEGAP2CROWS', 'TA_CDLXSIDEGAP3METHODS', 'TA_CEIL', 'TA_CMO', 'TA_CORREL', 'TA_COS', 'TA_COSH', 'TA_DEMA', 'TA_DIV', 'TA_DX', 'TA_EMA', 'TA_EXP', 'TA_FLOOR', 'TA_HT_DCPERIOD', 'TA_HT_DCPHASE', 'TA_HT_PHASOR', 'TA_HT_SINE', 'TA_HT_TRENDLINE', 'TA_HT_TRENDMODE', 'TA_IMI', 'TA_KAMA', 'TA_LINEARREG', 'TA_LINEARREG_ANGLE', 'TA_LINEARREG_INTERCEPT', 'TA_LINEARREG_SLOPE', 'TA_LN', 'TA_LOG10', 'TA_MA', 'TA_MACD', 'TA_MACDEXT', 'TA_MACDFIX', 'TA_MAMA', 'TA_MAVP', 'TA_MAX', 'TA_MAXINDEX', 'TA_MEDPRICE', 'TA_MFI', 'TA_MIDPOINT', 'TA_MIDPRICE', 'TA_MIN', 'TA_MININDEX', 'TA_MINMAX', 'TA_MINMAXINDEX', 'TA_MINUS_DI', 'TA_MINUS_DM', 'TA_MOM', 'TA_MULT', 'TA_NATR', 'TA_OBV', 'TA_PLUS_DI', 'TA_PLUS_DM', 'TA_PPO', 'TA_ROC', 'TA_ROCP', 'TA_ROCR', 'TA_ROCR100', 'TA_RSI', 'TA_SAR', 'TA_SAREXT', 'TA_SIN', 'TA_SINH', 'TA_SMA', 'TA_SQRT', 'TA_STDDEV', 'TA_STOCH', 'TA_STOCHF', 'TA_STOCHRSI', 'TA_SUB', 'TA_SUM', 'TA_T3', 'TA_TAN', 'TA_TANH', 'TA_TEMA', 'TA_TRANGE', 'TA_TRIMA', 'TA_TRIX', 'TA_TSF', 'TA_TYPPRICE', 'TA_ULTOSC', 'TA_VAR', 'TA_WCLPRICE', 'TA_WILLR', 'TA_WMA', 'TC_FixedA', 'TC_FixedA2015', 'TC_FixedA2017', 'TC_TestStub', 'TC_Zero', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'batch_calculate_inds', 'can_upgrade', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_kdata', 'get_last_version', 'get_log_level', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'hikyuu_init', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'isinf', 'isnan', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'pd', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_spot_agent', 'stop_spot_agent', 'sys', 'time', 'timedelta', 'timezone', 'toPriceList', 'tzinfo']
509
+ __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CEILING', 'CN_Bool', 'CN_OPLine', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'HHV', 'HHVBARS', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA_PART', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockManager', 'StockTypeInfo', 'StockWeight', 'StockWeightList', 'StoplossBase', 'Strategy', 'StrategyContext', 'System', 'SystemPart', 'SystemWeight', 'SystemWeightList', 'TAN', 'TA_ACCBANDS', 'TA_ACOS', 'TA_AD', 'TA_ADD', 'TA_ADOSC', 'TA_ADX', 'TA_ADXR', 'TA_APO', 'TA_AROON', 'TA_AROONOSC', 'TA_ASIN', 'TA_ATAN', 'TA_ATR', 'TA_AVGDEV', 'TA_AVGPRICE', 'TA_BBANDS', 'TA_BETA', 'TA_BOP', 'TA_CCI', 'TA_CDL2CROWS', 'TA_CDL3BLACKCROWS', 'TA_CDL3INSIDE', 'TA_CDL3LINESTRIKE', 'TA_CDL3OUTSIDE', 'TA_CDL3STARSINSOUTH', 'TA_CDL3WHITESOLDIERS', 'TA_CDLABANDONEDBABY', 'TA_CDLADVANCEBLOCK', 'TA_CDLBELTHOLD', 'TA_CDLBREAKAWAY', 'TA_CDLCLOSINGMARUBOZU', 'TA_CDLCONCEALBABYSWALL', 'TA_CDLCOUNTERATTACK', 'TA_CDLDARKCLOUDCOVER', 'TA_CDLDOJI', 'TA_CDLDOJISTAR', 'TA_CDLDRAGONFLYDOJI', 'TA_CDLENGULFING', 'TA_CDLEVENINGDOJISTAR', 'TA_CDLEVENINGSTAR', 'TA_CDLGAPSIDESIDEWHITE', 'TA_CDLGRAVESTONEDOJI', 'TA_CDLHAMMER', 'TA_CDLHANGINGMAN', 'TA_CDLHARAMI', 'TA_CDLHARAMICROSS', 'TA_CDLHIGHWAVE', 'TA_CDLHIKKAKE', 'TA_CDLHIKKAKEMOD', 'TA_CDLHOMINGPIGEON', 'TA_CDLIDENTICAL3CROWS', 'TA_CDLINNECK', 'TA_CDLINVERTEDHAMMER', 'TA_CDLKICKING', 'TA_CDLKICKINGBYLENGTH', 'TA_CDLLADDERBOTTOM', 'TA_CDLLONGLEGGEDDOJI', 'TA_CDLLONGLINE', 'TA_CDLMARUBOZU', 'TA_CDLMATCHINGLOW', 'TA_CDLMATHOLD', 'TA_CDLMORNINGDOJISTAR', 'TA_CDLMORNINGSTAR', 'TA_CDLONNECK', 'TA_CDLPIERCING', 'TA_CDLRICKSHAWMAN', 'TA_CDLRISEFALL3METHODS', 'TA_CDLSEPARATINGLINES', 'TA_CDLSHOOTINGSTAR', 'TA_CDLSHORTLINE', 'TA_CDLSPINNINGTOP', 'TA_CDLSTALLEDPATTERN', 'TA_CDLSTICKSANDWICH', 'TA_CDLTAKURI', 'TA_CDLTASUKIGAP', 'TA_CDLTHRUSTING', 'TA_CDLTRISTAR', 'TA_CDLUNIQUE3RIVER', 'TA_CDLUPSIDEGAP2CROWS', 'TA_CDLXSIDEGAP3METHODS', 'TA_CEIL', 'TA_CMO', 'TA_CORREL', 'TA_COS', 'TA_COSH', 'TA_DEMA', 'TA_DIV', 'TA_DX', 'TA_EMA', 'TA_EXP', 'TA_FLOOR', 'TA_HT_DCPERIOD', 'TA_HT_DCPHASE', 'TA_HT_PHASOR', 'TA_HT_SINE', 'TA_HT_TRENDLINE', 'TA_HT_TRENDMODE', 'TA_IMI', 'TA_KAMA', 'TA_LINEARREG', 'TA_LINEARREG_ANGLE', 'TA_LINEARREG_INTERCEPT', 'TA_LINEARREG_SLOPE', 'TA_LN', 'TA_LOG10', 'TA_MA', 'TA_MACD', 'TA_MACDEXT', 'TA_MACDFIX', 'TA_MAMA', 'TA_MAVP', 'TA_MAX', 'TA_MAXINDEX', 'TA_MEDPRICE', 'TA_MFI', 'TA_MIDPOINT', 'TA_MIDPRICE', 'TA_MIN', 'TA_MININDEX', 'TA_MINMAX', 'TA_MINMAXINDEX', 'TA_MINUS_DI', 'TA_MINUS_DM', 'TA_MOM', 'TA_MULT', 'TA_NATR', 'TA_OBV', 'TA_PLUS_DI', 'TA_PLUS_DM', 'TA_PPO', 'TA_ROC', 'TA_ROCP', 'TA_ROCR', 'TA_ROCR100', 'TA_RSI', 'TA_SAR', 'TA_SAREXT', 'TA_SIN', 'TA_SINH', 'TA_SMA', 'TA_SQRT', 'TA_STDDEV', 'TA_STOCH', 'TA_STOCHF', 'TA_STOCHRSI', 'TA_SUB', 'TA_SUM', 'TA_T3', 'TA_TAN', 'TA_TANH', 'TA_TEMA', 'TA_TRANGE', 'TA_TRIMA', 'TA_TRIX', 'TA_TSF', 'TA_TYPPRICE', 'TA_ULTOSC', 'TA_VAR', 'TA_WCLPRICE', 'TA_WILLR', 'TA_WMA', 'TC_FixedA', 'TC_FixedA2015', 'TC_FixedA2017', 'TC_TestStub', 'TC_Zero', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'backtest', 'batch_calculate_inds', 'can_upgrade', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'fetch_trial_license', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_kdata', 'get_last_version', 'get_log_level', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'hikyuu_init', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'isinf', 'isnan', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'pd', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'time', 'timedelta', 'timezone', 'toPriceList', 'tzinfo', 'view_license']
503
510
  def DatetimeList_to_df(data):
504
511
  """
505
512
  仅在安装了pandas模块时生效,转换为pandas.DataFrame
hikyuu/gui/HikyuuTDX.py CHANGED
@@ -16,7 +16,7 @@ import PyQt5
16
16
 
17
17
  from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox
18
18
  from PyQt5.QtCore import pyqtSlot, QObject, pyqtSignal
19
- from PyQt5.QtGui import QIcon, QTextCursor, QFont, QPalette
19
+ from PyQt5.QtGui import QIcon, QTextCursor, QFont, QPalette, QPixmap
20
20
 
21
21
  import mysql.connector
22
22
  from mysql.connector import errorcode
@@ -33,7 +33,7 @@ from hikyuu.gui.data.CollectSpotThread import CollectSpotThread
33
33
  from hikyuu.gui.data.SchedImportThread import SchedImportThread
34
34
  from hikyuu.gui.spot_server import release_nng_senders
35
35
 
36
- from hikyuu import can_upgrade, get_last_version
36
+ from hikyuu import can_upgrade, get_last_version, fetch_trial_license, view_license
37
37
  from hikyuu.data import hku_config_template
38
38
  from hikyuu.util import *
39
39
 
@@ -267,7 +267,14 @@ class MyMainWindow(QMainWindow, Ui_MainWindow):
267
267
  self.log_textEdit.document().setMaximumBlockCount(1000)
268
268
 
269
269
  current_dir = os.path.dirname(__file__)
270
- icon = QIcon(f"{current_dir}/hikyuu_small.png")
270
+ icon = QIcon(f"{current_dir}/images/hikyuu_small.png")
271
+ star_img = QPixmap(f"{current_dir}/images/star.png")
272
+ self.label_44.setPixmap(star_img)
273
+ self.label_46.setOpenExternalLinks(True)
274
+ self.label_license.setText(view_license())
275
+ if os.path.exists(self.getUserConfigDir() + '/.hikyuu.lic'):
276
+ self.fetch_trial_pushButton.setEnabled(False)
277
+
271
278
  self.setWindowIcon(icon)
272
279
  QApplication.instance().setWindowIcon(icon)
273
280
  self.import_detail_textEdit.clear()
@@ -494,6 +501,15 @@ class MyMainWindow(QMainWindow, Ui_MainWindow):
494
501
  '5MIN': self.hdf5_5min_progressBar
495
502
  }
496
503
 
504
+ @pyqtSlot()
505
+ def on_fetch_trial_pushButton_clicked(self):
506
+ email = self.email_lineEdit.text()
507
+ info = fetch_trial_license(email)
508
+ QMessageBox.about(self, "获取试用许可", info)
509
+ self.label_license.setText(view_license())
510
+ if os.path.exists(self.getUserConfigDir() + '/.hikyuu.lic'):
511
+ self.fetch_trial_pushButton.setEnabled(False)
512
+
497
513
  @pyqtSlot()
498
514
  def on_pytdx_radioButton_clicked(self):
499
515
  if self.pytdx_radioButton.isChecked():
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Form implementation generated from reading ui file 'MainWindow.ui'
4
4
  #
5
- # Created by: PyQt5 UI code generator 5.15.10
5
+ # Created by: PyQt5 UI code generator 5.15.11
6
6
  #
7
7
  # WARNING: Any manual changes made to this file will be lost when pyuic5 is
8
8
  # run again. Do not edit this file unless you know what you are doing.
@@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
14
14
  class Ui_MainWindow(object):
15
15
  def setupUi(self, MainWindow):
16
16
  MainWindow.setObjectName("MainWindow")
17
- MainWindow.resize(1269, 690)
17
+ MainWindow.resize(1269, 797)
18
18
  self.centralwidget = QtWidgets.QWidget(MainWindow)
19
19
  self.centralwidget.setObjectName("centralwidget")
20
20
  self.horizontalLayout_12 = QtWidgets.QHBoxLayout(self.centralwidget)
@@ -165,7 +165,7 @@ class Ui_MainWindow(object):
165
165
  self.label_6.setObjectName("label_6")
166
166
  self.gridLayout_4.addWidget(self.label_6, 3, 0, 1, 1)
167
167
  self.min5_start_dateEdit = QtWidgets.QDateEdit(self.groupBox_7)
168
- self.min5_start_dateEdit.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1989, 12, 30), QtCore.QTime(8, 0, 0)))
168
+ self.min5_start_dateEdit.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1989, 12, 28), QtCore.QTime(8, 0, 0)))
169
169
  self.min5_start_dateEdit.setCalendarPopup(True)
170
170
  self.min5_start_dateEdit.setObjectName("min5_start_dateEdit")
171
171
  self.gridLayout_4.addWidget(self.min5_start_dateEdit, 1, 1, 1, 1)
@@ -187,7 +187,7 @@ class Ui_MainWindow(object):
187
187
  self.trans_start_dateEdit.setObjectName("trans_start_dateEdit")
188
188
  self.gridLayout_4.addWidget(self.trans_start_dateEdit, 3, 1, 1, 1)
189
189
  self.day_start_dateEdit = QtWidgets.QDateEdit(self.groupBox_7)
190
- self.day_start_dateEdit.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1989, 12, 30), QtCore.QTime(8, 0, 0)))
190
+ self.day_start_dateEdit.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1989, 12, 28), QtCore.QTime(8, 0, 0)))
191
191
  self.day_start_dateEdit.setCalendarPopup(True)
192
192
  self.day_start_dateEdit.setObjectName("day_start_dateEdit")
193
193
  self.gridLayout_4.addWidget(self.day_start_dateEdit, 0, 1, 1, 1)
@@ -681,6 +681,61 @@ class Ui_MainWindow(object):
681
681
  self.horizontalLayout_17.addWidget(self.textBrowser)
682
682
  self.verticalLayout_2.addLayout(self.horizontalLayout_17)
683
683
  self.tabWidget.addTab(self.tab, "")
684
+ self.tab_star = QtWidgets.QWidget()
685
+ self.tab_star.setEnabled(True)
686
+ self.tab_star.setObjectName("tab_star")
687
+ self.label_44 = QtWidgets.QLabel(self.tab_star)
688
+ self.label_44.setGeometry(QtCore.QRect(40, 370, 291, 171))
689
+ self.label_44.setText("")
690
+ self.label_44.setPixmap(QtGui.QPixmap("../images/star.png"))
691
+ self.label_44.setScaledContents(True)
692
+ self.label_44.setObjectName("label_44")
693
+ self.label_46 = QtWidgets.QLabel(self.tab_star)
694
+ self.label_46.setGeometry(QtCore.QRect(30, 10, 561, 201))
695
+ self.label_46.setObjectName("label_46")
696
+ self.line_2 = QtWidgets.QFrame(self.tab_star)
697
+ self.line_2.setGeometry(QtCore.QRect(30, 200, 531, 16))
698
+ self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
699
+ self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
700
+ self.line_2.setObjectName("line_2")
701
+ self.label_47 = QtWidgets.QLabel(self.tab_star)
702
+ self.label_47.setGeometry(QtCore.QRect(40, 230, 121, 16))
703
+ self.label_47.setObjectName("label_47")
704
+ self.line_3 = QtWidgets.QFrame(self.tab_star)
705
+ self.line_3.setGeometry(QtCore.QRect(30, 310, 531, 16))
706
+ self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
707
+ self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
708
+ self.line_3.setObjectName("line_3")
709
+ self.label_48 = QtWidgets.QLabel(self.tab_star)
710
+ self.label_48.setGeometry(QtCore.QRect(40, 340, 211, 16))
711
+ self.label_48.setObjectName("label_48")
712
+ self.line_4 = QtWidgets.QFrame(self.tab_star)
713
+ self.line_4.setGeometry(QtCore.QRect(30, 560, 531, 16))
714
+ self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
715
+ self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
716
+ self.line_4.setObjectName("line_4")
717
+ self.label_49 = QtWidgets.QLabel(self.tab_star)
718
+ self.label_49.setGeometry(QtCore.QRect(40, 580, 81, 16))
719
+ self.label_49.setObjectName("label_49")
720
+ self.label_license = QtWidgets.QLabel(self.tab_star)
721
+ self.label_license.setGeometry(QtCore.QRect(40, 610, 521, 91))
722
+ self.label_license.setObjectName("label_license")
723
+ self.widget = QtWidgets.QWidget(self.tab_star)
724
+ self.widget.setGeometry(QtCore.QRect(40, 260, 511, 33))
725
+ self.widget.setObjectName("widget")
726
+ self.horizontalLayout_20 = QtWidgets.QHBoxLayout(self.widget)
727
+ self.horizontalLayout_20.setContentsMargins(0, 0, 0, 0)
728
+ self.horizontalLayout_20.setObjectName("horizontalLayout_20")
729
+ self.label_45 = QtWidgets.QLabel(self.widget)
730
+ self.label_45.setObjectName("label_45")
731
+ self.horizontalLayout_20.addWidget(self.label_45)
732
+ self.email_lineEdit = QtWidgets.QLineEdit(self.widget)
733
+ self.email_lineEdit.setObjectName("email_lineEdit")
734
+ self.horizontalLayout_20.addWidget(self.email_lineEdit)
735
+ self.fetch_trial_pushButton = QtWidgets.QPushButton(self.widget)
736
+ self.fetch_trial_pushButton.setObjectName("fetch_trial_pushButton")
737
+ self.horizontalLayout_20.addWidget(self.fetch_trial_pushButton)
738
+ self.tabWidget.addTab(self.tab_star, "")
684
739
  self.horizontalLayout_12.addWidget(self.tabWidget)
685
740
  self.verticalLayout_6 = QtWidgets.QVBoxLayout()
686
741
  self.verticalLayout_6.setObjectName("verticalLayout_6")
@@ -759,19 +814,19 @@ class Ui_MainWindow(object):
759
814
  "hr { height: 1px; border-width: 0; }\n"
760
815
  "li.unchecked::marker { content: \"\\2610\"; }\n"
761
816
  "li.checked::marker { content: \"\\2612\"; }\n"
762
- "</style></head><body style=\" font-family:\'Microsoft YaHei UI\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
763
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入上证日线记录:</span></p>\n"
764
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入深证日线记录:</span></p>\n"
765
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入上证5分钟线记录:</span></p>\n"
766
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入深证5分钟线记录:</span></p>\n"
767
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入上证1分钟线记录:</span></p>\n"
768
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入深证1分钟线记录:</span></p>\n"
769
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入上证分笔记录:</span></p>\n"
770
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入深证分笔记录:</span></p>\n"
771
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入上证分时数据:</span></p>\n"
772
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入深证分时数据:</span></p>\n"
773
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入权息数据数:</span></p>\n"
774
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">导入完毕!</span></p></body></html>"))
817
+ "</style></head><body style=\" font-family:\'.AppleSystemUIFont\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
818
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入上证日线记录:</span></p>\n"
819
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入深证日线记录:</span></p>\n"
820
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入上证5分钟线记录:</span></p>\n"
821
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入深证5分钟线记录:</span></p>\n"
822
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入上证1分钟线记录:</span></p>\n"
823
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入深证1分钟线记录:</span></p>\n"
824
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入上证分笔记录:</span></p>\n"
825
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入深证分笔记录:</span></p>\n"
826
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入上证分时数据:</span></p>\n"
827
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入深证分时数据:</span></p>\n"
828
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入权息数据数:</span></p>\n"
829
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">导入完毕!</span></p></body></html>"))
775
830
  self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "执行导入"))
776
831
  self.groupBox_6.setTitle(_translate("MainWindow", "预加载设置"))
777
832
  self.label_35.setText(_translate("MainWindow", "此处为 Hikyuu 运行时的数据预加载设置,请根据机器内存大小选择"))
@@ -819,12 +874,20 @@ class Ui_MainWindow(object):
819
874
  "hr { height: 1px; border-width: 0; }\n"
820
875
  "li.unchecked::marker { content: \"\\2610\"; }\n"
821
876
  "li.checked::marker { content: \"\\2612\"; }\n"
822
- "</style></head><body style=\" font-family:\'Microsoft YaHei UI\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
823
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">注:</span></p>\n"
824
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:10pt; font-weight:600; color:#ff0000;\">1、行情采集服务仅对预加载数据有效</span><span style=\" font-family:\'SimSun\';\">,在行情采集服务运行期间,hikyuu.interactive运行时将自动连接采集服务获取行情数据,并更新预加载的内容数据。</span></p>\n"
825
- "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'SimSun\';\"><br /></p>\n"
826
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\';\">2、如使用芝麻代理(</span><a href=\"http://h.zhimaruanjian.com/\"><span style=\" font-family:\'SimSun\'; text-decoration: underline; color:#0000ff;\">http://h.zhimaruanjian.com/</span></a><span style=\" font-family:\'SimSun\';\">),请自行申请(需付费),并确保ip为其白名单。</span></p>\n"
827
- "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'SimSun\';\"><br /></p>\n"
828
- "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-weight:696; color:#0000ff;\">3、此处采集为网络采集,更推荐直接运行安装目录下gui子目录下的 start_qmt.py ,使用miniqmt 实时服务。该程序独立运行,不用关闭,和这里的采集效果一样。注意:miniqmt需要QMT交易端配合,且在同一机器上执行。</span></p></body></html>"))
877
+ "</style></head><body style=\" font-family:\'.AppleSystemUIFont\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
878
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">注:</span></p>\n"
879
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:10pt; font-weight:600; color:#ff0000;\">1、行情采集服务仅对预加载数据有效</span><span style=\" font-family:\'SimSun\'; font-size:9pt;\">,在行情采集服务运行期间,hikyuu.interactive运行时将自动连接采集服务获取行情数据,并更新预加载的内容数据。</span></p>\n"
880
+ "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'SimSun\'; font-size:9pt;\"><br /></p>\n"
881
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt;\">2、如使用芝麻代理(</span><a href=\"http://h.zhimaruanjian.com/\"><span style=\" font-family:\'SimSun\'; font-size:9pt; text-decoration: underline; color:#0000ff;\">http://h.zhimaruanjian.com/</span></a><span style=\" font-family:\'SimSun\'; font-size:9pt;\">),请自行申请(需付费),并确保ip为其白名单。</span></p>\n"
882
+ "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'SimSun\'; font-size:9pt;\"><br /></p>\n"
883
+ "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:696; color:#0000ff;\">3、此处采集为网络采集,更推荐直接运行安装目录下gui子目录下的 start_qmt.py ,使用miniqmt 实时服务。该程序独立运行,不用关闭,和这里的采集效果一样。注意:miniqmt需要QMT交易端配合,且在同一机器上执行。</span></p></body></html>"))
829
884
  self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "行情采集服务"))
885
+ self.label_46.setText(_translate("MainWindow", "<html><head/><body><p>Hikyuu 专注于量化交易领域的核心技术构建,涵盖交易模型开发、极速计算引擎、高效回测框架<br/>及实盘拓展能力,定位为量化交易的基础设施级计算引擎。项目设计理念聚焦技术内核,暂不涉及<br/>GUI 界面开发,致力于为量化交易爱好者和专业提供高性能底层架构支持。 </p><p>随着社区规模扩大,项目持续迭代及技术支持事务逐渐分散了作者在策略研究上的精力。为保障技<br/>术研发的专注度与可持续性,现推出扩展 VIP 支持计划,通过提供专属功能模块作为回馈,构建良<br/>性的项目发展生态。我们诚挚期待社区伙伴的支持 —— 无论是通过项目捐赠还是加入 VIP 计划,<br/>您的参与都将直接助力 Hikyuu 的技术创新,共同推动量化交易基础设施的迭代升级。 </p><p>详情参见:<a href=\"https://gitee.com/fasiondog/hikyuu/blob/master/vip-plan.md\"><span style=\" text-decoration: underline; color:#3586ff;\">项目支持计划</span></a></p></body></html>"))
886
+ self.label_47.setText(_translate("MainWindow", "申请试用许可"))
887
+ self.label_48.setText(_translate("MainWindow", "加入知识星球,获取星球许可"))
888
+ self.label_49.setText(_translate("MainWindow", "当前授权信息"))
889
+ self.label_license.setText(_translate("MainWindow", "TextLabel"))
890
+ self.label_45.setText(_translate("MainWindow", "电子邮件地址:"))
891
+ self.fetch_trial_pushButton.setText(_translate("MainWindow", "申请试用许可"))
892
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_star), _translate("MainWindow", "项目支持"))
830
893
  self.label_41.setText(_translate("MainWindow", "执行日志"))
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/python
2
+ # -*- coding: utf8 -*-
3
+ #
4
+ # Create on: 2025-04-15
5
+ # Author: fasiondog
6
+
7
+ from hikyuu import start_data_server, stop_data_server
8
+ import time
9
+ import sys
10
+
11
+ if __name__ == "__main__":
12
+ data_server_addr = "tcp://0.0.0.0:9201" if len(sys.argv) <= 1 else sys.argv[1]
13
+ work_num = 2 if len(sys.argv) <= 2 else int(sys.argv[2])
14
+
15
+ try:
16
+ start_data_server(data_server_addr, work_num)
17
+
18
+ while True:
19
+ try:
20
+ time.sleep(1)
21
+ except KeyboardInterrupt:
22
+ break
23
+
24
+ finally:
25
+ stop_data_server()
Binary file
hikyuu/hub.pyi CHANGED
@@ -28,11 +28,11 @@ import sys as sys
28
28
  import typing
29
29
  __all__: list = ['add_remote_hub', 'add_local_hub', 'update_hub', 'remove_hub', 'build_hub', 'help_part', 'get_part', 'get_part_list', 'get_hub_path', 'get_part_info', 'get_part_module', 'print_part_info', 'get_hub_name_list', 'get_part_name_list', 'get_current_hub', 'search_part']
30
30
  class ConfigModel(sqlalchemy.orm.decl_api.Base):
31
- __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x1b27916c590; ConfigModel>
31
+ __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x2b2ffb758e0; ConfigModel>
32
32
  __table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_config', MetaData(), Column('id', Integer(), table=<hub_config>, primary_key=True, nullable=False, default=Sequence('config_id_seq', metadata=MetaData())), Column('key', String(), table=<hub_config>), Column('value', String(), table=<hub_config>), schema=None)
33
33
  __table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('key', String(), table=<hub_config>)))
34
34
  __tablename__: typing.ClassVar[str] = 'hub_config'
35
- _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at 1b279530550>
35
+ _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at 2b280530e10>
36
36
  def __init__(self, **kwargs):
37
37
  """
38
38
  A simple constructor that allows initialization from kwargs.
@@ -109,11 +109,11 @@ class HubManager:
109
109
  def print_part_info(self, name):
110
110
  ...
111
111
  class HubModel(sqlalchemy.orm.decl_api.Base):
112
- __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x1b27951e630; HubModel>
112
+ __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x2b280513020; HubModel>
113
113
  __table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_repo', MetaData(), Column('id', Integer(), table=<hub_repo>, primary_key=True, nullable=False, default=Sequence('remote_id_seq', metadata=MetaData())), Column('name', String(), table=<hub_repo>), Column('hub_type', String(), table=<hub_repo>), Column('local_base', String(), table=<hub_repo>), Column('local', String(), table=<hub_repo>), Column('url', String(), table=<hub_repo>), Column('branch', String(), table=<hub_repo>), schema=None)
114
114
  __table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_repo>)))
115
115
  __tablename__: typing.ClassVar[str] = 'hub_repo'
116
- _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at 1b279548e60>
116
+ _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at 2b280549720>
117
117
  def __init__(self, **kwargs):
118
118
  """
119
119
  A simple constructor that allows initialization from kwargs.
@@ -146,11 +146,11 @@ class ModuleConflictError(Exception):
146
146
  def __str__(self):
147
147
  ...
148
148
  class PartModel(sqlalchemy.orm.decl_api.Base):
149
- __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x1b27951f020; PartModel>
149
+ __mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x2b280513800; PartModel>
150
150
  __table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_part', MetaData(), Column('id', Integer(), table=<hub_part>, primary_key=True, nullable=False, default=Sequence('part_id_seq', metadata=MetaData())), Column('hub_name', String(), table=<hub_part>), Column('part', String(), table=<hub_part>), Column('name', String(), table=<hub_part>), Column('author', String(), table=<hub_part>), Column('version', String(), table=<hub_part>), Column('doc', String(), table=<hub_part>), Column('module_name', String(), table=<hub_part>), Column('label', String(), table=<hub_part>), schema=None)
151
151
  __table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_part>)))
152
152
  __tablename__: typing.ClassVar[str] = 'hub_part'
153
- _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at 1b2795499f0>
153
+ _sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at 2b28054a2b0>
154
154
  def __init__(self, **kwargs):
155
155
  """
156
156
  A simple constructor that allows initialization from kwargs.
@@ -13,6 +13,7 @@
13
13
  #include <thread>
14
14
  #include "hikyuu/utilities/Parameter.h"
15
15
  #include "hikyuu/utilities/thread/thread.h"
16
+ #include "hikyuu/utilities/plugin/PluginManager.h"
16
17
  #include "hikyuu/data_driver/DataDriverFactory.h"
17
18
  #include "Block.h"
18
19
  #include "MarketInfo.h"
@@ -235,6 +236,17 @@ public:
235
236
  return m_load_tg.get();
236
237
  }
237
238
 
239
+ /** 设置插件路径(仅在初始化之前有效) */
240
+ void setPluginPath(const std::string& path);
241
+
242
+ /** 获取当前插件路径 */
243
+ const string& getPluginPath() const {
244
+ return m_plugin_manager.pluginPath();
245
+ }
246
+
247
+ template <typename PluginInterfaceT>
248
+ PluginInterfaceT* getPlugin(const std::string& pluginname) noexcept;
249
+
238
250
  public:
239
251
  typedef StockMapIterator const_iterator;
240
252
  const_iterator begin() const {
@@ -312,6 +324,8 @@ private:
312
324
  StrategyContext m_context;
313
325
 
314
326
  std::unique_ptr<ThreadPool> m_load_tg; // 异步数据加载辅助线程组
327
+
328
+ PluginManager m_plugin_manager;
315
329
  };
316
330
 
317
331
  inline size_t StockManager::size() const {
@@ -367,6 +381,15 @@ inline vector<HistoryFinanceInfo> StockManager::getHistoryFinance(const Stock& s
367
381
  return m_baseInfoDriver->getHistoryFinance(stk.market(), stk.code(), start, end);
368
382
  }
369
383
 
384
+ inline void StockManager::setPluginPath(const std::string& path) {
385
+ m_plugin_manager.pluginPath(path);
386
+ }
387
+
388
+ template <typename PluginInterfaceT>
389
+ inline PluginInterfaceT* StockManager::getPlugin(const std::string& pluginname) noexcept {
390
+ return m_plugin_manager.getPlugin<PluginInterfaceT>(pluginname);
391
+ }
392
+
370
393
  } // namespace hku
371
394
 
372
395
  #endif /* STOCKMANAGER_H_ */
@@ -8,9 +8,9 @@
8
8
 
9
9
  // Ensure the included flatbuffers.h is the same version as when this file was
10
10
  // generated, otherwise it may not be compatible.
11
- static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
12
- FLATBUFFERS_VERSION_MINOR == 3 &&
13
- FLATBUFFERS_VERSION_REVISION == 25,
11
+ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
12
+ FLATBUFFERS_VERSION_MINOR == 2 &&
13
+ FLATBUFFERS_VERSION_REVISION == 10,
14
14
  "Non-compatible flatbuffers version included");
15
15
 
16
16
  namespace hikyuu {
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-04-12
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+ #include "hikyuu/strategy/Strategy.h"
10
+
11
+ namespace hku {
12
+
13
+ /**
14
+ * @brief 策略回测(事件驱动方式)
15
+ *
16
+ * @param context 策略上下文
17
+ * @param on_bar 策略主体执行函数
18
+ * @param tm 策略测试账户
19
+ * @param start_date 起始日期
20
+ * @param end_date 结束日期(不包含本身)
21
+ * @param ktype K线类型
22
+ * @param ref_market 所属市场
23
+ * @param mode 模式 0: 当前bar收盘价执行买卖操作;1: 下一bar开盘价执行买卖操作;
24
+ */
25
+ void HKU_API backtest(const StrategyContext& context, const std::function<void(Strategy*)>& on_bar,
26
+ const TradeManagerPtr& tm, const Datetime& start_date,
27
+ const Datetime& end_date = Null<Datetime>(),
28
+ const KQuery::KType& ktype = KQuery::DAY, const string& ref_market = "SH",
29
+ int mode = 0);
30
+
31
+ // 仅在 sm.init 之后使用
32
+ void HKU_API backtest(const std::function<void(Strategy*)>& on_bar, const TradeManagerPtr& tm,
33
+ const Datetime& start_date, const Datetime& end_date = Null<Datetime>(),
34
+ const KQuery::KType& ktype = KQuery::DAY, const string& ref_market = "SH",
35
+ int mode = 0);
36
+
37
+ } // namespace hku
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-04-15
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/DataType.h"
11
+
12
+ namespace hku {
13
+
14
+ void HKU_API startDataServer(const std::string& addr = "tcp://0.0.0.0:9201", size_t work_num = 2);
15
+
16
+ void HKU_API stopDataServer();
17
+
18
+ } // namespace hku
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright (c) 2025 hikyuu.org
3
+ *
4
+ * Created on: 2025-04-12
5
+ * Author: fasiondog
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include "hikyuu/DataType.h"
11
+
12
+ namespace hku {
13
+
14
+ /**
15
+ * @brief 激活设备
16
+ * @param active_code 授权码
17
+ */
18
+ void HKU_API activeDevice(const std::string& active_code);
19
+
20
+ // 查看当前授权
21
+ std::string HKU_API viewLicense();
22
+
23
+ // 移除授权
24
+ void HKU_API removeLicense();
25
+
26
+ // 获取试用授权
27
+ std::string HKU_API fetchTrialLicense(const std::string& email);
28
+
29
+ } // namespace hku
@@ -0,0 +1,26 @@
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/strategy/Strategy.h"
11
+ #include "hikyuu/utilities/plugin/PluginBase.h"
12
+
13
+ namespace hku {
14
+
15
+ class BackTestPluginInterface : public PluginBase {
16
+ public:
17
+ BackTestPluginInterface() = default;
18
+ virtual ~BackTestPluginInterface() = default;
19
+
20
+ virtual void backtest(const StrategyContext& context,
21
+ const std::function<void(Strategy*)>& on_bar, const TradeManagerPtr& tm,
22
+ const Datetime& start_date, const Datetime& end_date,
23
+ const KQuery::KType& ktype, const string& ref_market, int mode) = 0;
24
+ };
25
+
26
+ } // namespace hku
@@ -0,0 +1,23 @@
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/utilities/plugin/PluginBase.h"
11
+
12
+ namespace hku {
13
+
14
+ class DataServerPluginInterface : public PluginBase {
15
+ public:
16
+ DataServerPluginInterface() = default;
17
+ virtual ~DataServerPluginInterface() = default;
18
+
19
+ virtual void start(const std::string& addr, size_t work_num) noexcept = 0;
20
+ virtual void stop() noexcept = 0;
21
+ };
22
+
23
+ } // namespace hku
@@ -0,0 +1,25 @@
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/utilities/plugin/PluginBase.h"
11
+
12
+ namespace hku {
13
+
14
+ class DevicePluginInterface : public PluginBase {
15
+ public:
16
+ DevicePluginInterface() = default;
17
+ virtual ~DevicePluginInterface() = default;
18
+
19
+ virtual void activate(const std::string& active_code) noexcept = 0;
20
+ virtual std::string viewLicense() noexcept = 0;
21
+ virtual void removeLicense() noexcept = 0;
22
+ virtual std::string fetchTrialLicense(const std::string& email) noexcept = 0;
23
+ };
24
+
25
+ } // namespace hku