示例#1
0
def ta_williams_r_indicator(df):
    """
    Williams R Indicator calculation.
    :param df: pandas dataframe
    :return: pandas dataframe
    """
    temp_df = df.copy()
    temp = WilliamsRIndicator(high=temp_df["High"],
                              low=temp_df["Low"],
                              close=temp_df["Close"],
                              fillna=False)
    temp_df["will_r_ind"] = temp.williams_r()
    return temp_df
示例#2
0
 def WILLIANSR(self, df):
     williamsr = WilliamsRIndicator(df['High'], df['Low'], df['Close'])
     df['%R'] = williamsr.williams_r()
     return df