hikyuu2/hikyuu_pywrap/indicator/_build_in.cpp

1215 lines
37 KiB
C++
Raw Normal View History

2015-01-07 01:26:14 +08:00
/*
* _build_in.cpp
*
* Created on: 2013-2-14
* Author: fasiondog
*/
#include <boost/python.hpp>
#include <hikyuu/indicator/build_in.h>
using namespace hku;
using namespace boost::python;
2016-04-03 00:08:31 +08:00
Indicator (*PRICELIST2)(const PriceList&, int) = PRICELIST;
Indicator (*PRICELIST3)(const Indicator&, int) = PRICELIST;
Indicator (*PRICELIST4)(int) = PRICELIST;
2016-04-03 00:08:31 +08:00
Indicator (*KDATA1)(const KData&) = KDATA;
Indicator (*KDATA3)() = KDATA;
Indicator (*OPEN1)(const KData&) = OPEN;
Indicator (*OPEN3)() = OPEN;
Indicator (*HIGH1)(const KData&) = HIGH;
Indicator (*HIGH3)() = HIGH;
Indicator (*LOW1)(const KData&) = LOW;
Indicator (*LOW3)() = LOW;
Indicator (*CLOSE1)(const KData&) = CLOSE;
Indicator (*CLOSE3)() = CLOSE;
Indicator (*AMO1)(const KData&) = AMO;
Indicator (*AMO3)() = AMO;
Indicator (*VOL1)(const KData&) = VOL;
Indicator (*VOL3)() = VOL;
Indicator (*KDATA_PART1)(const KData& kdata, const string& part) = KDATA_PART;
Indicator (*KDATA_PART3)(const string& part) = KDATA_PART;
2015-01-07 01:26:14 +08:00
Indicator (*AMA_1)(int, int, int) = AMA;
Indicator (*AMA_2)(const Indicator&, int, int, int) = AMA;
2016-05-05 02:56:45 +08:00
Indicator (*ATR_1)(int) = ATR;
Indicator (*ATR_2)(const Indicator&, int) = ATR;
2015-01-07 01:26:14 +08:00
Indicator (*DIFF_1)() = DIFF;
Indicator (*DIFF_2)(const Indicator&) = DIFF;
Indicator (*MA_1)(int) = MA;
Indicator (*MA_2)(const Indicator&, int) = MA;
2016-04-03 00:08:31 +08:00
Indicator (*SMA_1)(int, double) = SMA;
Indicator (*SMA_2)(const Indicator&, int, double) = SMA;
2015-01-07 01:26:14 +08:00
Indicator (*EMA_1)(int) = EMA;
Indicator (*EMA_2)(const Indicator&, int) = EMA;
Indicator (*MACD_1)(int, int, int) = MACD;
Indicator (*MACD_2)(const Indicator&, int, int, int) = MACD;
2020-06-25 15:59:37 +08:00
// BOOST_PYTHON_FUNCTION_OVERLOADS(MACD_1_overload, MACD, 0, 3);
// BOOST_PYTHON_FUNCTION_OVERLOADS(MACD_2_overload, MACD, 1, 4);
2016-04-03 00:08:31 +08:00
Indicator (*REF_1)(int) = REF;
Indicator (*REF_2)(const Indicator&, int) = REF;
2015-01-07 01:26:14 +08:00
Indicator (*SAFTYLOSS_1)(int n1, int n2, double p) = SAFTYLOSS;
Indicator (*SAFTYLOSS_2)(const Indicator&, int n1, int n2, double p) = SAFTYLOSS;
2020-06-25 15:59:37 +08:00
// BOOST_PYTHON_FUNCTION_OVERLOADS(SAFTYLOSS_1_overload, SAFTYLOSS, 0, 3);
// BOOST_PYTHON_FUNCTION_OVERLOADS(SAFTYLOSS_2_overload, SAFTYLOSS, 1, 4);
2015-01-07 01:26:14 +08:00
Indicator (*STDEV_1)(int) = STDEV;
Indicator (*STDEV_2)(const Indicator&, int) = STDEV;
2019-04-18 23:14:58 +08:00
Indicator (*STDP_1)(int) = STDP;
Indicator (*STDP_2)(const Indicator&, int) = STDP;
2016-04-03 00:08:31 +08:00
Indicator (*HHV_1)(int) = HHV;
Indicator (*HHV_2)(const Indicator&, int) = HHV;
Indicator (*LLV_1)(int) = LLV;
Indicator (*LLV_2)(const Indicator&, int) = LLV;
2017-04-19 02:10:15 +08:00
Indicator (*VIGOR_1)(const KData&, int) = VIGOR;
Indicator (*VIGOR_2)(int) = VIGOR;
2019-03-21 23:26:19 +08:00
Indicator (*CVAL_1)(double, size_t) = CVAL;
Indicator (*CVAL_2)(const Indicator&, double, int) = CVAL;
2017-04-19 02:10:15 +08:00
2019-03-21 23:26:19 +08:00
Indicator (*LIUTONGPAN_1)() = LIUTONGPAN;
Indicator (*LIUTONGPAN_2)(const KData&) = LIUTONGPAN;
2019-03-21 23:26:19 +08:00
Indicator (*HSL_1)() = HSL;
Indicator (*HSL_2)(const KData&) = HSL;
Indicator (*IF_1)(const Indicator&, const Indicator&, const Indicator&) = IF;
Indicator (*IF_2)(const Indicator&, price_t, const Indicator&) = IF;
Indicator (*IF_3)(const Indicator&, const Indicator&, price_t) = IF;
Indicator (*IF_4)(const Indicator&, price_t, price_t) = IF;
Indicator (*COUNT_1)(int) = COUNT;
Indicator (*COUNT_2)(const Indicator&, int) = COUNT;
2019-04-01 23:37:54 +08:00
Indicator (*SUM_1)(int) = SUM;
Indicator (*SUM_2)(const Indicator&, int) = SUM;
2019-04-02 01:49:40 +08:00
Indicator (*ABS_1)() = ABS;
2019-04-11 02:10:41 +08:00
Indicator (*ABS_2)(price_t) = ABS;
Indicator (*ABS_3)(const Indicator&) = ABS;
2019-04-02 01:49:40 +08:00
2019-04-02 21:49:33 +08:00
Indicator (*NOT_1)() = NOT;
Indicator (*NOT_2)(const Indicator&) = NOT;
2019-04-03 01:49:43 +08:00
Indicator (*SGN_1)() = SGN;
2019-04-11 02:10:41 +08:00
Indicator (*SGN_2)(price_t) = SGN;
Indicator (*SGN_3)(const Indicator&) = SGN;
2019-04-03 01:49:43 +08:00
2019-04-03 02:18:42 +08:00
Indicator (*EXP_1)() = EXP;
2019-04-11 02:10:41 +08:00
Indicator (*EXP_2)(price_t) = EXP;
Indicator (*EXP_3)(const Indicator&) = EXP;
2019-04-03 02:18:42 +08:00
2019-04-08 01:37:24 +08:00
Indicator (*MAX_1)(const Indicator&, const Indicator&) = MAX;
Indicator (*MAX_2)(const Indicator&, price_t) = MAX;
Indicator (*MAX_3)(price_t, const Indicator&) = MAX;
Indicator (*MIN_1)(const Indicator&, const Indicator&) = MIN;
Indicator (*MIN_2)(const Indicator&, price_t) = MIN;
Indicator (*MIN_3)(price_t, const Indicator&) = MIN;
2019-04-03 01:49:43 +08:00
Indicator (*BETWEEN_1)(const Indicator&, const Indicator&, const Indicator&) = BETWEEN;
Indicator (*BETWEEN_2)(const Indicator&, const Indicator&, price_t) = BETWEEN;
Indicator (*BETWEEN_3)(const Indicator&, price_t, const Indicator&) = BETWEEN;
Indicator (*BETWEEN_4)(const Indicator&, price_t, price_t) = BETWEEN;
Indicator (*BETWEEN_5)(price_t, const Indicator&, const Indicator&) = BETWEEN;
Indicator (*BETWEEN_6)(price_t, const Indicator&, price_t) = BETWEEN;
Indicator (*BETWEEN_7)(price_t, price_t, const Indicator&) = BETWEEN;
Indicator (*BETWEEN_8)(price_t, price_t, price_t) = BETWEEN;
2019-04-11 02:10:41 +08:00
Indicator (*LN_1)() = LN;
Indicator (*LN_2)(price_t) = LN;
Indicator (*LN_3)(const Indicator&) = LN;
Indicator (*LOG_1)() = LOG;
Indicator (*LOG_2)(price_t) = LOG;
Indicator (*LOG_3)(const Indicator&) = LOG;
2019-04-11 23:30:51 +08:00
Indicator (*HHVBARS_1)(int) = HHVBARS;
Indicator (*HHVBARS_2)(const Indicator&, int) = HHVBARS;
2019-04-11 02:10:41 +08:00
2019-04-14 21:26:46 +08:00
Indicator (*LLVBARS_1)(int) = LLVBARS;
Indicator (*LLVBARS_2)(const Indicator&, int) = LLVBARS;
2019-04-14 11:17:47 +08:00
Indicator (*POW_1)(int) = POW;
Indicator (*POW_2)(const Indicator&, int) = POW;
Indicator (*POW_3)(price_t, int) = POW;
2019-04-14 14:29:50 +08:00
Indicator (*SQRT_1)() = SQRT;
Indicator (*SQRT_2)(const Indicator&) = SQRT;
Indicator (*SQRT_3)(price_t) = SQRT;
2019-04-14 21:51:12 +08:00
Indicator (*ROUND_1)(int) = ROUND;
Indicator (*ROUND_2)(const Indicator&, int) = ROUND;
Indicator (*ROUND_3)(price_t, int) = ROUND;
2019-04-15 00:58:41 +08:00
Indicator (*ROUNDUP_1)(int) = ROUNDUP;
Indicator (*ROUNDUP_2)(const Indicator&, int) = ROUNDUP;
Indicator (*ROUNDUP_3)(price_t, int) = ROUNDUP;
Indicator (*ROUNDDOWN_1)(int) = ROUNDDOWN;
Indicator (*ROUNDDOWN_2)(const Indicator&, int) = ROUNDDOWN;
Indicator (*ROUNDDOWN_3)(price_t, int) = ROUNDDOWN;
2019-04-14 14:29:50 +08:00
2019-04-15 23:11:12 +08:00
Indicator (*FLOOR_1)() = FLOOR;
Indicator (*FLOOR_2)(const Indicator&) = FLOOR;
Indicator (*FLOOR_3)(price_t) = FLOOR;
Indicator (*CEILING_1)() = CEILING;
Indicator (*CEILING_2)(const Indicator&) = CEILING;
Indicator (*CEILING_3)(price_t) = CEILING;
2019-04-18 23:42:45 +08:00
Indicator (*INTPART_1)() = INTPART;
Indicator (*INTPART_2)(const Indicator&) = INTPART;
Indicator (*INTPART_3)(price_t) = INTPART;
Indicator (*EXIST_1)(int) = EXIST;
Indicator (*EXIST_2)(const Indicator&, int) = EXIST;
2019-04-28 01:19:30 +08:00
Indicator (*EVERY_1)(int) = EVERY;
Indicator (*EVERY_2)(const Indicator&, int) = EVERY;
Indicator (*LAST_1)(int, int) = LAST;
Indicator (*LAST_2)(const Indicator&, int, int) = LAST;
2019-05-01 17:49:27 +08:00
Indicator (*SIN_1)() = SIN;
Indicator (*SIN_2)(const Indicator&) = SIN;
Indicator (*SIN_3)(price_t) = SIN;
2019-05-01 18:15:48 +08:00
Indicator (*ASIN_1)() = ASIN;
Indicator (*ASIN_2)(const Indicator&) = ASIN;
Indicator (*ASIN_3)(price_t) = ASIN;
2019-05-01 18:27:14 +08:00
Indicator (*COS_1)() = COS;
Indicator (*COS_2)(const Indicator&) = COS;
Indicator (*COS_3)(price_t) = COS;
2019-05-01 18:46:42 +08:00
Indicator (*ACOS_1)() = ACOS;
Indicator (*ACOS_2)(const Indicator&) = ACOS;
Indicator (*ACOS_3)(price_t) = ACOS;
2019-05-01 19:04:18 +08:00
Indicator (*TAN_1)() = TAN;
Indicator (*TAN_2)(const Indicator&) = TAN;
Indicator (*TAN_3)(price_t) = TAN;
2019-05-01 19:16:28 +08:00
Indicator (*ATAN_1)() = ATAN;
Indicator (*ATAN_2)(const Indicator&) = ATAN;
Indicator (*ATAN_3)(price_t) = ATAN;
2019-05-01 19:37:11 +08:00
Indicator (*REVERSE_1)() = REVERSE;
Indicator (*REVERSE_2)(const Indicator&) = REVERSE;
Indicator (*REVERSE_3)(price_t) = REVERSE;
2019-05-01 21:26:50 +08:00
Indicator (*MOD_1)(const Indicator&, const Indicator&) = MOD;
Indicator (*MOD_2)(const Indicator&, price_t) = MOD;
Indicator (*MOD_3)(price_t, const Indicator&) = MOD;
Indicator (*MOD_4)(price_t, price_t) = MOD;
2019-05-02 12:19:43 +08:00
Indicator (*VAR_1)(int) = VAR;
Indicator (*VAR_2)(const Indicator&, int) = VAR;
Indicator (*VARP_1)(int) = VARP;
Indicator (*VARP_2)(const Indicator&, int) = VARP;
2019-05-02 19:41:58 +08:00
Indicator (*CROSS_1)(const Indicator&, const Indicator&) = CROSS;
Indicator (*CROSS_2)(const Indicator&, price_t) = CROSS;
Indicator (*CROSS_3)(price_t, const Indicator&) = CROSS;
Indicator (*CROSS_4)(price_t, price_t) = CROSS;
2019-05-02 20:02:41 +08:00
Indicator (*LONGCROSS_1)(const Indicator&, const Indicator&, int) = LONGCROSS;
Indicator (*LONGCROSS_2)(const Indicator&, price_t, int) = LONGCROSS;
Indicator (*LONGCROSS_3)(price_t, const Indicator&, int) = LONGCROSS;
Indicator (*LONGCROSS_4)(price_t, price_t, int) = LONGCROSS;
2019-05-04 20:02:27 +08:00
Indicator (*FILTER_1)(int) = FILTER;
Indicator (*FILTER_2)(const Indicator&, int) = FILTER;
2019-05-04 20:35:08 +08:00
Indicator (*BARSSINCE_1)() = BARSSINCE;
Indicator (*BARSSINCE_2)(const Indicator&) = BARSSINCE;
Indicator (*BARSSINCE_3)(price_t) = BARSSINCE;
2019-05-04 21:53:10 +08:00
Indicator (*BARSLAST_1)() = BARSLAST;
Indicator (*BARSLAST_2)(const Indicator&) = BARSLAST;
Indicator (*BARSLAST_3)(price_t) = BARSLAST;
2019-05-05 01:44:21 +08:00
Indicator (*SUMBARS_1)(double) = SUMBARS;
Indicator (*SUMBARS_2)(const Indicator&, double) = SUMBARS;
2019-05-12 22:54:51 +08:00
Indicator (*BARSCOUNT_1)() = BARSCOUNT;
Indicator (*BARSCOUNT_2)(const Indicator&) = BARSCOUNT;
2019-05-13 23:02:17 +08:00
Indicator (*BACKSET_1)(int) = BACKSET;
Indicator (*BACKSET_2)(const Indicator&, int) = BACKSET;
2019-05-15 22:04:16 +08:00
Indicator (*TIMELINE_1)() = TIMELINE;
Indicator (*TIMELINE_2)(const KData&) = TIMELINE;
Indicator (*TIMELINEVOL_1)() = TIMELINEVOL;
Indicator (*TIMELINEVOL_2)(const KData&) = TIMELINEVOL;
2019-05-16 22:40:56 +08:00
Indicator (*DEVSQ_1)(int) = DEVSQ;
Indicator (*DEVSQ_2)(const Indicator&, int) = DEVSQ;
2019-05-18 01:28:10 +08:00
Indicator (*ROC_1)(int) = ROC;
Indicator (*ROC_2)(const Indicator&, int) = ROC;
2019-05-18 21:52:55 +08:00
Indicator (*ROCP_1)(int) = ROCP;
Indicator (*ROCP_2)(const Indicator&, int) = ROCP;
Indicator (*ROCR_1)(int) = ROCR;
Indicator (*ROCR_2)(const Indicator&, int) = ROCR;
Indicator (*ROCR100_1)(int) = ROCR100;
Indicator (*ROCR100_2)(const Indicator&, int) = ROCR100;
2019-05-18 23:25:11 +08:00
Indicator (*AD_1)() = AD;
Indicator (*AD_2)(const KData&) = AD;
Indicator (*COST_1)(double x) = COST;
Indicator (*COST_2)(const KData&, double x) = COST;
2019-05-24 23:47:57 +08:00
Indicator (*ALIGN_1)(const DatetimeList&) = ALIGN;
Indicator (*ALIGN_2)(const Indicator&, const DatetimeList&) = ALIGN;
Indicator (*ALIGN_3)(const Indicator&, const Indicator&) = ALIGN;
Indicator (*ALIGN_4)(const Indicator&, const KData&) = ALIGN;
2019-05-28 23:13:11 +08:00
Indicator (*DROPNA_1)() = DROPNA;
Indicator (*DROPNA_2)(const Indicator&) = DROPNA;
2015-01-07 01:26:14 +08:00
void export_Indicator_build_in() {
2020-06-25 15:59:37 +08:00
def("KDATA", KDATA1);
2020-07-11 18:26:23 +08:00
def("KDATA", KDATA3, R"(KDATA([data])
KData成Indicator
:param data: KData 6IndicatorKDATA生成的Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("CLOSE", CLOSE1);
2020-07-11 18:26:23 +08:00
def("CLOSE", CLOSE3, R"(CLOSE([data])
KData的收盘价成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("OPEN", OPEN1);
2020-07-11 18:26:23 +08:00
def("OPEN", OPEN3, R"(OPEN([data])
KData的开盘价成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("HIGH", HIGH1);
2020-07-11 18:26:23 +08:00
def("HIGH", HIGH3, R"(HIGH([data])
KData的最高价成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("LOW", LOW1);
2020-07-11 18:26:23 +08:00
def("LOW", LOW3, R"(LOW([data])
KData的最低价成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("AMO", AMO1);
2020-07-11 18:26:23 +08:00
def("AMO", AMO3, R"(AMO([data])
KData的成交金额成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("VOL", VOL1);
2020-07-11 18:26:23 +08:00
def("VOL", VOL3, R"(VOL([data])
KData的成交量成Indicator
:param data: KData Indicator
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2016-04-27 03:27:55 +08:00
def("KDATA_PART", KDATA_PART1, (arg("data"), arg("kpart")));
2020-07-11 18:26:23 +08:00
def("KDATA_PART", KDATA_PART3, (arg("kpart")), R"(KDATA_PART([data, kpart])
KDATA/OPEN/HIGH/LOW/CLOSE/AMO/VOL:KDATA_PART("CLOSE")CLOSE()
:param data: KData Indicator
:param string kpart: KDATA|OPEN|HIGH|LOW|CLOSE|AMO|VOL
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("PRICELIST", PRICELIST2, (arg("data"), arg("discard") = 0));
def("PRICELIST", PRICELIST3, (arg("data"), arg("result_index") = 0));
def("PRICELIST", PRICELIST4, (arg("result_index") = 0));
def("SMA", SMA_1, (arg("n") = 22, arg("m") = 2.0));
2020-07-11 18:26:23 +08:00
def("SMA", SMA_2, (arg("data"), arg("n") = 22, arg("m") = 2.0), R"(SMA([data, n=22, m=2])
Y=SMA(X,N,M) Y=[M*X+(N-M)*Y')/N,Y'Y值
:param Indicator data:
:param int n:
:param float m:
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("EMA", EMA_1, (arg("n") = 22));
2020-07-11 18:26:23 +08:00
def("EMA", EMA_2, (arg("data"), arg("n") = 22), R"(EMA([data, n=22])
线(Exponential Moving Average)
:param data:
:param int n: 0
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("MA", MA_1, (arg("n") = 22));
2020-07-11 18:26:23 +08:00
def("MA", MA_2, (arg("data"), arg("n") = 22), R"(MA([data, n=22])
:param Indicator data:
:param int n:
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("AMA", AMA_1, (arg("n") = 10, arg("fast_n") = 2, arg("slow_n") = 30));
2020-07-11 18:26:23 +08:00
def("AMA", AMA_2, (arg("data"), arg("n") = 10, arg("fast_n") = 2, arg("slow_n") = 30),
R"(AMA([data, n=10, fast_n=2, slow_n=30])
.J Perry J.Kaufman [BOOK1]_
:param Indicator data:
:param int n: 2
:param int fast_n: N
:param int slow_n: EMA线的N值
:rtype: Indicator
* result(0): AMA
* result(1): ER)");
2016-05-05 02:56:45 +08:00
2020-06-25 15:59:37 +08:00
def("ATR", ATR_1, (arg("n") = 14));
2020-07-11 18:26:23 +08:00
def("ATR", ATR_2, (arg("data"), arg("n") = 14), R"(ATR([data, n=14])
(Average True Range)
:param Indicator data
:param int n: 1
:rtype: Indicator)");
2016-05-05 02:56:45 +08:00
2020-06-25 15:59:37 +08:00
def("MACD", MACD_1, (arg("n1") = 12, arg("n2") = 26, arg("n3") = 9));
2020-07-11 18:26:23 +08:00
def("MACD", MACD_2, (arg("data"), arg("n1") = 12, arg("n2") = 26, arg("n3") = 9),
R"(MACD([data, n1=12, n2=26, n3=9])
线
:param Indicator data:
:param int n1: EMA时间窗
:param int n2: EMA时间窗
:param int n3: EMA-EMAEMA平滑时间窗
:rtype: Indicator
* result(0): MACD_BARMACD直柱MACD快线MACD慢线
* result(1): DIFF: 线,EMA-EMA
* result(2): DEA: 线线n3周期EMA平滑)");
2017-04-19 02:10:15 +08:00
2020-06-25 15:59:37 +08:00
def("VIGOR", VIGOR_1, (arg("kdata"), arg("n") = 2));
2020-07-11 18:26:23 +08:00
def("VIGOR", VIGOR_2, (arg("n") = 2), R"(VIGOR([kdata, n=2])
. [BOOK2]_
:param KData data:
:param int n: EMA平滑窗口
:rtype: Indicator)");
2017-04-19 02:10:15 +08:00
2020-06-25 15:59:37 +08:00
def("SAFTYLOSS", SAFTYLOSS_1, (arg("n1") = 10, arg("n2") = 3, arg("p") = 2.0));
2020-07-11 18:26:23 +08:00
def("SAFTYLOSS", SAFTYLOSS_2, (arg("data"), arg("n1") = 10, arg("n2") = 3, arg("p") = 2.0),
R"(SAFTYLOSS([data, n1=10, n2=3, p=2.0])
线 [BOOK2]_
1020穿穿线线N日3
:param Indicator data:
:param int n1:
:param int n2: 线n2日内的最高值
:param float p:
:rtype: Indicator)");
2015-01-07 01:26:14 +08:00
def("DIFF", DIFF_1);
2020-07-11 18:26:23 +08:00
def("DIFF", DIFF_2, R"(DIFF([data])
data[i] - data[i-1]
:param Indicator data:
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
def("REF", REF_1, (arg("n")));
2020-07-11 18:26:23 +08:00
def("REF", REF_2, (arg("data"), arg("n")), R"(REF([data, n])
REF(XA) A周期前的X值
:param Indicator data:
:param int n: n周期前的值n位
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("STDEV", STDEV_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("STDEV", STDEV_2, (arg("data"), arg("n") = 10), R"(STDEV([data, n=10])
N周期内样本标准差
:param Indicator data:
:param int n:
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("STDP", STDP_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("STDP", STDP_2, (arg("data"), arg("n") = 10), R"(STDP([data, n=10])
STDP(X,N)X的N日总体标准差
:param data:
:param int n:
:rtype: Indicator)");
2019-04-18 23:14:58 +08:00
2016-04-03 00:08:31 +08:00
def("POS", POS, (arg("block"), arg("query"), arg("sg")));
2020-06-25 15:59:37 +08:00
def("HHV", HHV_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("HHV", HHV_2, (arg("data"), arg("n") = 20), R"(HHV([data, n=20])
N日内最高价N=0
:param Indicator data:
:param int n: N日时间窗口
:rtype: Indicator)");
2016-04-03 00:08:31 +08:00
2020-06-25 15:59:37 +08:00
def("LLV", LLV_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("LLV", LLV_2, (arg("data"), arg("n") = 20), R"(LLV([data, n=20])
N日内最低价N=0
:param data:
:param int n: N日时间窗口
:rtype: Indicator)");
2017-04-19 02:10:15 +08:00
2020-06-25 15:59:37 +08:00
def("CVAL", CVAL_1, (arg("value") = 0.0, arg("discard") = 0));
2020-07-11 18:26:23 +08:00
def("CVAL", CVAL_2, (arg("data"), arg("value") = 0.0, arg("discard") = 0),
R"(CVAL([data, value=0.0, discard=0])
data Indicator data valuediscard和data一样
:param Indicator data: Indicator实例
:param float value:
:param int discard:
:rtype: Indicator)");
2019-03-21 23:26:19 +08:00
def("LIUTONGPAN", LIUTONGPAN_1);
2020-07-11 18:26:23 +08:00
def("LIUTONGPAN", LIUTONGPAN_2, R"(LIUTONGPAN(kdata)
CAPITAL
:param KData kdata: k线数据
:rtype: Indicator)");
2019-03-21 23:26:19 +08:00
def("HSL", HSL_1);
2020-07-11 18:26:23 +08:00
def("HSL", HSL_2, R"(HSL(kdata)
VOL(k) / CAPITAL(k)
:param KData kdata: k线数据
:rtype: Indicator)");
def("WEAVE", WEAVE, R"(WEAVE(ind1, ind2)
ind1和ind2的结果组合在一起放在一个Indicator中ind = WEAVE(ind1, ind2), ind包含多个结果ind1ind2的顺序存放
:param Indicator ind1: 1
:param Indicator ind2: 2
:rtype: Indicator)");
2019-03-06 23:14:07 +08:00
def("IF", IF_1);
def("IF", IF_2);
def("IF", IF_3);
2020-07-11 18:26:23 +08:00
def("IF", IF_4, R"(IF(x, a, b)
,
IF(X,A,B)X不为0则返回A,B
IF(CLOSE>OPEN,HIGH,LOW),
:param Indicator x:
:param Indicator a: a
:param Indicator b: b
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("COUNT", COUNT_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("COUNT", COUNT_2, (arg("data"), arg("n") = 20), R"(COUNT([data, n=20])
COUNT(X,N),N周期中满足X条件的周期数,N=0
COUNT(CLOSE>OPEN,20)20
:param Indicator data:
:param int n:
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("SUM", SUM_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("SUM", SUM_2, (arg("data"), arg("n") = 20), R"(SUM([data, n=20])
SUM(X,N),N周期中X的总和,N=0
:param Indicator data:
:param int n:
:rtype: Indicator)");
2019-04-01 23:37:54 +08:00
2019-04-02 01:49:40 +08:00
def("ABS", ABS_1);
def("ABS", ABS_2);
2020-07-11 18:26:23 +08:00
def("ABS", ABS_3, R"(ABS([data])
:param Indicator data:
:rtype: Indicator)");
2019-04-02 21:49:33 +08:00
def("NOT", NOT_1);
2020-07-11 18:26:23 +08:00
def("NOT", NOT_2, R"(NOT([data])
NOT(X)X,X=010
:param Indicator data:
:rtype: Indicator)");
2019-04-03 01:49:43 +08:00
def("SGN", SGN_1);
def("SGN", SGN_2);
2020-07-11 18:26:23 +08:00
def("SGN", SGN_3, R"(SGN([data])
, SGN(X) X>0, X=0, X<0 1, 0, -1
:param Indicator data:
:rtype: Indicator)");
2019-04-03 02:18:42 +08:00
def("EXP", EXP_1);
def("EXP", EXP_2);
2020-07-11 18:26:23 +08:00
def("EXP", EXP_3, R"(EXP([data])
EXP(X)e的X次幂
:param Indicator data:
:rtype: Indicator)");
2019-04-08 01:37:24 +08:00
def("MAX", MAX_1);
def("MAX", MAX_2);
2020-07-11 18:26:23 +08:00
def("MAX", MAX_3, R"(MAX(ind1, ind2)
, MAX(A,B)A和B中的较大值
:param Indicator ind1: A
:param Indicator ind2: B
:rtype: Indicator)");
2019-04-08 01:37:24 +08:00
def("MIN", MIN_1);
def("MIN", MIN_2);
2020-07-11 18:26:23 +08:00
def("MIN", MIN_3, R"(MIN(ind1, ind2)
, MIN(A,B)A和B中的较小值
:param Indicator ind1: A
:param Indicator ind2: B
:rtype: Indicator)");
def("BETWEEN", BETWEEN_1);
def("BETWEEN", BETWEEN_2);
def("BETWEEN", BETWEEN_3);
def("BETWEEN", BETWEEN_4);
def("BETWEEN", BETWEEN_5);
def("BETWEEN", BETWEEN_6);
def("BETWEEN", BETWEEN_7);
2020-07-11 18:26:23 +08:00
def("BETWEEN", BETWEEN_8, R"(BETWEEN(a, b, c)
()
BETWEEN(A,B,C)A处于B和C之间时返回10
BETWEEN(CLOSE,MA(CLOSE,10),MA(CLOSE,5))5线10线
:param Indicator a: A
:param Indicator b: B
:param Indicator c: C
:rtype: Indicator)");
2019-04-11 02:10:41 +08:00
def("LN", LN_1);
def("LN", LN_2);
2020-07-11 18:26:23 +08:00
def("LN", LN_3, R"(LN([data])
, LN(X)e为底的对数
:param data:
:rtype: Indicator)");
2019-04-11 02:10:41 +08:00
def("LOG", LOG_1);
def("LOG", LOG_2);
2020-07-11 18:26:23 +08:00
def("LOG", LOG_3, R"(LOG([data])
10
:param data:
:rtype: Indicator)");
2015-01-07 01:26:14 +08:00
2020-06-25 15:59:37 +08:00
def("HHVBARS", HHVBARS_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("HHVBARS", HHVBARS_2, (arg("data"), arg("n") = 20), R"(HHVBARS([data, n=20])
HHVBARS(X,N):N周期内X最高值到当前周期数N=0
HHVBARS(HIGH,0)
:param Indicator data:
:param int n: N日时间窗口
:rtype: Indicator)");
2019-04-14 11:17:47 +08:00
2020-06-25 15:59:37 +08:00
def("LLVBARS", LLVBARS_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("LLVBARS", LLVBARS_2, (arg("data"), arg("n") = 20), R"(LLVBARS([data, n=20])
LLVBARS(X,N):N周期内X最低值到当前周期数N=0
LLVBARS(HIGH,20)20
:param data:
:param int n: N日时间窗口
:rtype: Indicator)");
2019-04-14 21:26:46 +08:00
2019-04-14 11:17:47 +08:00
def("POW", POW_1, (arg("n")));
def("POW", POW_2, (arg("data"), arg("n")));
2020-07-11 18:26:23 +08:00
def("POW", POW_3), (arg("data"), arg("n"), R"(POW(data, n)
POW(A,B)A的B次幂
POW(CLOSE,3)3
:param data:
:param int n:
:rtype: Indicator)");
2019-04-14 14:29:50 +08:00
def("SQRT", SQRT_1);
def("SQRT", SQRT_2);
2020-07-11 18:26:23 +08:00
def("SQRT", SQRT_3, R"(SQRT([data])
SQRT(X)X的平方根
SQRT(CLOSE)
:param data:
:rtype: Indicator)");
2019-04-14 21:51:12 +08:00
def("ROUND", ROUND_1, (arg("ndigits") = 2));
2020-06-25 15:59:37 +08:00
def("ROUND", ROUND_2, (arg("data"), arg("ndigits") = 2));
2020-07-11 18:26:23 +08:00
def("ROUND", ROUND_3, (arg("data"), arg("ndigits") = 2), R"(ROUND([data, ndigits=2])
:param data:
:param int ndigits:
:rtype: Indicator)");
2019-04-15 00:58:41 +08:00
def("ROUNDUP", ROUNDUP_1, (arg("ndigits") = 2));
2020-06-25 15:59:37 +08:00
def("ROUNDUP", ROUNDUP_2, (arg("data"), arg("ndigits") = 2));
2020-07-11 18:26:23 +08:00
def("ROUNDUP", ROUNDUP_3, (arg("data"), arg("ndigits") = 2), R"(ROUNDUP([data, ndigits=2])
10.111
:param data:
:param int ndigits:
:rtype: Indicator)");
2019-04-15 00:58:41 +08:00
def("ROUNDDOWN", ROUNDDOWN_1, (arg("ndigits") = 2));
2020-06-25 15:59:37 +08:00
def("ROUNDDOWN", ROUNDDOWN_2, (arg("data"), arg("ndigits") = 2));
2020-07-11 18:26:23 +08:00
def("ROUNDDOWN", ROUNDDOWN_3, (arg("data"), arg("ndigits") = 2), R"(ROUND([data, ndigits=2])
:param data:
:param int ndigits:
:rtype: Indicator)");
2019-04-15 23:11:12 +08:00
def("FLOOR", FLOOR_1);
def("FLOOR", FLOOR_2);
2020-07-11 18:26:23 +08:00
def("FLOOR", FLOOR_3, R"(FLOOR([data])
()
FLOOR(A)沿A数值减小方向最接近的整数
FLOOR(12.3)12
:param data:
:rtype: Indicator)");
2019-04-15 23:11:12 +08:00
def("CEILING", CEILING_1);
def("CEILING", CEILING_2);
2020-07-11 18:26:23 +08:00
def("CEILING", CEILING_3, R"(CEILING([data])
()
CEILING(A)沿A数值增大方向最接近的整数
CEILING(12.3)13CEILING(-3.5)-3
:param data:
:rtype: Indicator)");
2019-04-18 23:42:45 +08:00
def("INTPART", INTPART_1);
def("INTPART", INTPART_2);
2020-07-11 18:26:23 +08:00
def("INTPART", INTPART_3, R"(INTPART([data])
()
:param data:
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("EXIST", EXIST_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("EXIST", EXIST_2, (arg("data"), arg("n") = 20), R"(EXIST([data, n=20])
, EXIST(X,N) X在N周期有存在
:param data:
:param int n: 0
:rtype: Indicator)");
2019-04-28 01:19:30 +08:00
2020-06-25 15:59:37 +08:00
def("EVERY", EVERY_1, (arg("n") = 20));
2020-07-11 18:26:23 +08:00
def("EVERY", EVERY_2, (arg("data"), arg("n") = 20), R"(EVERY([data, n=20])
EVERY (X,N) X在N周期一直存在
EVERY(CLOSE>OPEN,10) 10线
:param data:
:param int n: 0
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("LAST", LAST_1, (arg("m") = 10, arg("n") = 5));
2020-07-11 18:26:23 +08:00
def("LAST", LAST_2, (arg("data"), arg("m") = 10, arg("n") = 5), R"(LAST([data, m=10, n=5])
LAST (X,M,N) X M N
LAST(CLOSE>OPEN,10,5) 105线
:param data:
:param int m: m周期
:param int n: n周期
:rtype: Indicator)");
2019-05-01 17:49:27 +08:00
def("SIN", SIN_1);
def("SIN", SIN_2);
2020-07-11 18:26:23 +08:00
def("SIN", SIN_3, R"(SIN([data])
:param Indicator data:
:rtype: Indicator)");
2019-05-01 18:15:48 +08:00
def("ASIN", ASIN_1);
def("ASIN", ASIN_2);
2020-07-11 18:26:23 +08:00
def("ASIN", ASIN_3, R"(ASIN([data])
:param Indicator data:
:rtype: Indicator)");
2019-05-01 18:27:14 +08:00
def("COS", COS_1);
def("COS", COS_2);
2020-07-11 18:26:23 +08:00
def("COS", COS_3, R"(COS([data])
:param Indicator data:
:rtype: Indicator)");
2019-05-01 18:46:42 +08:00
def("ACOS", ACOS_1);
def("ACOS", ACOS_2);
2020-07-11 18:26:23 +08:00
def("ACOS", ACOS_3, R"(ACOS([data])
:param Indicator data:
:rtype: Indicator)");
2019-05-01 19:04:18 +08:00
def("TAN", TAN_1);
def("TAN", TAN_2);
2020-07-11 18:26:23 +08:00
def("TAN", TAN_3, R"(TAN([data])
:param Indicator data:
:rtype: Indicato)");
2019-05-01 19:16:28 +08:00
def("ATAN", ATAN_1);
def("ATAN", ATAN_2);
2020-07-11 18:26:23 +08:00
def("ATAN", ATAN_3, R"(ATAN([data])
:param Indicator data:
:rtype: Indicator)");
2019-05-01 19:37:11 +08:00
def("REVERSE", REVERSE_1);
def("REVERSE", REVERSE_2);
2020-07-11 18:26:23 +08:00
def("REVERSE", REVERSE_3, R"(REVERSE([data])
REVERSE(X)-X
:param Indicator data:
:rtype: Indicator)");
2019-05-01 21:26:50 +08:00
def("MOD", MOD_1);
def("MOD", MOD_2);
def("MOD", MOD_3);
2020-07-11 18:26:23 +08:00
def("MOD", MOD_4, R"(MOD(ind1, ind2)
使 %
MOD(A,B)A对B求模
MOD(26,10) 6
:param Indicator ind1:
:param Indicator ind2:
:rtype: Indicator)");
2019-05-02 12:19:43 +08:00
2020-06-25 15:59:37 +08:00
def("VAR", VAR_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("VAR", VAR_2, (arg("data"), arg("n") = 10), R"(VAR([data, n=10])
, VAR(X,N)X的N日估算样本方差
:param Indicator data:
:param int n:
:rtype: Indicator)");
2019-05-02 12:19:43 +08:00
2020-06-25 15:59:37 +08:00
def("VARP", VARP_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("VARP", VARP_2, (arg("data"), arg("n") = 10), R"(VARP([data, n=10])
, VARP(X,N)X的N日总体样本方差
:param Indicator data:
:param int n:
:rtype: Indicator)");
def("UPNDAY", UPNDAY, (arg("data"), arg("n") = 3), R"(UPNDAY(data[, n=3])
, UPNDAY(CLOSE,M)M个周期
:param Indicator data:
:param int n:
:rtype: Indicator)");
def("DOWNNDAY", DOWNNDAY, (arg("data"), arg("n") = 3), R"(DOWNNDAY(data[, n=3])
2019-05-02 18:27:51 +08:00
2020-07-11 18:26:23 +08:00
, DOWNNDAY(CLOSE,M)M个周期
:param Indicator data:
:param int n:
:rtype: Indicator)");
def("NDAY", NDAY, (arg("x"), arg("y"), arg("n") = 3), R"(NDAY(x, y[, n=3])
, NDAY(X,Y,N)X>Y持续存在N个周期
:param Indicator x:
:param Indicator y:
:param int n:
:rtype: Indicator)");
2019-05-02 19:41:58 +08:00
def("CROSS", CROSS_1);
def("CROSS", CROSS_2);
def("CROSS", CROSS_3);
2020-07-11 18:26:23 +08:00
def("CROSS", CROSS_4, R"(CROSS(x, y)
:param x: 线
:param y: 线
:rtype: Indicator)");
2019-05-02 20:02:41 +08:00
2020-06-25 15:59:37 +08:00
def("LONGCROSS", LONGCROSS_1, (arg("a"), arg("b"), arg("n") = 3));
def("LONGCROSS", LONGCROSS_2, (arg("a"), arg("b"), arg("n") = 3));
def("LONGCROSS", LONGCROSS_3, (arg("a"), arg("b"), arg("n") = 3));
2020-07-11 18:26:23 +08:00
def("LONGCROSS", LONGCROSS_4, (arg("a"), arg("b"), arg("n") = 3), R"(LONGCROSS(a, b[, n=3])
线
LONGCROSS(A,B,N)A在N周期内都小于B穿B时返 10
LONGCROSS(MA(CLOSE,5),MA(CLOSE,10),5)5线510线
:param Indicator a:
:param Indicator b:
:param int n:
:rtype: Indicator)");
2019-05-04 20:02:27 +08:00
2020-06-25 15:59:37 +08:00
def("FILTER", FILTER_1, (arg("n") = 5));
2020-07-11 18:26:23 +08:00
def("FILTER", FILTER_2, (arg("data"), arg("n") = 5), R"(FILTER([data, n=5])
,
FILTER(X,N): X N 0
FILTER(CLOSE>OPEN,5) 线5 线
:param Indicator data:
:param int n:
:rtype: Indicator)");
2019-05-04 20:35:08 +08:00
def("BARSSINCE", BARSSINCE_1);
def("BARSSINCE", BARSSINCE_2);
2020-07-11 18:26:23 +08:00
def("BARSSINCE", BARSSINCE_3, R"(BARSSINCE([data])
BARSSINCE(X):X不为0到现在的天数
BARSSINCE(HIGH>10)10
:param Indicator data:
:rtype: Indicator)");
2019-05-04 21:53:10 +08:00
def("BARSLAST", BARSLAST_1);
def("BARSLAST", BARSLAST_2);
2020-07-11 18:26:23 +08:00
def("BARSLAST", BARSLAST_3, R"(BARSLAST([data])
BARSLAST(X): X 0
BARSLAST(CLOSE/REF(CLOSE,1)>=1.1)
:param Indicator data:
:rtype: Indicator)");
2019-05-05 01:44:21 +08:00
2019-05-07 01:47:55 +08:00
def("SUMBARS", SUMBARS_1);
2020-07-11 18:26:23 +08:00
def("SUMBARS", SUMBARS_2, R"(SUMBARS([data,] a)
,
SUMBARS(X,A):X向前累加直到大于等于A,
SUMBARS(VOL,CAPITAL)
:param Indicator data:
:param float a:
:rtype: Indicator)");
2019-05-12 22:54:51 +08:00
def("BARSCOUNT", BARSCOUNT_1);
2020-07-11 18:26:23 +08:00
def("BARSCOUNT", BARSCOUNT_2, R"(BARSCOUNT([data])
,
BARSCOUNT(X)
BARSCOUNT(CLOSE)线1线
:param Indicator data:
:rtype: Indicator)");
2019-05-13 23:02:17 +08:00
def("BACKSET", BACKSET_1);
2020-07-11 18:26:23 +08:00
def("BACKSET", BACKSET_2, R"(BACKSET([data, n=2])
1
BACKSET(X,N),X非0,N周期前的数值设为1
BACKSET(CLOSE>OPEN,2)1,0
:param Indicator data:
:param int n: N周期
:rtype: Indicator)");
2019-05-15 22:04:16 +08:00
def("TIMELINE", TIMELINE_1);
2020-07-11 18:26:23 +08:00
def("TIMELINE", TIMELINE_2, R"(TIMELINE([k])
:param KData k:
:rtype: Indicator)");
2019-05-15 22:04:16 +08:00
def("TIMELINEVOL", TIMELINEVOL_1);
2020-07-11 18:26:23 +08:00
def("TIMELINEVOL", TIMELINEVOL_2, R"(TIMELINEVOL([k])
:param KData k:
:rtype: Indicator)");
def("DMA", DMA, R"(DMA(ind, a)
DMA(X,A),X的动态移动平均
Y=DMA(X,A) Y=A*X+(1-A)*Y',Y'Y值
2019-05-16 21:59:32 +08:00
2020-07-11 18:26:23 +08:00
DMA(CLOSE,VOL/CAPITAL)
2019-05-16 22:24:12 +08:00
2020-07-11 18:26:23 +08:00
:param Indicator ind:
:param Indicator a:
:rtype: Indicator)");
def("AVEDEV", AVEDEV, (arg("data"), arg("n") = 22), R"(AVEDEV(data[, n=22])
X的N日平均绝对偏差
:param Indicator data:
:param int n:
:rtype: Indicator)");
2019-05-16 22:40:56 +08:00
2020-06-25 15:59:37 +08:00
def("DEVSQ", DEVSQ_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("DEVSQ", DEVSQ_2, (arg("data"), arg("n") = 10), R"(DEVSQ([data, n=10])
X的N日数据偏差平方和
:param Indicator data:
:param int n:
:rtype: Indicator)");
2019-05-18 01:28:10 +08:00
2020-06-25 15:59:37 +08:00
def("ROC", ROC_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("ROC", ROC_2, (arg("data"), arg("n") = 10), R"(ROC([data, n=10])
: ((price / prevPrice)-1)*100
:param data:
:param int n:
:rtype: Indicator)");
2019-05-18 21:52:55 +08:00
2020-06-25 15:59:37 +08:00
def("ROCP", ROCP_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("ROCP", ROCP_2, (arg("data"), arg("n") = 10), R"(ROCP([data, n=10])
: (price - prevPrice) / prevPrice
:param data:
:param int n:
:rtype: Indicator)");
2019-05-18 21:52:55 +08:00
2020-06-25 15:59:37 +08:00
def("ROCR", ROCR_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("ROCR", ROCR_2, (arg("data"), arg("n") = 10), R"(ROCR([data, n=10])
: (price / prevPrice)
:param data:
:param int n:
:rtype: Indicator)");
2019-05-18 21:52:55 +08:00
2020-06-25 15:59:37 +08:00
def("ROCR100", ROCR100_1, (arg("n") = 10));
2020-07-11 18:26:23 +08:00
def("ROCR100", ROCR100_2, (arg("data"), arg("n") = 10), R"(ROCR100([data, n=10])
: (price / prevPrice) * 100
:param data:
:param int n:
:rtype: Indicator)");
2019-05-18 23:25:11 +08:00
def("AD", AD_1);
2020-07-11 18:26:23 +08:00
def("AD", AD_2, R"(AD(kdata)
/线
:param KData kdata: k线数据
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("COST", COST_1, (arg("x") = 10.0));
2020-07-11 18:26:23 +08:00
def("COST", COST_2, (arg("k"), arg("x") = 10.0), R"(COST(k[, x=10.0])
COST(k, X) X%
COST(k, 10),10%10%90% 线
:param KData k: K线数据
:param float x: x%, 0~100
:rtype: Indicator)");
def("ALIGN", ALIGN_1);
def("ALIGN", ALIGN_2);
def("ALIGN", ALIGN_3);
2020-07-11 18:26:23 +08:00
def("ALIGN", ALIGN_4, R"(ALIGN(data, ref):
:param Indicator data:
:param ref: DatetimeListIndicator KData
:retype: Indicator)");
2019-05-28 23:13:11 +08:00
def("DROPNA", DROPNA_1);
2020-07-11 18:26:23 +08:00
def("DROPNA", DROPNA_2, R"(DROPNA([data])
nan
:param Indicator data:
:rtype: Indicator)");
2019-06-02 23:23:17 +08:00
2020-06-25 15:59:37 +08:00
def("ADVANCE", ADVANCE,
(arg("query") = KQueryByIndex(-100), arg("market") = "SH", arg("stk_type") = STOCKTYPE_A,
2020-07-11 18:26:23 +08:00
arg("ignore_context") = false),
R"(ADVANCE([query=Query(-100), market='SH', stk_type='constant.STOCKTYPE_A'])
ignore_context false query, market, stk_type
:param Query query:
:param str market: ""
:param int stk_type: , constant.STOCKTYPE_TMP
:param bool ignore_context: 使 query, market, stk_type
:rtype: Indicator)");
2020-06-25 15:59:37 +08:00
def("DECLINE", DECLINE,
(arg("query") = KQueryByIndex(-100), arg("market") = "SH", arg("stk_type") = STOCKTYPE_A,
2020-07-11 18:26:23 +08:00
arg("ignore_context") = false),
R"(DECLINE([query=Query(-100), market='SH', stk_type='constant.STOCKTYPE_A'])
ignore_context false query, market, stk_type
:param Query query:
:param str market: ""
:param int stk_type: , constant.STOCKTYPE_TMP
:param bool ignore_context: 使 query, market, stk_type
:rtype: Indicator)");
2019-05-12 22:54:51 +08:00
}