Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using
bt.feeds.GenericCSVData
to read csv from binance we need to setheaders
toFalse
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 checkself.data.SOME_LINE[0]
and you will see that it is not matching to the 1st line in the csv. Instead ofSOME_LINE
you can put in datetime,high,close,open,close and other values that are mentioned in backtrader docs.