Generate Lines in chart.html Using Default Data #29
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.
Description
No lines were rendered inside
chart.html
after runningbacktest.chart()
on your example backtest algorithm andBTCUSD
dataI'm not exactly sure if the issue I'm running into is an error, or if just the example data included in this repo requires updating - but as mentioned here in your README:
it could just be that the data was formatted incorrectly
Github Issue
this open issue
Changes
The pandas dates that were stored inside the
self.data['date']
object needed to be converted from strings todatetime
objects usingpd.to_datetime(self.data['date'])
How to Replicate
This was the guide I was following:
https://gemini-docs.readthedocs.io/en/latest/using-gemini.html#basic
This was the data I used:
https://github.com/anfederico/gemini/blob/master/examples/data/BTC_USD.csv
This is the HTML that was generated into chart.html:
https://gist.github.com/11/159820cdf0a7b8dd69bd928add991acd
Screenshots
Broken version of
backtest.charts()
Updated version