Files
DeepCoin/config.py
dsyoon 7d53090034 WLD 전용 BB MTF 전략 및 HTML 시뮬 최적화
- strategy.py, candle_features.py, rule_discovery.py로 다봉 BB·캔들 규칙 탐색
- simulation_1h.py: discover 명령, 기본 BB vs 탐색 규칙 자동 선택, Plotly Y축 줌
- mtf_bb.py, downloader/monitor 정리, 다코인 파일 제거

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 19:14:44 +09:00

69 lines
1.8 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
전역 설정 (WLD 월드코인, 3분 BB MTF 전략).
"""
import os
try:
from dotenv import load_dotenv
load_dotenv()
except ImportError:
pass
# --- API / 알림 ---
COIN_TELEGRAM_BOT_TOKEN = os.getenv("COIN_TELEGRAM_BOT_TOKEN", "")
COIN_TELEGRAM_CHAT_ID = os.getenv("COIN_TELEGRAM_CHAT_ID", "")
# --- 거래 대상 ---
SYMBOL = "WLD"
COIN_NAME = "월드코인"
KR_COINS: dict[str, str] = {
SYMBOL: COIN_NAME,
}
# --- 타임프레임 (분) ---
ENTRY_INTERVAL = 3
TREND_INTERVAL_1H = 60
TREND_INTERVAL_1D = 1440
# --- 쿨다운(초) ---
BUY_COOLDOWN_SEC = int(os.getenv("BUY_COOLDOWN_SEC", "300"))
SELL_COOLDOWN_SEC = int(os.getenv("SELL_COOLDOWN_SEC", "180"))
BUY_MINUTE_LIMIT = BUY_COOLDOWN_SEC
# --- 볼린저 (3분봉, 20, 2σ) ---
BB_PERIOD = 20
BB_STD = 2
BB_MIN_WIDTH_PCT = float(os.getenv("BB_MIN_WIDTH_PCT", "0.8"))
# --- RSI / 거래량 (조합 필터) ---
RSI_PERIOD = 14
RSI_BUY_MAX = float(os.getenv("RSI_BUY_MAX", "42"))
VOLUME_BUY_RATIO = float(os.getenv("VOLUME_BUY_RATIO", "1.0"))
# --- 추세 / 레짐 ---
TREND_RANGE_MA_GAP_PCT = 0.5
# --- 주문 ---
DEFAULT_BUY_KRW = int(os.getenv("DEFAULT_BUY_KRW", "30000"))
RANGE_BUY_KRW = int(os.getenv("RANGE_BUY_KRW", "15000"))
# --- 수수료 (매수·매도 각각 적용, 시뮬레이션) ---
TRADING_FEE_RATE = float(os.getenv("TRADING_FEE_RATE", "0.0005"))
# --- coins.db (downloader.py 적재 간격, 분) ---
# 빗썸 분봉 API: 1,3,5,10,15,30,60,240 / 일봉 1440
DOWNLOAD_INTERVALS: tuple[int, ...] = (3, 10, 15, 30, 60, 240, 1440)
DOWNLOAD_MONTHS = int(os.getenv("DOWNLOAD_MONTHS", "6"))
DB_PATH = "coins.db"
# --- 시뮬레이션 ---
SIM_INITIAL_CASH_KRW = int(os.getenv("SIM_INITIAL_CASH_KRW", "200000"))
SIM_MIN_ORDER_KRW = int(os.getenv("SIM_MIN_ORDER_KRW", "5000"))
# --- 실행 ---
MONITOR_LOOP_SLEEP_SEC = 10
COOLDOWN_FILE = "coins_buy_time.json"