当前位置: 首页>>代码示例>>Python>>正文


Python talib.STOCHRSI属性代码示例

本文整理汇总了Python中talib.STOCHRSI属性的典型用法代码示例。如果您正苦于以下问题:Python talib.STOCHRSI属性的具体用法?Python talib.STOCHRSI怎么用?Python talib.STOCHRSI使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在talib的用法示例。


在下文中一共展示了talib.STOCHRSI属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: calculate_stochrsi

# 需要导入模块: import talib [as 别名]
# 或者: from talib import STOCHRSI [as 别名]
def calculate_stochrsi(self, period_name, closing_prices):
        fastk, fastd = talib.STOCHRSI(closing_prices, timeperiod=14, fastk_period=3, fastd_period=3, fastd_matype=0)
        self.current_indicators[period_name]['stochrsi_fastk'] = fastk[-1]
        self.current_indicators[period_name]['stochrsi_fastd'] = fastd[-1] 
开发者ID:mcardillo55,项目名称:cbpro-trader,代码行数:6,代码来源:IndicatorSubsystem.py

示例2: STOCHRSI

# 需要导入模块: import talib [as 别名]
# 或者: from talib import STOCHRSI [as 别名]
def STOCHRSI(Series, timeperiod=14, fastk_period=5, fastd_period=3, fastd_matype=0):
    fastk, fastd = talib.STOCHRSI(
        Series.values, fastk_period, fastd_period, fastd_matype)
    return pd.Series(fastk, index=Series.index), pd.Series(fastd, index=Series.index) 
开发者ID:QUANTAXIS,项目名称:QUANTAXIS,代码行数:6,代码来源:talib_series.py

示例3: add_STOCHRSI

# 需要导入模块: import talib [as 别名]
# 或者: from talib import STOCHRSI [as 别名]
def add_STOCHRSI(self, timeperiod=14,
                 fastk_period=5, fastd_period=3, fastd_matype=0,
                 types=['line', 'line'],
                 colors=['primary', 'tertiary'],
                 **kwargs):
    """Stochastic Relative Strength Index.

    Note that the first argument of types and colors refers to StochRSI %K
    while second argument refers to StochRSI %D
    (signal line of %K obtained by MA).

    """
    if not self.has_close:
        raise Exception()

    utils.kwargs_check(kwargs, VALID_TA_KWARGS)
    if 'kind' in kwargs:
        kwargs['type'] = kwargs['kind']
    if 'kinds' in kwargs:
        types = kwargs['type']

    if 'type' in kwargs:
        types = [kwargs['type']] * 2
    if 'color' in kwargs:
        colors = [kwargs['color']] * 2

    name = 'STOCHRSI({},{},{})'.format(str(timeperiod),
                                       str(fastk_period),
                                       str(fastd_period))
    fastk = name + r'[%k]'
    fastd = name + r'[%d]'
    self.sec[fastk] = dict(type=types[0], color=colors[0])
    self.sec[fastd] = dict(type=types[1], color=colors[1], on=fastk)
    self.ind[fastk], self.ind[fastd] = talib.STOCHRSI(self.df[self.cl].values,
                                                      timeperiod,
                                                      fastk_period,
                                                      fastd_period,
                                                      fastd_matype) 
开发者ID:plotly,项目名称:dash-technical-charting,代码行数:40,代码来源:ta.py

示例4: STOCHRSI

# 需要导入模块: import talib [as 别名]
# 或者: from talib import STOCHRSI [as 别名]
def STOCHRSI(series, n=14, fastk=5, fastd=3, fastd_matype=0):
    return _series_to_frame(series, ['FAST_K', 'FAST_D'], talib.STOCHRSI, n, fastk, fastd, fastd_matype) 
开发者ID:bpsmith,项目名称:tia,代码行数:4,代码来源:talib_wrapper.py

示例5: STOCHRSI

# 需要导入模块: import talib [as 别名]
# 或者: from talib import STOCHRSI [as 别名]
def STOCHRSI(data, **kwargs):
    _check_talib_presence()
    prices = _extract_series(data)
    return talib.STOCHRSI(prices, **kwargs) 
开发者ID:ranaroussi,项目名称:qtpylib,代码行数:6,代码来源:talib_indicators.py


注:本文中的talib.STOCHRSI属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。