hikyuu 2.3.1__py3-none-win_amd64.whl → 2.5.1__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.
- hikyuu/__init__.py +438 -6
- hikyuu/__init__.pyi +647 -496
- hikyuu/analysis/__init__.pyi +478 -466
- hikyuu/analysis/analysis.pyi +500 -486
- hikyuu/core.pyi +480 -468
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core38.pyd +0 -0
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/data/common_mysql.py +24 -7
- hikyuu/data/common_pytdx.py +17 -1
- hikyuu/data/em_block_to_mysql.py +3 -2
- hikyuu/data/em_block_to_sqlite.py +8 -3
- hikyuu/data/mysql_upgrade/0026.sql +9 -0
- hikyuu/data/sqlite_upgrade/0026.sql +10 -0
- hikyuu/draw/__init__.pyi +35 -0
- hikyuu/draw/drawplot/__init__.pyi +134 -0
- hikyuu/draw/drawplot/bokeh_draw.pyi +796 -0
- hikyuu/draw/drawplot/common.pyi +10 -0
- hikyuu/draw/drawplot/echarts_draw.py +5 -12
- hikyuu/draw/drawplot/echarts_draw.pyi +682 -0
- hikyuu/draw/drawplot/matplotlib_draw.py +18 -3
- hikyuu/draw/drawplot/matplotlib_draw.pyi +1101 -0
- hikyuu/draw/elder.pyi +44 -0
- hikyuu/draw/kaufman.pyi +38 -0
- hikyuu/draw/volume.pyi +31 -0
- hikyuu/examples/notebook/Demo/Demo2.ipynb +1 -1
- hikyuu/extend.py +9 -3
- hikyuu/extend.pyi +524 -504
- hikyuu/fetcher/stock/zh_block_em.py +118 -51
- hikyuu/gui/data/EscapetimeThread.py +4 -4
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -2
- hikyuu/gui/data/ImportHistoryFinanceTask.py +2 -0
- hikyuu/gui/data/MainWindow.py +48 -42
- hikyuu/gui/importdata.py +13 -26
- hikyuu/hub.py +2 -4
- hikyuu/hub.pyi +52 -58
- hikyuu/include/hikyuu/DataType.h +5 -0
- hikyuu/include/hikyuu/Stock.h +7 -0
- hikyuu/include/hikyuu/indicator/Indicator.h +1 -1
- hikyuu/include/hikyuu/indicator/Indicator2InImp.h +65 -0
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +1 -3
- hikyuu/include/hikyuu/indicator/build_in.h +7 -0
- hikyuu/include/hikyuu/indicator/crt/COST.h +3 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/DISCARD.h +27 -0
- hikyuu/include/hikyuu/indicator/crt/HSL.h +1 -13
- hikyuu/include/hikyuu/indicator/crt/INBLOCK.h +31 -0
- hikyuu/include/hikyuu/indicator/crt/INDEX.h +35 -23
- hikyuu/include/hikyuu/indicator/crt/JUMPDOWN.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/JUMPUP.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/LASTVALUE.h +29 -0
- hikyuu/include/hikyuu/indicator/crt/LIUTONGPAN.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/WINNER.h +38 -0
- hikyuu/include/hikyuu/indicator/imp/ICorr.h +6 -21
- hikyuu/include/hikyuu/indicator/imp/ICost.h +31 -0
- hikyuu/include/hikyuu/indicator/imp/ICycle.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IDiscard.h +28 -0
- hikyuu/include/hikyuu/indicator/imp/IDma.h +6 -23
- hikyuu/include/hikyuu/indicator/imp/IHsl.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IInBlock.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IIndex.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +24 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +24 -0
- hikyuu/include/hikyuu/indicator/imp/ILastValue.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/ISpearman.h +5 -20
- hikyuu/include/hikyuu/indicator/imp/IWinner.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMavp.h +5 -19
- hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +12 -63
- hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +7 -53
- hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +3 -4
- hikyuu/include/hikyuu/strategy/Strategy.h +4 -5
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +5 -1
- hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedWeightList.h +22 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixedWeightListAllocateFunds.h +25 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +17 -4
- hikyuu/include/hikyuu/trade_sys/moneymanager/build_in.h +2 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapital.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapitalFunds.h +26 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCountTps.h +27 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedRisk.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedUnits.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_WilliamsFixedRisk.h +7 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +28 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCountTpsMM.h +44 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +38 -37
- hikyuu/include/hikyuu/trade_sys/portfolio/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_Simple.h +25 -1
- hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_WithoutAF.h +50 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +53 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +57 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +7 -0
- hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +51 -5
- hikyuu/include/hikyuu/trade_sys/signal/build_in.h +2 -0
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Bool.h +2 -1
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Logic.h +37 -0
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_OneSide.h +28 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/OneSideSignal.h +46 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +68 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +67 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/stoploss/crt/ST_Indicator.h +1 -1
- hikyuu/include/hikyuu/trade_sys/stoploss/imp/IndicatorStoploss.h +3 -4
- hikyuu/include/hikyuu/utilities/FilterNode.h +2 -2
- hikyuu/include/hikyuu/utilities/Log.h +42 -15
- hikyuu/include/hikyuu/utilities/datetime/Datetime.h +1 -1
- hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +2 -2
- hikyuu/include/hikyuu/utilities/db_connect/DBCondition.h +4 -0
- hikyuu/include/hikyuu/utilities/db_connect/SQLResultSet.h +2 -2
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +5 -1
- hikyuu/include/hikyuu/utilities/node/NodeServer.h +4 -4
- hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +5 -5
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +16 -10
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/indicator/indicator.py +1 -0
- hikyuu/interactive.py +1 -318
- hikyuu/trade_manage/__init__.pyi +492 -478
- hikyuu/trade_manage/broker.pyi +18 -19
- hikyuu/trade_manage/broker_easytrader.pyi +4 -6
- hikyuu/trade_manage/broker_mail.pyi +24 -22
- hikyuu/trade_manage/trade.pyi +492 -478
- hikyuu/util/check.pyi +15 -17
- hikyuu/util/mylog.pyi +7 -8
- hikyuu/util/notebook.pyi +11 -9
- hikyuu/util/singleton.pyi +6 -8
- hikyuu/util/slice.pyi +2 -1
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/METADATA +2 -2
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/RECORD +149 -105
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/top_level.txt +1 -0
- hikyuu/cpp/__init__.pyi +0 -3
- hikyuu/cpp/core310.pyi +0 -12503
- hikyuu/cpp/core311.pyi +0 -12503
- hikyuu/cpp/core312.pyi +0 -12503
- hikyuu/cpp/core313.pyi +0 -12494
- hikyuu/cpp/core38.pyi +0 -12503
- hikyuu/cpp/core39.pyi +0 -12503
- hikyuu/deprecated.py +0 -651
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/LICENSE +0 -0
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/WHEEL +0 -0
- {hikyuu-2.3.1.dist-info → hikyuu-2.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_CRT_WINNER_H_
|
|
10
|
+
#define INDICATOR_CRT_WINNER_H_
|
|
11
|
+
|
|
12
|
+
#include "CVAL.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 获利盘比例
|
|
18
|
+
* @details
|
|
19
|
+
* <pre>
|
|
20
|
+
* 用法: WINNER(CLOSE) 表示以当前收市价卖出的获利盘比例。
|
|
21
|
+
* 例如: 返回0.1表示10%获利盘;WINNER(10.5)表示10.5元价格的获利盘比例
|
|
22
|
+
* 该函数仅对日线分析周期有效。
|
|
23
|
+
* </pre>
|
|
24
|
+
* @ingroup Indicator
|
|
25
|
+
*/
|
|
26
|
+
Indicator HKU_API WINNER();
|
|
27
|
+
|
|
28
|
+
inline Indicator WINNER(const Indicator& ind) {
|
|
29
|
+
return WINNER()(ind);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
inline Indicator WINNER(Indicator::value_t val) {
|
|
33
|
+
return WINNER(CVAL(val));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
} // namespace hku
|
|
37
|
+
|
|
38
|
+
#endif /* INDICATOR_CRT_WINNER_H_ */
|
|
@@ -7,35 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include "../
|
|
10
|
+
#include "../Indicator2InImp.h"
|
|
11
11
|
|
|
12
12
|
namespace hku {
|
|
13
13
|
|
|
14
|
-
class ICorr : public
|
|
14
|
+
class ICorr : public Indicator2InImp {
|
|
15
|
+
INDICATOR2IN_IMP(ICorr)
|
|
16
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
15
18
|
public:
|
|
16
19
|
ICorr();
|
|
17
20
|
ICorr(const Indicator& ref_ind, int n, bool fill_null);
|
|
18
21
|
virtual ~ICorr();
|
|
19
22
|
|
|
20
23
|
virtual void _checkParam(const string& name) const override;
|
|
21
|
-
virtual void _calculate(const Indicator& data) override;
|
|
22
|
-
virtual IndicatorImpPtr _clone() override;
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
-
Indicator m_ref_ind;
|
|
26
|
-
|
|
27
|
-
//============================================
|
|
28
|
-
// 序列化支持
|
|
29
|
-
//============================================
|
|
30
|
-
#if HKU_SUPPORT_SERIALIZATION
|
|
31
|
-
private:
|
|
32
|
-
friend class boost::serialization::access;
|
|
33
|
-
template <class Archive>
|
|
34
|
-
void serialize(Archive& ar, const unsigned int version) {
|
|
35
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
|
|
36
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
|
|
37
|
-
}
|
|
38
|
-
#endif
|
|
39
24
|
};
|
|
40
25
|
|
|
41
|
-
}
|
|
26
|
+
} // namespace hku
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-22
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_ICOST_H_
|
|
10
|
+
#define INDICATOR_IMP_ICOST_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/* COST(k, X) 表示X%获利盘的价格是多少 */
|
|
17
|
+
class ICost : public IndicatorImp {
|
|
18
|
+
INDICATOR_IMP(ICost)
|
|
19
|
+
INDICATOR_NEED_CONTEXT
|
|
20
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
ICost();
|
|
24
|
+
ICost(const KData&, double percent);
|
|
25
|
+
virtual ~ICost();
|
|
26
|
+
virtual void _checkParam(const string& name) const override;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
} /* namespace hku */
|
|
30
|
+
|
|
31
|
+
#endif /* INDICATOR_IMP_ICOST_H_ */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-10
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../Indicator.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/* 获取换手率,等于 VOL(k) / CAPITAL(k) */
|
|
15
|
+
class ICycle : public IndicatorImp {
|
|
16
|
+
INDICATOR_IMP(ICycle)
|
|
17
|
+
INDICATOR_NEED_CONTEXT
|
|
18
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
ICycle();
|
|
22
|
+
explicit ICycle(const KData&);
|
|
23
|
+
virtual ~ICycle();
|
|
24
|
+
virtual void _checkParam(const string& name) const override;
|
|
25
|
+
|
|
26
|
+
private:
|
|
27
|
+
void _initParams();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-31
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_IDISCARD_H_
|
|
10
|
+
#define INDICATOR_IMP_IDISCARD_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/* 以指标公式的方式设置抛弃值 */
|
|
17
|
+
class IDiscard : public IndicatorImp {
|
|
18
|
+
INDICATOR_IMP(IDiscard)
|
|
19
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
20
|
+
|
|
21
|
+
public:
|
|
22
|
+
IDiscard();
|
|
23
|
+
virtual ~IDiscard();
|
|
24
|
+
virtual void _checkParam(const string& name) const override;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
} /* namespace hku */
|
|
28
|
+
#endif /* INDICATOR_IMP_IDISCARD_H_ */
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include "../
|
|
10
|
+
#include "../Indicator2InImp.h"
|
|
11
11
|
|
|
12
12
|
namespace hku {
|
|
13
13
|
|
|
@@ -17,31 +17,14 @@ namespace hku {
|
|
|
17
17
|
* 算法:若Y=DMA(X,A) 则 Y=A*X+(1-A)*Y',其中Y'表示上一周期Y值。
|
|
18
18
|
* 例如:DMA(CLOSE,VOL/CAPITAL)表示求以换手率作平滑因子的平均价
|
|
19
19
|
*/
|
|
20
|
-
class IDma : public
|
|
20
|
+
class IDma : public Indicator2InImp {
|
|
21
|
+
INDICATOR2IN_IMP(IDma)
|
|
22
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
23
|
+
|
|
21
24
|
public:
|
|
22
25
|
IDma();
|
|
23
26
|
explicit IDma(const Indicator& ref_a, bool fill_null);
|
|
24
27
|
virtual ~IDma();
|
|
25
|
-
|
|
26
|
-
virtual void _checkParam(const string& name) const override;
|
|
27
|
-
virtual void _calculate(const Indicator& data) override;
|
|
28
|
-
virtual IndicatorImpPtr _clone() override;
|
|
29
|
-
|
|
30
|
-
private:
|
|
31
|
-
Indicator m_ref_ind;
|
|
32
|
-
|
|
33
|
-
//============================================
|
|
34
|
-
// 序列化支持
|
|
35
|
-
//============================================
|
|
36
|
-
#if HKU_SUPPORT_SERIALIZATION
|
|
37
|
-
private:
|
|
38
|
-
friend class boost::serialization::access;
|
|
39
|
-
template <class Archive>
|
|
40
|
-
void serialize(Archive& ar, const unsigned int version) {
|
|
41
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
|
|
42
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
|
|
43
|
-
}
|
|
44
|
-
#endif
|
|
45
28
|
};
|
|
46
29
|
|
|
47
|
-
}
|
|
30
|
+
} // namespace hku
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-22
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_IHSL_H_
|
|
10
|
+
#define INDICATOR_IMP_IHSL_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/* 获取换手率,等于 VOL(k) / CAPITAL(k) */
|
|
17
|
+
class IHsl : public IndicatorImp {
|
|
18
|
+
INDICATOR_IMP(IHsl)
|
|
19
|
+
INDICATOR_NEED_CONTEXT
|
|
20
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
IHsl();
|
|
24
|
+
explicit IHsl(const KData&);
|
|
25
|
+
virtual ~IHsl();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} /* namespace hku */
|
|
29
|
+
|
|
30
|
+
#endif /* INDICATOR_IMP_IHSL_H_ */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-26
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_IINBLOCK_H_
|
|
10
|
+
#define INDICATOR_IMP_IINBLOCK_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/* 已指标形式返回是否在指定板块中 */
|
|
17
|
+
class IInBlock : public IndicatorImp {
|
|
18
|
+
INDICATOR_IMP(IInBlock)
|
|
19
|
+
INDICATOR_NEED_CONTEXT
|
|
20
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
IInBlock();
|
|
24
|
+
explicit IInBlock(const KData& kdata, const string& category, const string& name);
|
|
25
|
+
virtual ~IInBlock();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} /* namespace hku */
|
|
29
|
+
|
|
30
|
+
#endif /* INDICATOR_IMP_IINBLOCK_H_ */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2024-09-09
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../Indicator.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class IIndex : public IndicatorImp {
|
|
15
|
+
INDICATOR_IMP(IIndex)
|
|
16
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
IIndex();
|
|
20
|
+
IIndex(const string& kpart, bool fill_null);
|
|
21
|
+
virtual ~IIndex();
|
|
22
|
+
|
|
23
|
+
virtual void _checkParam(const string& name) const override;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} // namespace hku
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-10
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../Indicator.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/* 边缘跳变,从大于0.0,跳变到 <= 0.0 */
|
|
15
|
+
class IJumpDown : public IndicatorImp {
|
|
16
|
+
INDICATOR_IMP(IJumpDown)
|
|
17
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
18
|
+
|
|
19
|
+
public:
|
|
20
|
+
IJumpDown();
|
|
21
|
+
virtual ~IJumpDown();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-10
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../Indicator.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/* 边缘跳变,从小于等于0.0,跳变到 > 0.0 */
|
|
15
|
+
class IJumpUp : public IndicatorImp {
|
|
16
|
+
INDICATOR_IMP(IJumpUp)
|
|
17
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
18
|
+
|
|
19
|
+
public:
|
|
20
|
+
IJumpUp();
|
|
21
|
+
virtual ~IJumpUp();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-04
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_ILASTVALUE_H_
|
|
10
|
+
#define INDICATOR_IMP_ILASTVALUE_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
class ILastValue : public IndicatorImp {
|
|
17
|
+
INDICATOR_IMP(ILastValue)
|
|
18
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
ILastValue();
|
|
22
|
+
virtual ~ILastValue();
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
} /* namespace hku */
|
|
26
|
+
#endif /* INDICATOR_IMP_ILASTVALUE_H_ */
|
|
@@ -7,35 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include "../
|
|
10
|
+
#include "../Indicator2InImp.h"
|
|
11
11
|
|
|
12
12
|
namespace hku {
|
|
13
13
|
|
|
14
|
-
class ISpearman : public
|
|
14
|
+
class ISpearman : public Indicator2InImp {
|
|
15
|
+
INDICATOR2IN_IMP(ISpearman)
|
|
16
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
15
18
|
public:
|
|
16
19
|
ISpearman();
|
|
17
20
|
ISpearman(const Indicator& ref_ind, int n, bool fill_null);
|
|
18
21
|
virtual ~ISpearman();
|
|
19
22
|
|
|
20
23
|
virtual void _checkParam(const string& name) const override;
|
|
21
|
-
virtual void _calculate(const Indicator& data) override;
|
|
22
|
-
virtual IndicatorImpPtr _clone() override;
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
-
Indicator m_ref_ind;
|
|
26
|
-
|
|
27
|
-
//============================================
|
|
28
|
-
// 序列化支持
|
|
29
|
-
//============================================
|
|
30
|
-
#if HKU_SUPPORT_SERIALIZATION
|
|
31
|
-
private:
|
|
32
|
-
friend class boost::serialization::access;
|
|
33
|
-
template <class Archive>
|
|
34
|
-
void serialize(Archive& ar, const unsigned int version) {
|
|
35
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
|
|
36
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
|
|
37
|
-
}
|
|
38
|
-
#endif
|
|
39
24
|
};
|
|
40
25
|
|
|
41
26
|
} // namespace hku
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-01-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef INDICATOR_IMP_IWINNER_H_
|
|
10
|
+
#define INDICATOR_IMP_IWINNER_H_
|
|
11
|
+
|
|
12
|
+
#include "../Indicator.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
class IWinner : public IndicatorImp {
|
|
17
|
+
INDICATOR_IMP(IWinner)
|
|
18
|
+
INDICATOR_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
IWinner();
|
|
22
|
+
virtual ~IWinner();
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
} /* namespace hku */
|
|
26
|
+
#endif /* INDICATOR_IMP_IWINNER_H_ */
|
|
@@ -8,34 +8,20 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include "hikyuu/indicator/Indicator.h"
|
|
11
|
+
#include "hikyuu/indicator/Indicator2InImp.h"
|
|
11
12
|
|
|
12
13
|
namespace hku {
|
|
13
14
|
|
|
14
|
-
class TaMavp : public
|
|
15
|
+
class TaMavp : public Indicator2InImp {
|
|
16
|
+
INDICATOR2IN_IMP(TaMavp)
|
|
17
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
18
|
+
|
|
15
19
|
public:
|
|
16
20
|
TaMavp();
|
|
17
21
|
TaMavp(const Indicator& ref_ind, int min_n, int max_n, int matype, bool fill_null);
|
|
18
22
|
virtual ~TaMavp();
|
|
19
23
|
|
|
20
24
|
virtual void _checkParam(const string& name) const override;
|
|
21
|
-
virtual void _calculate(const Indicator& data) override;
|
|
22
|
-
virtual IndicatorImpPtr _clone() override;
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
-
Indicator m_ref_ind;
|
|
26
|
-
|
|
27
|
-
//============================================
|
|
28
|
-
// 序列化支持
|
|
29
|
-
//============================================
|
|
30
|
-
#if HKU_SUPPORT_SERIALIZATION
|
|
31
|
-
private:
|
|
32
|
-
friend class boost::serialization::access;
|
|
33
|
-
template <class Archive>
|
|
34
|
-
void serialize(Archive& ar, const unsigned int version) {
|
|
35
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp);
|
|
36
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind);
|
|
37
|
-
}
|
|
38
|
-
#endif
|
|
39
25
|
};
|
|
40
26
|
|
|
41
27
|
} // namespace hku
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include "hikyuu/indicator/Indicator.h"
|
|
11
|
+
#include "hikyuu/indicator/Indicator2InImp.h"
|
|
11
12
|
|
|
12
13
|
#define TA_IN1_OUT_DEF(func) \
|
|
13
14
|
class Cls_##func : public IndicatorImp { \
|
|
@@ -30,79 +31,27 @@
|
|
|
30
31
|
virtual void _checkParam(const string& name) const override; \
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Cls_##func(
|
|
39
|
-
|
|
40
|
-
virtual
|
|
41
|
-
virtual IndicatorImpPtr _clone() override; \
|
|
42
|
-
\
|
|
43
|
-
private: \
|
|
44
|
-
Indicator m_ref_ind; \
|
|
45
|
-
\
|
|
46
|
-
private: \
|
|
47
|
-
friend class boost::serialization::access; \
|
|
48
|
-
template <class Archive> \
|
|
49
|
-
void serialize(Archive& ar, const unsigned int version) { \
|
|
50
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp); \
|
|
51
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind); \
|
|
52
|
-
} \
|
|
34
|
+
#define TA_IN2_OUT_DEF(func) \
|
|
35
|
+
class Cls_##func : public Indicator2InImp { \
|
|
36
|
+
INDICATOR2IN_IMP(Cls_##func) \
|
|
37
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION \
|
|
38
|
+
public: \
|
|
39
|
+
Cls_##func(); \
|
|
40
|
+
Cls_##func(const Indicator& ref_ind, bool fill_null); \
|
|
41
|
+
virtual ~Cls_##func(); \
|
|
53
42
|
};
|
|
54
43
|
|
|
55
44
|
#define TA_IN2_OUT_N_DEF(func) \
|
|
56
|
-
class Cls_##func : public
|
|
45
|
+
class Cls_##func : public Indicator2InImp { \
|
|
46
|
+
INDICATOR2IN_IMP(Cls_##func) \
|
|
47
|
+
INDICATOR2IN_IMP_NO_PRIVATE_MEMBER_SERIALIZATION \
|
|
57
48
|
public: \
|
|
58
49
|
Cls_##func(); \
|
|
59
50
|
explicit Cls_##func(int n, bool fill_null); \
|
|
60
51
|
Cls_##func(const Indicator& ref_ind, int n, bool fill_null); \
|
|
61
52
|
virtual ~Cls_##func(); \
|
|
62
53
|
virtual void _checkParam(const string& name) const override; \
|
|
63
|
-
virtual void _calculate(const Indicator& data) override; \
|
|
64
|
-
virtual IndicatorImpPtr _clone() override; \
|
|
65
|
-
\
|
|
66
|
-
private: \
|
|
67
|
-
Indicator m_ref_ind; \
|
|
68
|
-
\
|
|
69
|
-
private: \
|
|
70
|
-
friend class boost::serialization::access; \
|
|
71
|
-
template <class Archive> \
|
|
72
|
-
void serialize(Archive& ar, const unsigned int version) { \
|
|
73
|
-
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndicatorImp); \
|
|
74
|
-
ar& BOOST_SERIALIZATION_NVP(m_ref_ind); \
|
|
75
|
-
} \
|
|
76
|
-
};
|
|
77
|
-
#else
|
|
78
|
-
#define TA_IN2_OUT_DEF(func) \
|
|
79
|
-
class Cls_##func : public IndicatorImp { \
|
|
80
|
-
public: \
|
|
81
|
-
Cls_##func(); \
|
|
82
|
-
Cls_##func(const Indicator& ref_ind); \
|
|
83
|
-
virtual ~Cls_##func(); \
|
|
84
|
-
virtual void _calculate(const Indicator& data) override; \
|
|
85
|
-
virtual IndicatorImpPtr _clone() override; \
|
|
86
|
-
\
|
|
87
|
-
private: \
|
|
88
|
-
Indicator m_ref_ind; \
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
#define TA_IN2_OUT_N_DEF(func) \
|
|
92
|
-
class Cls_##func : public IndicatorImp { \
|
|
93
|
-
public: \
|
|
94
|
-
Cls_##func(); \
|
|
95
|
-
explicit Cls_##func(int n); \
|
|
96
|
-
Cls_##func(const Indicator& ref_ind, int n); \
|
|
97
|
-
virtual ~Cls_##func(); \
|
|
98
|
-
virtual void _checkParam(const string& name) const override; \
|
|
99
|
-
virtual void _calculate(const Indicator& data) override; \
|
|
100
|
-
virtual IndicatorImpPtr _clone() override; \
|
|
101
|
-
\
|
|
102
|
-
private: \
|
|
103
|
-
Indicator m_ref_ind; \
|
|
104
54
|
};
|
|
105
|
-
#endif
|
|
106
55
|
|
|
107
56
|
#define TA_K_OUT_DEF(func) \
|
|
108
57
|
class Cls_##func : public IndicatorImp { \
|