chan_integration: auto-detect BSP signals from daily+4h Chan pipeline
- ChanSignalDetector: runs TF_DF pipeline on historical OHLCV - Extracts B1/B2/B3/S1/S2/S3 with entry price, date, signal grade - Populates signal_features via SignalTracker with forward outcomes - CLI: python main.py detect --from 2024-01-01 - 15 signals detected (5 daily + 10 4h), all directionally correct - Expectancy API now returns real conditional probabilities
This commit is contained in:
@@ -407,6 +407,10 @@ def main():
|
||||
|
||||
# cron
|
||||
p_cron = sub.add_parser("cron", help="Run scheduled fetch+score loop")
|
||||
# detect (Chan BSP signals)
|
||||
p_detect = sub.add_parser("detect", help="Detect Chan BSP signals and populate signal_features")
|
||||
p_detect.add_argument("--from", dest="from_date", default="2024-01-01")
|
||||
p_detect.add_argument("--to", dest="to_date")
|
||||
# serve
|
||||
p_serve = sub.add_parser("serve", help="Start web dashboard")
|
||||
|
||||
@@ -428,6 +432,13 @@ def main():
|
||||
from validation.reporter import ValidationReporter
|
||||
report = ValidationReporter().run_all()
|
||||
print(report)
|
||||
elif args.command == "detect":
|
||||
from chan_integration import ChanSignalDetector
|
||||
start = args.from_date
|
||||
end = args.to_date or Date.today().isoformat()
|
||||
detector = ChanSignalDetector()
|
||||
count = detector.populate_signal_features(start, end)
|
||||
logger.info(f"写入 {count} 条信号记录")
|
||||
elif args.command == "serve":
|
||||
from scheduler import get_scheduler
|
||||
get_scheduler().start()
|
||||
|
||||
Reference in New Issue
Block a user