Files
ai-exchange/scripts/run_sweeps.py
T
2026-04-24 13:39:01 +08:00

20 lines
518 B
Python

from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from src.services.sweeps import SweepService
def main() -> None:
service = SweepService()
candidates = service.detect_sweeps(instrument_id=1, timeframe="1m")
written = service.persist_sweeps(instrument_id=1, timeframe="1m", candidates=candidates)
print(f"Detected {len(candidates)} sweeps; wrote {written} events")
if __name__ == "__main__":
main()