MCPcopy Create free account
hub / github.com/kernc/backtesting.py / test_indicator_scatter

Method test_indicator_scatter

backtesting/test/_test.py:836–850  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

834 open_browser=False)
835
836 def test_indicator_scatter(self):
837 class S(Strategy):
838 def init(self):
839 self.I(SMA, self.data.Close, 5, overlay=True, scatter=True)
840 self.I(SMA, self.data.Close, 10, overlay=False, scatter=True)
841
842 def next(self):
843 pass
844
845 bt = Backtest(GOOG, S)
846 bt.run()
847 with _tempfile() as f:
848 bt.plot(filename=f,
849 plot_drawdown=False, plot_equity=False, plot_pl=False, plot_volume=False,
850 open_browser=False)
851
852
853class TestLib(TestCase):

Callers

nothing calls this directly

Calls 4

runMethod · 0.95
plotMethod · 0.95
BacktestClass · 0.90
_tempfileFunction · 0.85

Tested by

no test coverage detected