mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-02 11:58:21 +08:00
add get_kdate(str, Query); fixed RSI 缺失 inline
This commit is contained in:
parent
05116ffa33
commit
a0c3155654
@ -13,6 +13,7 @@
|
||||
#include "Stock.h"
|
||||
#include "StockManager.h"
|
||||
#include "utilities/Parameter.h"
|
||||
#include "indicator/build_in.h"
|
||||
#include "trade_manage/build_in.h"
|
||||
#include "trade_sys/all.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace hku {
|
||||
* 相对强弱指数
|
||||
* @ingroup Indicator
|
||||
*/
|
||||
Indicator RSI(int n = 14) {
|
||||
inline Indicator RSI(int n = 14) {
|
||||
Indicator diff = REF(0) - REF(1);
|
||||
Indicator u = IF(diff > 0, diff, 0);
|
||||
Indicator d = IF(diff < 0, (-1) * diff, 0);
|
||||
@ -34,11 +34,10 @@ Indicator RSI(int n = 14) {
|
||||
return rsi;
|
||||
}
|
||||
|
||||
Indicator RSI(const Indicator& data, int n) {
|
||||
inline Indicator RSI(const Indicator& data, int n) {
|
||||
return RSI(n)(data);
|
||||
}
|
||||
|
||||
} // namespace hku
|
||||
|
||||
#endif /* INDICATOR_CRT_RSI_H_ */
|
||||
|
||||
|
@ -111,6 +111,8 @@ PYBIND11_MODULE(core, m) {
|
||||
int64_t null_int64 = Null<int64_t>();
|
||||
Datetime null_date = Null<Datetime>();
|
||||
|
||||
m.def("get_kdata", py::overload_cast<const string&, const KQuery&>(getKData));
|
||||
|
||||
m.def("get_kdata",
|
||||
py::overload_cast<const string&, int64_t, int64_t, KQuery::KType, KQuery::RecoverType>(
|
||||
getKData),
|
||||
|
Loading…
Reference in New Issue
Block a user