Im trying to use RSI but I keep getting "missing position argument"
rsi = ta.RSI(timeperiod=14)
rsi(data)
rsi_data = rsi(data)
sym_rsi = rsi_data[sym]
Im trying to use RSI but I keep getting "missing position argument"
rsi = ta.RSI(timeperiod=14)
rsi(data)
rsi_data = rsi(data)
sym_rsi = rsi_data[sym]
This may help.
# RSI Indicator
import talib
# -----------------------------------------------
stock, period, ub, lb = symbol('SPY'), 50, 55, 45
# -----------------------------------------------
def initialize(context):
schedule_function(RSI_Indicator, date_rules.every_day(), time_rules.market_open(minutes = 65))
def RSI_Indicator(context, data):
prices = data.history(stock, 'price', period + 1, '1d')
rsi = talib.RSI(prices, period)
record(rsi = rsi[-1], ub = ub, lb = lb)