kernc / backtesting.py

:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python.
https://kernc.github.io/backtesting.py/
GNU Affero General Public License v3.0
5.06k stars 990 forks source link

BUG: trying to round none / string(tag) / Boolean (is_contingent) #995

Open ajwinkworth opened 1 year ago

ajwinkworth commented 1 year ago

BUG: Fix attempting to round none / string(tag) / Boolean (is_contingent) in backtesting.py:408

Optional float values(limit, stop, sl, tp) can be float | None. Testing for none to not pass it to round() Boolean values (is_contingent) shouldnt be rounded. Str values (tag) shouldn't be rounded.

See: A fix for Comment