Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
從行情資料計算技術指標。
calculate_indicators
tqx-data
{"rsi": {"period": 7, "limit": 30}, "macd": {"period": 26, "limit": 30}}
period
limit
import tqx_data market_data = tqx_data.get_live_market_data( symbols=["0005.HK"], count=60, ) result = tqx_data.calculate_indicators( market_data = market_data, indicator_params={ "rsi": {"period": 7, "limit": 5}, "macd": {"period": 26, "limit": 5}, }, ) print(result)
{ "0005.HK": { "rsi_7": [ 51.38758258818659, 51.38758258818659, 51.38758258818659, 59.3371266618274, 59.3371266618274 ], "macd_26": [ 0.07868518510328215, 0.0743897749055975, 0.07015702290236447, 0.07528413372823195, 0.07831080401081181 ] } }