happydasch / btplotting

btplotting provides plotting for backtests, optimization results and live data from backtrader.
GNU General Public License v3.0
331 stars 84 forks source link

How to save the html file? #59

Closed YIKAILucas closed 1 year ago

YIKAILucas commented 1 year ago

I wanna embed btplotting in custom web, Can I save the html file?

happydasch commented 1 year ago

yes, you can save the html file.

use the parameters: output_mode=save, filename=filename_to_save when setting up backtrader plotting:

p = BacktraderPlotting(output_mode='save', filename='filename_to_save')
cerebro.plot(p)