Skip to content

Conversation

@entwwwicklung
Copy link

When using bt.feeds.GenericCSVData to read csv from binance we need to set headers to False so 1st row doesn't get overwritten.

If you check the data that is loaded by GenericCSVData you will notice that 1st row from binance csv is always missing.

If you downloaded 15 min candlesticks your strategy will not have 1st candlestick, it will start from second one. E.g. if your first candlestick should be at 22:00 and second one at 22:15, your strategy will take 22:15 as the first one. You can reproduce this either by looking at the chart when you plot or stick in ipdb into __init__ of your strategy and check self.data.SOME_LINE[0] and you will see that it is not matching to the 1st line in the csv. Instead of SOME_LINE you can put in datetime,high,close,open,close and other values that are mentioned in backtrader docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant