From a294f44a0609784a64e4ace80fca0c2654342b5f Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Mon, 1 Dec 2025 08:52:07 +0100 Subject: [PATCH] fix: Add adaptive leverage env vars to docker-compose.yml Added 4 adaptive leverage environment variables to docker-compose.yml so they are properly passed to the container: - USE_ADAPTIVE_LEVERAGE (default: true) - HIGH_QUALITY_LEVERAGE (default: 5) - LOW_QUALITY_LEVERAGE (default: 1) - QUALITY_LEVERAGE_THRESHOLD (default: 95) Without these in the environment section, the container couldn't access them via process.env, causing the settings API to return null. Now the settings UI can properly load and save adaptive leverage configuration via the web interface. --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ad5cfb7..137e373 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,6 +45,12 @@ services: MIN_SIGNAL_QUALITY_SCORE_LONG: ${MIN_SIGNAL_QUALITY_SCORE_LONG:-90} MIN_SIGNAL_QUALITY_SCORE_SHORT: ${MIN_SIGNAL_QUALITY_SCORE_SHORT:-95} + # Adaptive Leverage (Dec 1, 2025 - quality-based position sizing) + USE_ADAPTIVE_LEVERAGE: ${USE_ADAPTIVE_LEVERAGE:-true} + HIGH_QUALITY_LEVERAGE: ${HIGH_QUALITY_LEVERAGE:-5} + LOW_QUALITY_LEVERAGE: ${LOW_QUALITY_LEVERAGE:-1} + QUALITY_LEVERAGE_THRESHOLD: ${QUALITY_LEVERAGE_THRESHOLD:-95} + # Database (if using PostgreSQL) DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/trading_bot_v4}