The trendline bug: a line continued past its second anchor at a different slope. Two conventions were fighting, and both were wrong. Lightweight Charts spaces bars evenly however much time separates them — a weekend is forty-nine hours and one bar wide. The renderer extended the line by interpolating between bar indices, which looked straight but disagreed with the server, since price_at() advances per second. Measured on real bars that reached 147 points: the chart drew a level the alerts did not believe in. Making the renderer match price_at() fixed the disagreement and made the visible kick worse, because now the line really did climb an hour's worth of slope across a one-bar maintenance break. Neither convention is what a person means by drawing a line. A trendline advances per bar, so both sides now evaluate in bar space: a new bar_space module the runtime uses to position sloped levels, mirrored by indexAt() in the chart. The line is straight on screen and the alert fires where it is drawn. Also, from testing against the live chart: - A plain click with the trendline tool armed did nothing and left the tool armed, so the next click began a new line — which is how the slope change was first noticed. Click-click and press-drag-release are both supported now, with the rubber band following the cursor between clicks. - Hand-placed levels are armed, fire once, then disarm themselves, and can be re-armed from the sidebar. Verified end to end: created armed, tripped within thirty seconds, disarmed, re-armed. - Layers is collapsible. - The 1h moving averages are gone; only the daily set remains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
27 lines
786 B
Text
27 lines
786 B
Text
# Data sources
|
|
LIVE_SOURCE=yahoo
|
|
SEED_SOURCE=yahoo
|
|
YAHOO_SYMBOL=ES=F
|
|
YAHOO_POLL_SECONDS=20
|
|
SEED_1H_RANGE=730d
|
|
SEED_1M_RANGE=8d
|
|
|
|
# Chart and analysis
|
|
TIMEFRAMES=1m,5m,15m,30m,1h,1d
|
|
BASE_TIMEFRAMES=1m,30m,1d
|
|
MAX_BARS_PER_TF=5000
|
|
MA_SETS__1D=sma10,sma20,sma50,sma100,sma200
|
|
DAILY_ANCHOR_ET=18:00
|
|
MANUAL_LINES_PATH=./data/manual_lines.json
|
|
CONFLUENCE_MIN_SCORE=28
|
|
# Four hours. Suppression is per price zone, so an unrelated zone still alerts;
|
|
# this governs only how often the same area repeats. See README.
|
|
ALERT_COOLDOWN_SECONDS=14400
|
|
|
|
# Notifications and access
|
|
NTFY_TOPIC=
|
|
NTFY_SERVER=https://ntfy.sh
|
|
# Blank = no auth (fine locally). In production this is set in Coolify, not
|
|
# here — see README. Sent as the X-Chart-Token header, or ?token= for /ws.
|
|
CHART_AUTH_TOKEN=
|
|
REPLAY_FILE=
|