added new text

This commit is contained in:
Rahul
2023-02-17 22:01:00 +00:00
parent 1a74ede126
commit 72af1912ca
5 changed files with 28 additions and 23 deletions

View File

@@ -1689,7 +1689,15 @@ class Telegram(RPCHandler):
:return: None
"""
if context.args and len(context.args) == 1:
market_dir = MarketDirection.string_to_enum(context.args[0])
if market_dir:
self._rpc._freqtrade.strategy.market_direction = market_dir
new_market_dir = context.args[0]
match new_market_dir:
case "long":
self._rpc._freqtrade.strategy.market_direction = MarketDirection.LONG
case "short":
self._rpc._freqtrade.strategy.market_direction = MarketDirection.SHORT
case "even":
self._rpc._freqtrade.strategy.market_direction = MarketDirection.EVEN
case "none":
self._rpc._freqtrade.strategy.market_direction = MarketDirection.NONE
case _:
raise RPCException("Invalid market direction provided")