ta.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:dash-technical-charting 作者: plotly 项目源码 文件源码
def add_WILLR(self, timeperiod=14,
              type='line', color='secondary', **kwargs):
    """Williams %R."""

    if not (self.has_high and self.has_low and self.has_close):
        raise Exception()

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

    name = 'WILLR({})'.format(str(timeperiod))
    self.sec[name] = dict(type=type, color=color)
    self.ind[name] = talib.WILLR(self.df[self.hi].values,
                                 self.df[self.lo].values,
                                 self.df[self.cl].values,
                                 timeperiod)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号