---
name: Auto-trade config edits don't take effect until live_monitor.py is restarted
description: live_monitor.py is the 24/7 PRIMARY auto-trade path; it loads daily_signals once at startup, so editing AUTO_TRADE_* constants or place_auto_order has NO effect until the process is restarted
type: feedback
---

After editing any auto-trade gating in `daily_signals.py` (e.g. `AUTO_TRADE_ENABLED`, `AUTO_TRADE_LEAGUES`, `AUTO_TRADE_EXCLUDE_LEAGUES`, or `place_auto_order` itself), you MUST restart `live_monitor.py` for the change to take effect.

**Why:** `live_monitor.py` runs 24/7 and is the PRIMARY auto-trade execution path (live_monitor.py ~line 226-234: `from daily_signals import place_auto_order` inside its poll loop). Python caches the module in sys.modules, so the re-import returns the version loaded at live_monitor *startup* — a disk edit never reaches the running process. Discovered 2026-05-31: I added `AUTO_TRADE_EXCLUDE_LEAGUES=['USL']` to stop real USL bets, but the stale live_monitor placed a real $2.88 USL order (Sporting JAX vs Brooklyn) ~hours later. The fix was correct; I just forgot the running process was stale. (Same class of bug as feedback_team_map_silent_miss.md, where maps.py loads team_map once at import.)

**How to apply:**
- Any edit to auto-trade behavior is NOT live until restart. Don't tell the user "done" — tell them "done, restarting live_monitor now."
- NOTE (2026-06-06 reorg): live code now lives in `E:\soccer\main\` — the script is `main\live_monitor.py` (cwd stays `E:\soccer`). Active log is `E:\soccer\logs\live_monitor.log`.
- Restart pattern (Windows, must survive parent shell exit): kill the old PID, then launch `main\live_monitor.py` with cwd=`E:\soccer`, detached. Working command used 2026-06-06: `Start-Process cmd -ArgumentList '/c','"<python>" -u main\live_monitor.py >> logs\live_monitor.log 2>&1' -WorkingDirectory 'E:\soccer' -WindowStyle Hidden`. (Or `subprocess.Popen([python,'-u','main\\live_monitor.py'], cwd=r'E:\soccer', stdin=DEVNULL, stdout=log, stderr=STDOUT, creationflags=DETACHED_PROCESS|CREATE_NEW_PROCESS_GROUP|CREATE_NO_WINDOW, close_fds=True)`.)
- Find the PID: `Get-CimInstance Win32_Process -Filter "name='python.exe'"` and grep for `live_monitor`.
- The 3x/day `daily_signals.py` batch run picks up edits automatically (fresh process each run) — it's only the persistent live_monitor that goes stale.
