Improve "uses_after_fill" detection

(short-circuits some logic, resulting in less code being executed in interface.py)
This commit is contained in:
Matthias
2023-08-14 17:08:37 +02:00
parent 7f1a81eeed
commit cb85a53042

View File

@@ -219,8 +219,9 @@ class StrategyResolver(IResolver):
"`populate_indicators`, `populate_entry_trend` and `populate_exit_trend` "
"with the metadata argument. ")
after_fill = 'after_fill' in getfullargspec(strategy.custom_stoploss).args
if after_fill:
has_after_fill = ('after_fill' in getfullargspec(strategy.custom_stoploss).args
and check_override(strategy, IStrategy, 'custom_stoploss'))
if has_after_fill:
strategy._ft_stop_uses_after_fill = True
return strategy