I recreated this two years ago which is what turned me on to Alpaca in the first place. It worked fine at the time.
Then I got distracted for two years. I’m starting again recreating this, but I have no formal programming education so it’s a slog.
I managed to get through a few issues with changes between 2018 and now, but I’m stuck on this particular section of code:
returned_data = api.get_bars(
# Processes all data into numpy arrays for use by talib timeList = np.array(returned_data.index) openList = np.array(returned_data.open, dtype=np.float64) highList = np.array(returned_data.high, dtype=np.float64) lowList = np.array(returned_data.low, dtype=np.float64) closeList = np.array(returned_data.close, dtype=np.float64) volumeList = np.array(returned_data.volume, dtype=np.float64)
get_bars is now get_barset - and I’ve managed to make that part work by changing to the below.
api.get_barset(ticker, barTimeframe, limit=None, start=trainStartDate, end=evalEndDate).df
However, only the timeList line beneath it executes, everything else chokes (doesn’t error, just won’t even execute a print statement beneath that line). Any help greatly appreciated.