v0.7.1: Lower thresholds to ±1.5% (was ±2%) for more frequent signals
This commit is contained in:
parent
a64460b239
commit
d45250ef3f
|
|
@ -26,8 +26,8 @@ STOP_LOSS_PCT = -0.008
|
||||||
CYCLE_SEC = 60
|
CYCLE_SEC = 60
|
||||||
|
|
||||||
# COIN-LEVEL CONTRARIAN THRESHOLDS
|
# COIN-LEVEL CONTRARIAN THRESHOLDS
|
||||||
COIN_BUY_THRESHOLD = -2.0 # Buy when coin DOWN 2% (24h)
|
COIN_BUY_THRESHOLD = -1.5 # Buy when coin DOWN 1.5% (24h)
|
||||||
COIN_SELL_THRESHOLD = +2.0 # Sell when coin UP 2% (24h)
|
COIN_SELL_THRESHOLD = +1.5 # Sell when coin UP 1.5% (24h)
|
||||||
LOOKBACK_HOURS = 24
|
LOOKBACK_HOURS = 24
|
||||||
|
|
||||||
class TradingBotV07:
|
class TradingBotV07:
|
||||||
|
|
@ -61,7 +61,7 @@ class TradingBotV07:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"Recovery failed: {e}")
|
logger.warning(f"Recovery failed: {e}")
|
||||||
|
|
||||||
logger.info("[v0.7 INIT] Coin-Level Contrarian (9 Coins: BTC, ETH, BNB, XRP, SOL, ADA, DOGE, DOT, AVAX)")
|
logger.info("[v0.7 INIT] Coin-Level Contrarian (9 Coins, ±1.5% Thresholds)")
|
||||||
|
|
||||||
def calculate_coin_return_24h(self, symbol):
|
def calculate_coin_return_24h(self, symbol):
|
||||||
"""Calculate 24h return for SINGLE coin"""
|
"""Calculate 24h return for SINGLE coin"""
|
||||||
|
|
@ -319,7 +319,7 @@ class TradingBotV07:
|
||||||
'portfolio_value': round(portfolio_val, 2),
|
'portfolio_value': round(portfolio_val, 2),
|
||||||
'max_trade_usdt': round(self.max_trade_usdt, 2),
|
'max_trade_usdt': round(self.max_trade_usdt, 2),
|
||||||
'timestamp': datetime.now().isoformat(),
|
'timestamp': datetime.now().isoformat(),
|
||||||
'version': 'v0.7-coin-level-contrarian'
|
'version': 'v0.7.1-coin-level-contrarian-1.5pct'
|
||||||
}, f)
|
}, f)
|
||||||
os.replace(temp, '/home/marc/bot-deploy/active_trades.json')
|
os.replace(temp, '/home/marc/bot-deploy/active_trades.json')
|
||||||
except:
|
except:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue