From 75b6e8d22749398ff0126be63268cd04922ff1b8 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sun, 7 Sep 2025 16:20:42 +0900 Subject: [PATCH] init --- config.py | 3 +++ monitor.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 13e554c..2a48241 100644 --- a/config.py +++ b/config.py @@ -7,6 +7,9 @@ COIN_TELEGRAM_CHAT_ID = '574661323' STOCK_TELEGRAM_BOT_TOKEN = "6874078562:AAEHxGDavfc0ssAXPQIaW8JGYmTR7LNUJOw" STOCK_TELEGRAM_CHAT_ID = '574661323' +# 몇초 만에 다시 매수를 할 것인지 체크 +BUY_MINUTE_LIMIT = 1200 + # 볼린저 밴드 설정 BOLLINGER_PERIOD = 20 # 볼린저 밴드 기간 BOLLINGER_STD = 2 # 표준편차 승수 diff --git a/monitor.py b/monitor.py index b9e7cd1..88a06df 100644 --- a/monitor.py +++ b/monitor.py @@ -301,8 +301,8 @@ class Monitor(HTS): last_buy_dt = self.buy_cooldown.get(symbol, {}).get('buy', {}).get('datetime') if last_buy_dt: time_diff = current_time - last_buy_dt - if time_diff.total_seconds() < 1800: - print(f"{symbol}: 매수 금지 중 (남은 시간: {1800 - time_diff.total_seconds():.0f}초)") + if time_diff.total_seconds() < BUY_MINUTE_LIMIT: + print(f"{symbol}: 매수 금지 중 (남은 시간: {BUY_MINUTE_LIMIT - time_diff.total_seconds():.0f}초)") return False if data['signal'].iloc[-1] == 'movingaverage':