chart/docs/plan_dma_alerts.md
2026-08-15 05:14:28 -05:00

43 lines
1.7 KiB
Markdown

# Alerts on daily moving averages
**Status: built.** Agreed 2026-08-15. Bells live in Layers; watches persist in
`user_prefs.json` under namespace `ma_alerts`.
Daily SMAs (10/20/50/100/200) already exist as `Level`s and already join
confluence clusters. This is a per-period, on/off watch that fires when
price reaches that average, not a new drawing type.
## UX
A bell next to each period in Layers, off by default, independent of the
visibility checkbox. Hiding the line must not mute the alert — same rule
as confluence: layer prefs are a display choice, a push is not.
Keep them out of the drawings list. They are not drawings.
## How it fires
Same proximity test as a typed price alert: `/ES` within half an ATR of
that MA's current price. The engine already runs every closed minute.
Do **not** copy manual-line disarm. A line you drew is one-shot. A 200 DMA
is a standing level: fire, then stay quiet until price leaves and comes
back (the existing cooldown). Sitting on the average must not chatter.
The push names the average (`200 DMA`), not a zone. The forming daily SMA
moves as the session prints, so a “touch” can be the average walking to
price. That is real; the label is what stops it being mistaken for
confluence.
## Persistence
Five booleans, not rows in `manual_lines.json`. When a user-keyed
preference store exists (`docs/multi_user.md`), these belong there. Until
then, one small prefs object — same shape, single constant `user_id`.
## What not to do
- Do not alert because the layer is visible.
- Do not put MA watches in the drawings list or give them drawing numbers.
- Do not one-shot-disarm them like a hand-placed line.
- Do not gate them on confluence score. You asked for this average.