【问题标题】:Getting a wrong result calculating the RSI with Tulipy使用 Tulipy 计算 RSI 得到错误结果
【发布时间】:2021-12-28 08:13:14
【问题描述】:

我从 Coinapi 获得蜡烛收盘价。我得到的 rsi 总是与我在 Tradingview 上看到的不同。有谁知道为什么不一样?我也尝试过 Ta-lib,但它更难使用。

谢谢

import numpy as np
import requests
from requests.models import Response
import pprint

url = 'https://rest.coinapi.io/v1/ohlcv/BITSTAMP_SPOT_ETH_USD/latest?period_id=1HRS'
headers = {'X-CoinAPI-Key' : '2777104B-FCC0-4010-9B4B-78F41DADEB6F'}
r = requests.get(url, headers=headers)

r=r.json()
test2=np.array([])


for i in range(15):
    test2=np.append(test2,r[i]["price_close"])

print(test2)


jcp = np.flip(test2)
float_data = [float(x) for x in jcp]
np_float_data = np.array(float_data)


print(ti.rsi(np_float_data, period=14)) ```

【问题讨论】:

    标签: python cryptocurrency rsi


    【解决方案1】:

    更新:我停止使用 Tulipy 并使用了 lib tradingview_ta,效果很好!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多