Files
atm/configs/2026-04-21-recalib.toml
Marius Mutu c950a5a699 feat(multi-chart): refactor _run_multi_tick + fix alert spam pe oscilație strip
Bug critic: _strips_match(tol=10) trip pe pulsații naturale de lățime ~18px între
ticks (ex. 792↔810px). Fiecare trip → _commit_layout_change → reset FSM + alert
Telegram + scheduler stop. Logul 2026-05-04.jsonl arăta 576 evenimente
layout_change/zi, plus prime alerts repetate la dark_red/dark_green (FSM resetat
înghite lockout-ul) și sincronizare cross-chart pe ambele FSM-uri simultan.

Fix:
- main.py:1511 — gate doar pe count change (len(new) != len(current));
  count stabil → silent update sub_roi indiferent de jitter
- main.py:1438 — silent=True pe alert layout_change (Telegram fără sunet)
- 2 teste regresie noi: width oscillation 792↔810 + silent assertion
- 2 teste async reparate: bootstrap _detect_strips_for_ctx pentru ScriptedDetector
  (regresie după ce _run_multi_tick a devenit unica cale de detecție)

Plus refactor multi-chart pre-existent: layout.py modul nou, _detect_strips_for_ctx,
ChartState per-chart FSM/Detector, ROI per-strip pe screenshots, scripts/diag_*.

Verificat: 292 passed, 2 skipped în 10s.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-05 17:59:18 +03:00

99 lines
1.5 KiB
TOML

window_title = "m2d"
[dot_roi]
x = 0
y = 720
w = 1796
h = 40
[chart_roi]
x = 17
y = 125
w = 1767
h = 567
[colors]
[colors.turquoise]
rgb = [0, 253, 253]
tolerance = 60.0
[colors.yellow]
rgb = [253, 253, 0]
tolerance = 60.0
[colors.dark_green]
rgb = [0, 122, 0]
tolerance = 60.0
[colors.dark_red]
rgb = [128, 0, 0]
tolerance = 60.0
[colors.light_green]
rgb = [0, 255, 0]
tolerance = 60.0
[colors.light_red]
rgb = [255, 0, 0]
tolerance = 60.0
[colors.gray]
rgb = [128, 128, 128]
tolerance = 60.0
[colors.background]
rgb = [0, 0, 0]
tolerance = 25.0
[y_axis]
p1_y = 166
p1_price = 485.2
p2_y = 664
p2_price = 483.2
[canary]
baseline_phash = "c11f4a852ec09f3a8de4e4cf4ad76d84f10b19d3e708663c38f5b538877c6624"
drift_threshold = 8
[canary.roi]
x = 26
y = 27
w = 197
h = 15
[chart_window_region]
x = 3
y = 0
w = 1918
h = 1029
# Secretele Discord/Telegram se setează în .env la rădăcina proiectului — vezi .env.example.
[options]
debounce_depth = 1
loop_interval_s = 5.0
heartbeat_min = 30
lockout_s = 240
low_conf_threshold = 0.2
low_conf_run = 3
phaseb_timeout_s = 600
dead_letter_path = "logs/dead_letter.jsonl"
[options.alerts]
fire_on_phase_skip = true
[options.operating_hours]
enabled = true
timezone = "America/New_York"
weekdays = ["MON", "TUE", "WED", "THU", "FRI"]
start_hhmm = "09:30"
stop_hhmm = "16:00"
[options.attach_screenshots]
late_start = true
catchup = true
arm = true
prime = true
trigger = true