53 lines
1.3 KiB
Python
53 lines
1.3 KiB
Python
"""
|
|
Analysis configuration
|
|
"""
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class AnalysisConfig(BaseSettings):
|
|
"""Analysis configuration"""
|
|
|
|
# Symbol configuration
|
|
SYMBOL: str = "BTCUSDT"
|
|
|
|
# Binance API
|
|
BINANCE_API_BASE_URL: str = "https://fapi.binance.com"
|
|
|
|
# Analysis parameters
|
|
LOOKBACK_PERIODS: int = 200 # Number of candles to analyze
|
|
|
|
# Technical indicator periods
|
|
EMA_FAST: int = 20
|
|
EMA_SLOW: int = 50
|
|
RSI_PERIOD: int = 14
|
|
ATR_PERIOD: int = 14
|
|
ADX_PERIOD: int = 14
|
|
MACD_FAST: int = 12
|
|
MACD_SLOW: int = 26
|
|
MACD_SIGNAL: int = 9
|
|
BB_PERIOD: int = 20
|
|
BB_STD: float = 2.0
|
|
VOLUME_MA_PERIOD: int = 20
|
|
|
|
# Support/Resistance detection
|
|
SR_LOOKBACK: int = 50 # Periods to look back for S/R
|
|
SR_TOLERANCE: float = 0.002 # 0.2% price tolerance
|
|
|
|
# Order flow analysis
|
|
ORDERBOOK_IMBALANCE_THRESHOLD: float = 0.2 # 20% imbalance
|
|
LARGE_ORDER_THRESHOLD_USD: float = 100000 # $100k considered large
|
|
|
|
# Risk parameters (example values)
|
|
ACCOUNT_SIZE_USD: float = 100000
|
|
MAX_RISK_PCT: float = 0.01 # 1% per trade
|
|
DEFAULT_LEVERAGE: int = 3
|
|
ATR_STOP_MULTIPLIER: float = 1.8
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = True
|
|
extra = 'ignore' # Ignore extra fields from .env
|
|
|
|
|
|
config = AnalysisConfig()
|