hikyuu 2.5.3__py3-none-win_amd64.whl → 2.5.6__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 (61) hide show
  1. hikyuu/__init__.pyi +514 -514
  2. hikyuu/analysis/__init__.pyi +490 -489
  3. hikyuu/analysis/analysis.pyi +491 -490
  4. hikyuu/core.pyi +492 -491
  5. hikyuu/cpp/__init__.pyi +2 -2
  6. hikyuu/cpp/core310.pyd +0 -0
  7. hikyuu/cpp/core310.pyi +21 -2
  8. hikyuu/cpp/core311.pyd +0 -0
  9. hikyuu/cpp/core311.pyi +21 -2
  10. hikyuu/cpp/core312.pyd +0 -0
  11. hikyuu/cpp/core312.pyi +21 -2
  12. hikyuu/cpp/core313.pyd +0 -0
  13. hikyuu/cpp/core313.pyi +21 -2
  14. hikyuu/cpp/core38.pyd +0 -0
  15. hikyuu/cpp/core38.pyi +21 -2
  16. hikyuu/cpp/core39.pyd +0 -0
  17. hikyuu/cpp/core39.pyi +21 -2
  18. hikyuu/cpp/hikyuu.dll +0 -0
  19. hikyuu/cpp/hikyuu.lib +0 -0
  20. hikyuu/cpp/sqlite3.dll +0 -0
  21. hikyuu/data/tdx_to_mysql.py +15 -15
  22. hikyuu/draw/__init__.pyi +1 -1
  23. hikyuu/draw/drawplot/__init__.pyi +9 -9
  24. hikyuu/draw/drawplot/bokeh_draw.pyi +505 -505
  25. hikyuu/draw/drawplot/common.pyi +1 -1
  26. hikyuu/draw/drawplot/echarts_draw.pyi +507 -507
  27. hikyuu/draw/drawplot/matplotlib_draw.pyi +516 -516
  28. hikyuu/draw/elder.pyi +11 -11
  29. hikyuu/draw/kaufman.pyi +18 -18
  30. hikyuu/draw/volume.pyi +10 -10
  31. hikyuu/extend.pyi +500 -500
  32. hikyuu/fetcher/stock/zh_block_em.py +18 -7
  33. hikyuu/gui/data/UseTdxImportToH5Thread.py +2 -2
  34. hikyuu/hub.py +7 -13
  35. hikyuu/hub.pyi +9 -6
  36. hikyuu/include/hikyuu/indicator/crt/BARSSINCE.h +14 -2
  37. hikyuu/include/hikyuu/indicator/imp/IBarsSince.h +6 -0
  38. hikyuu/include/hikyuu/utilities/config.h +1 -1
  39. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +4 -3
  40. hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +8 -0
  41. hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +47 -0
  42. hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +55 -0
  43. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +64 -0
  44. hikyuu/include/hikyuu/utilities/plugin/__init__.py +1 -0
  45. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +1 -1
  46. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
  47. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +1 -1
  48. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -1
  49. hikyuu/include/hikyuu/version.h +4 -4
  50. hikyuu/indicator/indicator.py +1 -1
  51. hikyuu/trade_manage/__init__.pyi +505 -505
  52. hikyuu/trade_manage/broker.pyi +3 -3
  53. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  54. hikyuu/trade_manage/trade.pyi +505 -505
  55. hikyuu/util/singleton.pyi +1 -1
  56. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/METADATA +1 -1
  57. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/RECORD +61 -57
  58. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/top_level.txt +1 -0
  59. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/LICENSE +0 -0
  60. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/WHEEL +0 -0
  61. {hikyuu-2.5.3.dist-info → hikyuu-2.5.6.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/core39.pyi CHANGED
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
  import numpy
3
3
  import typing
4
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', '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', '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', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', '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', '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', 'TimeLineList', 'TimeLineRecord', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransRecord', 'UPNDAY', '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', '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', 'open_ostream_to_python', 'open_spend_time', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_spot_agent', 'stop_spot_agent', 'toPriceList']
4
+ __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', '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', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', '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', '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', 'TimeLineList', 'TimeLineRecord', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransRecord', 'UPNDAY', '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', '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', 'open_ostream_to_python', 'open_spend_time', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_spot_agent', 'stop_spot_agent', 'toPriceList']
5
5
  class AllocateFundsBase:
6
6
  """
7
7
  资产分配算法基类, 子类接口:
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
1373
1373
  ...
1374
1374
  def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1375
1375
  ...
1376
- def _add_valid(self, arg0: Datetime, arg1: float) -> None:
1376
+ def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
1377
1377
  """
1378
1378
  _add_valid(self, datetime)
1379
1379
 
1380
1380
  加入有效时间,在_calculate中调用
1381
1381
 
1382
1382
  :param Datetime datetime: 有效时间
1383
+ :param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
1383
1384
  """
1384
1385
  def _calculate(self) -> None:
1385
1386
  """
@@ -7848,6 +7849,23 @@ def BARSSINCE(arg0: float) -> Indicator:
7848
7849
  :rtype: Indicator
7849
7850
  """
7850
7851
  @typing.overload
7852
+ def BARSSINCEN(n: int) -> Indicator:
7853
+ ...
7854
+ @typing.overload
7855
+ def BARSSINCEN(cond: Indicator, n: int) -> Indicator:
7856
+ """
7857
+ BARSSINCEN(cond, n)
7858
+
7859
+ N周期内第一个条件成立到当前的周期数
7860
+
7861
+ 用法:BARSSINCEN(X,N):N周期内第一次X不为0到现在的周期数,N为常量BARSSINCEN(X,N)
7862
+ 例如:BARSSINCEN(HIGH>10,10)表示10个周期内股价超过10元时到当前的周期数
7863
+
7864
+ :param Indicator cond: 条件
7865
+ :param int|Indicator n: 时间窗口
7866
+ :rtype: Indicator
7867
+ """
7868
+ @typing.overload
7851
7869
  def BETWEEN(arg0: Indicator, arg1: Indicator, arg2: Indicator) -> Indicator:
7852
7870
  ...
7853
7871
  @typing.overload
@@ -12950,6 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
12950
12968
  get_date_range(start, end)
12951
12969
 
12952
12970
  获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
12971
+ 注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
12953
12972
 
12954
12973
  :param Datetime start: 起始日期
12955
12974
  :param Datetime end: 结束日期
hikyuu/cpp/hikyuu.dll CHANGED
Binary file
hikyuu/cpp/hikyuu.lib CHANGED
Binary file
hikyuu/cpp/sqlite3.dll CHANGED
Binary file
@@ -35,7 +35,7 @@ from io import SEEK_END, SEEK_SET
35
35
 
36
36
  from hikyuu.data.common import get_stktype_list, MARKETID
37
37
  from hikyuu.data.common_mysql import (
38
- create_database, get_marketid, get_codepre_list, get_table, get_lastdatetime
38
+ create_database, get_marketid, get_codepre_list, get_table, get_lastdatetime, update_extern_data
39
39
  )
40
40
 
41
41
  from hikyuu.data.weight_to_mysql import qianlong_import_weight
@@ -122,14 +122,14 @@ def tdx_import_stock_name_from_file(connect, filename, market, quotations=None):
122
122
  length = len(codepre[0])
123
123
  if code[:length] == codepre[0]:
124
124
  count += 1
125
- #print(market, code, newStockDict[code], codepre)
125
+ # print(market, code, newStockDict[code], codepre)
126
126
  sql = "insert into `hku_base`.`stock` (marketid, code, name, type, valid, startDate, endDate) \
127
127
  values (%s, '%s', '%s', %s, %s, %s, %s)" \
128
128
  % (marketid, code, newStockDict[code], codepre[1], 1, today, 99999999)
129
129
  cur.execute(sql)
130
130
  break
131
131
 
132
- #print('%s新增股票数:%i' % (market.upper(), count))
132
+ # print('%s新增股票数:%i' % (market.upper(), count))
133
133
  connect.commit()
134
134
  cur.close()
135
135
  return count
@@ -177,9 +177,9 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
177
177
  continue
178
178
 
179
179
  if record[2] >= record[1] >= record[3] > 0 \
180
- and record[2] >= record[4] >= record[3] > 0 \
181
- and record[5] >= 0 \
182
- and record[6] >= 0:
180
+ and record[2] >= record[4] >= record[3] > 0 \
181
+ and record[5] >= 0 \
182
+ and record[6] >= 0:
183
183
  buf.append(
184
184
  (
185
185
  record[0] * 10000, record[1] * 0.01, record[2] * 0.01, record[3] * 0.01,
@@ -197,7 +197,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
197
197
  cur.executemany(sql, buf)
198
198
  connect.commit()
199
199
 
200
- #更新基础信息数据库中股票对应的起止日期及其有效标志
200
+ # 更新基础信息数据库中股票对应的起止日期及其有效标志
201
201
  if valid == 0:
202
202
  sql = "update `hku_base`.`stock` set valid=1, " \
203
203
  "startdate=(select min(date)/10000 from {table}), " \
@@ -206,7 +206,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
206
206
  cur.execute("sql")
207
207
  connect.commit()
208
208
 
209
- #记录最新更新日期
209
+ # 记录最新更新日期
210
210
  if (code == '000001' and marketid == MARKETID.SH) \
211
211
  or (code == '399001' and marketid == MARKETID.SZ):
212
212
  sql = "update `hku_base`.`market` set lastdate=(select max(date)/10000 from {table}) " \
@@ -217,7 +217,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
217
217
  print(sql)
218
218
  connect.commit()
219
219
 
220
- #connect.commit()
220
+ # connect.commit()
221
221
 
222
222
  cur.close()
223
223
  return add_record_count
@@ -299,9 +299,9 @@ def tdx_import_min_data_from_file(connect, filename, ktype, market, stock_record
299
299
  while data:
300
300
  record = struct.unpack('HHfffffii', data)
301
301
  if record[3] >= record[2] >= record[4] > 0\
302
- and record[3] >= record[5] >= record[4] >0\
303
- and record[5] >=0 \
304
- and record[6] >=0:
302
+ and record[3] >= record[5] >= record[4] > 0\
303
+ and record[5] >= 0 \
304
+ and record[6] >= 0:
305
305
  sql = "INSERT INTO {tablename} (date, open, high, low, close, amount, count) " \
306
306
  "VALUES (%s, %s, %s, %s, %s, %s, %s)".format(tablename=table)
307
307
  cur.execute(
@@ -368,10 +368,10 @@ def tdx_import_data(connect, market, ktype, quotations, src_dir, progress=Progre
368
368
  add_record_count += this_count
369
369
  if this_count > 0:
370
370
  if ktype == 'DAY':
371
- #update_hdf5_extern_data(h5file, market.upper() + stock[2], 'DAY')
371
+ update_extern_data(connect, market.upper(), stock[2], "DAY")
372
372
  pass
373
373
  elif ktype == '5MIN':
374
- #update_hdf5_extern_data(h5file, market.upper() + stock[2], '5MIN')
374
+ update_extern_data(connect, market.upper(), stock[2], "5MIN")
375
375
  pass
376
376
  if progress:
377
377
  progress(i, total)
@@ -391,7 +391,7 @@ if __name__ == '__main__':
391
391
  pwd = ''
392
392
 
393
393
  src_dir = "D:\\TdxW_HuaTai"
394
- quotations = ['stock', 'fund'] #通达信盘后数据没有债券
394
+ quotations = ['stock', 'fund'] # 通达信盘后数据没有债券
395
395
 
396
396
  connect = mysql.connector.connect(user=usr, password=pwd, host=host, port=port)
397
397
  create_database(connect)
hikyuu/draw/__init__.pyi CHANGED
@@ -9,8 +9,8 @@ from hikyuu.draw.drawplot import gcf
9
9
  from hikyuu.draw.drawplot import get_current_draw_engine
10
10
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWBAND
11
11
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWICON
12
- from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG
13
12
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG as DRAWBMP
13
+ from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG
14
14
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWLINE
15
15
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER
16
16
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER_FIX
@@ -1,12 +1,12 @@
1
1
  from __future__ import annotations
2
- from hikyuu.cpp.core38 import ConditionBase
3
- from hikyuu.cpp.core38 import EnvironmentBase
4
- from hikyuu.cpp.core38 import Indicator
5
- from hikyuu.cpp.core38 import KData
6
- from hikyuu.cpp.core38 import Portfolio
7
- from hikyuu.cpp.core38 import SignalBase
8
- from hikyuu.cpp.core38 import System
9
- from hikyuu.cpp.core38 import TradeManager
2
+ from hikyuu.cpp.core312 import ConditionBase
3
+ from hikyuu.cpp.core312 import EnvironmentBase
4
+ from hikyuu.cpp.core312 import Indicator
5
+ from hikyuu.cpp.core312 import KData
6
+ from hikyuu.cpp.core312 import Portfolio
7
+ from hikyuu.cpp.core312 import SignalBase
8
+ from hikyuu.cpp.core312 import System
9
+ from hikyuu.cpp.core312 import TradeManager
10
10
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd as bk_ax_draw_macd
11
11
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd2 as bk_ax_draw_macd2
12
12
  from hikyuu.draw.drawplot.bokeh_draw import create_figure as bk_create_figure
@@ -25,8 +25,8 @@ from hikyuu.draw.drawplot.echarts_draw import sys_performance as ec_sys_performa
25
25
  from hikyuu.draw.drawplot.echarts_draw import sysplot as ec_sysplot
26
26
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWBAND
27
27
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWICON
28
- from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG
29
28
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG as DRAWBMP
29
+ from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG
30
30
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWLINE
31
31
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER
32
32
  from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER_FIX