mhallsmoore / qstrader

QuantStart.com - QSTrader backtesting simulation engine.
https://www.quantstart.com/qstrader/
MIT License
2.84k stars 851 forks source link

Adding option to suppress print messages #338

Closed simongarisch closed 3 years ago

simongarisch commented 3 years ago

Hi. This should take care of https://github.com/mhallsmoore/qstrader/issues/334

To prevent messages from printing:

from qstrader import settings

settings.set_print_events(False)

This will prevent all print messages from firing except for the exception in static_backtest.py.

Cheers

Cheers

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.07%) to 69.804% when pulling 557f2fc2598b631a005309e415a5dab12793fd14 on simongarisch:master into 14daae64c37f7b19cc526408bf77ffb60876c765 on mhallsmoore:master.

mhallsmoore commented 3 years ago

Hi @simongarisch,

Thanks very much for creating the PR and for fixing #334. I've just reviewed. Happy to merge.

Kind regards,

Mike.