INNER CODE UNIT · Python

_lots_for_score

aaryansinha16/AI-trader · backend/app.py:217

def _lots_for_score(final_score: float) -> int:
    """Dynamic lot sizing based on signal strength."""
    if final_score >= 0.80:
        return 3
    elif final_score >= 0.70:
        return 2
    return 1

INITIAL_SL_PCT = 0.15       # Initial SL at 15% below entry
TRAIL_ACTIVATE_PCT = 0.10   # Start trailing once profit > 10%
TRAIL_FACTOR = 0.50         # Trail SL at 50% of max profit
TGT_PCT = 0.50              # Target at 50% above entry
COMMISSION = 40.0
LIVE_CACHE_FILE = "/tmp/td_live_prices.json"

# Background processes
_tick_monitor_thread = None
_collector_process = None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…