diff --git a/pyproject.toml b/pyproject.toml index 443dde874..fbe621f9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ asyncz = "^0.5.0" nicegui = "^1.3.15" ping3 = "^4.0.4" talkytrend = "2.0.7" -iamlistening = "5.0.3" +iamlistening = "5.1.0" findmyorder = "1.9.17" dxsp = "8.0.1" cefi = "4.2.0" diff --git a/tt/plugins/plugin_manager.py b/tt/plugins/plugin_manager.py index 891744e1f..0080651a0 100644 --- a/tt/plugins/plugin_manager.py +++ b/tt/plugins/plugin_manager.py @@ -285,12 +285,19 @@ def should_handle_timeframe(self): bool """ if settings.trading_control: + logger.debug("Trading control enabled") current_time = datetime.now().time() current_day = datetime.now().strftime("%a").lower() start_time = datetime.strptime(settings.trading_hours_start, "%H:%M").time() end_time = datetime.strptime(settings.trading_hours_end, "%H:%M").time() - + logger.debug( + "Current time: {}, Current day: {}, Start time: {}, End time: {}", + current_time, + current_day, + start_time, + end_time, + ) return ( current_day in settings.trading_days_allowed and start_time <= current_time <= end_time diff --git a/tt/talky_settings.toml b/tt/talky_settings.toml index 77b4cac72..da9f285a6 100644 --- a/tt/talky_settings.toml +++ b/tt/talky_settings.toml @@ -164,7 +164,7 @@ helper_commands = """ # Enable/Disable Trading trading_enabled = true -trading_control = false +trading_control = true trading_days_allowed = ["tue", "wed", "thu"] trading_hours_start = "08:00" trading_hours_end = "16:00" @@ -621,6 +621,8 @@ myllm_enabled = true # mapping = [ # { id = "BTC", alt = "BTC/USDT" }, # ] +# balance_limit = false +# balance_limit_value = 10 # # CEFI example using ccxt binance # protocol = "ccxt" @@ -641,6 +643,40 @@ myllm_enabled = true # mapping = [ # { id = "BTC", alt = "BTC/USDT" }, # ] +# balance_limit = true +# balance_limit_value = 10 + +# [default.cex.capital] +# protocol = "capital" +# enabled = false +# user_id = "12345678" +# api_key= "myapi_DEADBEEF" +# password = "12345678" +# testmode = false +# defaulttype = "" +# ordertype = "" +# leverage_type = "" +# leverage = 1 +# trading_risk_percentage = true +# trading_risk_amount = 10 +# trading_slippage = 2 +# trading_amount_threshold = 0 +# trading_asset = "USD" +# trading_asset_separator = "" +# mapping = [ +# { id = "EURUSD", alt = "EURUSD" }, +# { id = "BTC", alt = "BTCUSD" }, +# { id = "ETH", alt = "ETHUSD" }, +# { id = "CRUDE", alt = "OIL_CRUDE" }, +# { id = "BRENT", alt = "OIL_BRENT" }, +# { id = "GOLD", alt = "GOLD" }, +# { id = "SILVER", alt = "SILVER" }, +# { id = "US500", alt = "US500" }, +# ] +# balance_limit = false +# balance_limit_value = 10 + + ######################################## ### END OF DEFAULT SETTINGS ### ########################################