Insisting "IndexError within GenericCSVData-loading
half the day I spended in trying-searching-troubleshooting all docu-forum-google-entries...no change at all:
"IndexError" within dataloading is solid as a rock, does not change a bit...any advice?
CSV (GBPUSD, M5) has 100000 rows, for troubleshooting I have reduced to only 10
Original with dtformat = ('%Y.%m.%d %H:%M:%S'),
I have also changed to default-dtformat = ('%Y-%m-%d %H:%M:%S') with no difference
GenericCSVData is loading data with following parameters
import backtrader.feeds as btfeed dataLoad = btfeed.GenericCSVData( dataname = CSV_PATH + CSV_FILE, #separator = ",", #fromdate = datetime.datetime(2019, 1, 21), #fromdate = datetime.datetime(2020, 8, 8), #dtformat = ('%Y.%m.%d %H:%M:%S'), dtformat = ('%Y-%m-%d %H:%M:%S'), #dtformat = ('%YYYY.%mm.%dd %HH:%MM:%SS'), #tmformat=('%H:%M:%S'), datetime = 2, time = -1, timeframe = 5, compression = 1, open = 3, high = 4, low = 5, close = 6, volume = -1, openinterest = -1, nullvalue = 0.0, header = True)
What ever I try/change/add/remove, it allways keeps: "IndexError: list index out of range".
- with 10 rows only, you can see: CSV cannot be corrupt
- "CSV_PATH + CSV_FILE" gives correct path to file, otherwise "No such file or director" would rise
- I have tried both dtformats..therefore
...I am completely helpless, what can be the error.
run-out last edited by
Your data is backwards. Change the sort order so that oldest data points are first and newest are last.
Thats why! Thx so much!