This commit is contained in:
fasiondog 2019-03-23 13:07:54 +08:00
parent cf2d987c52
commit be327070ca
3 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ def draw(stock, query = Query(-130),
slow_op = EMA(n = 2*n)(fast_op)
sg = SG_Cross(fast_op, slow_op)
sg.plot(axes = ax1, kdata = kdata)
ind = slow_op(KDATA(kdata))
ind = slow_op(kdata)
ind.name = "EMA(CAMA)"
ind.plot(axes = ax1, color = 'm', legend_on = True)

View File

@ -18,7 +18,7 @@ Vigor::Vigor(): IndicatorImp("VIGOR", 1) {
}
Vigor::Vigor(int n): IndicatorImp() {
setParam<int>("n", 2);
setParam<int>("n", n);
}

View File

@ -62,6 +62,7 @@ void export_Indicator() {
.def("get", &Indicator::get, get_overloads())
.def("getResult", &Indicator::getResult)
.def("getResultAsPriceList", &Indicator::getResultAsPriceList)
.def("getCurrentKData", &Indicator::getCurrentKData)
.def("__len__", &Indicator::size)
.def("__call__", &Indicator::operator())
#if HKU_PYTHON_SUPPORT_PICKLE