enter_tag can be used to determine roi

This commit is contained in:
Sam Germain
2022-04-03 02:41:29 -06:00
parent 9029833c8c
commit 0310d1cdf2
5 changed files with 57 additions and 17 deletions

View File

@@ -143,8 +143,14 @@ class StrategyResolver(IResolver):
# Sort and apply type conversions
if hasattr(strategy, 'minimal_roi'):
strategy.minimal_roi = dict(sorted(
{int(key): value for (key, value) in strategy.minimal_roi.items()}.items(),
key=lambda t: t[0]))
{
{int(k): v for (k, v) in value.items()}
if type(value is dict)
else int(key): value
for (key, value) in strategy.minimal_roi.items()
}.items(),
key=lambda t: t[0]
))
if hasattr(strategy, 'stoploss'):
strategy.stoploss = float(strategy.stoploss)
return strategy