diff --git a/debug_annotated_20260416_094607.png b/debug_annotated_20260416_094607.png new file mode 100644 index 0000000..227b7f3 Binary files /dev/null and b/debug_annotated_20260416_094607.png differ diff --git a/debug_dot_roi_20260416_094607.png b/debug_dot_roi_20260416_094607.png new file mode 100644 index 0000000..f347807 Binary files /dev/null and b/debug_dot_roi_20260416_094607.png differ diff --git a/debug_full_20260416_094607.png b/debug_full_20260416_094607.png new file mode 100644 index 0000000..95b2870 Binary files /dev/null and b/debug_full_20260416_094607.png differ diff --git a/src/atm/main.py b/src/atm/main.py index 321cdea..966d3df 100644 --- a/src/atm/main.py +++ b/src/atm/main.py @@ -63,7 +63,11 @@ def main(argv=None) -> None: ) # debug - sub.add_parser("debug", help="Capture one frame, run detector, annotate + print result") + p_debug = sub.add_parser("debug", help="Capture one frame, run detector, annotate + print result") + p_debug.add_argument( + "--delay", type=float, default=3.0, metavar="SEC", + help="Seconds to wait before capture (bring TradeStation to front first). Default 3.", + ) # report p_report = sub.add_parser("report", help="Print weekly performance report") @@ -155,6 +159,15 @@ def _cmd_debug(args) -> None: cfg = Config.load_current(Path("configs")) capture = _build_capture(cfg) + + delay = getattr(args, "delay", 0.0) + if delay > 0: + print(f"Bring TradeStation to front. Capturing in {delay:.0f}s...", flush=True) + for i in range(int(delay), 0, -1): + print(f" {i}...", flush=True) + time.sleep(1.0) + print("CAPTURE", flush=True) + frame = capture() if frame is None: sys.exit("capture returned None (window not found or region invalid)")