hikyuu2/hikyuu_python/indicator/indicator_doc.py

277 lines
6.7 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/python
# -*- coding: utf8 -*-
# cp936
#
# The MIT License (MIT)
#
# Copyright (c) 2017 fasiondog
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from .indicator import *
AMA.__doc__ = """
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值
:return: Indicator
* result(0): AMA
* result(1): ER
"""
AMO.__doc__ = """
AMO([data])
KData的成交金额成Indicator
:param data: KData Indicator
:return: Indicator
"""
CLOSE.__doc__ = """
CLOSE([data])
KData的收盘价成Indicator
:param data: KData Indicator
:return: Indicator
"""
CVAL.__doc__ = """
CVAL(data[, value=0.0])
data Indicator data valuediscard和data一样
CVAL([value=0.0, len=0, discard=0])
:param Indicator data: Indicator实例
:param float value:
:param int len:
:param int discard:
:return: Indicator
"""
DIFF.__doc__ = """
DIFF([data])
data[i] - data[i-1]
:param Indicator data:
:return: Indicator
"""
EMA.__doc__ = """
EMA([data, n=22])
线(Exponential Moving Average)
:param Indicator data:
:param int n: 0
:return: Indicator
"""
HHV.__doc__ = """
HHV([data, n=20])
N日内最高价
:param Indicator data:
:param int n: N日时间窗口
:return: Indicator
"""
HIGH.__doc__ = """
HIGH([data])
KData的最高价成Indicator
:param data: KData Indicator
:return: Indicator
"""
KDATA.__doc__ = """
KDATA([data])
KData成Indicator
:param data: KData 6IndicatorKDATA生成的Indicator
:return: Indicator
"""
KDATA_PART.__doc__ = """
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
:return: Indicator
"""
LLV.__doc__ = """
LLV([data, n=20])
N日内最低价
:param data:
:param int n: N日时间窗口
:return: Indicator
"""
LOW.__doc__ = """
LOW([data])
KData的最低价成Indicator
:param data: KData Indicator
:return: Indicator
"""
MA.__doc__ = """
MA([data, n=22, type="SMA"])
:param Indicator data:
:param int n:
:param string type: "EMA"|"SMA"|"AMA"
:return: Indicator
"""
MACD.__doc__ = """
MACD([data, n1=12, n2=26, n3=9])
线
:param Indicator data:
:param int n1: EMA时间窗
:param int n2: EMA时间窗
:param int n3: EMA-EMAEMA平滑时间窗
:return: Indicator
* result(0): MACD_BARMACD直柱MACD快线MACD慢线
* result(1): DIFF: 线,EMA-EMA
* result(2): DEA: 线线n3周期EMA平滑
"""
OPEN.__doc__ = """
OPEN([data])
KData的开盘价成Indicator
:param data: KData Indicator
:return: Indicator
"""
REF.__doc__ = """
REF([data, n])
REF(XA) A周期前的X值
:param Indicator data:
:param int n: n周期前的值n位
:return: Indicator
"""
SAFTYLOSS.__doc__ = """
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:
:return: Indicator
"""
SMA.__doc__ = """
SMA([data, n=22])
线
:param Indicator data:
:param int n:
:return: Indicator
"""
STDEV.__doc__ = """
STDEV([data, n=10])
N周期内样本标准差
:param Indicator data:
:param int n:
:return: Indicator
"""
VIGOR.__doc__ = """
VIGOR(data[, n=2])
. [BOOK2]_
:param data: KData 6Indicator
:param int n: EMA平滑窗口
:return: Indicator
"""
VOL.__doc__ = """
VOL([data])
KData的成交量成Indicator
:param data: KData Indicator
:return: Indicator
"""