Senkou Span A and B are plotted 26 periods ahead of calculation.
Comparing current price to iloc[-1] cloud means comparing against the
cloud 26 bars in the future — a textbook look-ahead bias that inflates
signal grades in backtests. Now uses iloc[-(kijun+1)] so the cloud
boundaries reflect where the cloud actually is at the current candle.
TK cross (tenkan_val/kijun_val) stays at iloc[-1] — that is a current
condition, not a projected one.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- engine: composite-score denominator now confidence-weighted, so the
output actually spans -100..+100 (the prior formula put confidence
in the numerator only, capping the realistic score around ±25-30
and making STRONG_BUY ≥40 essentially unreachable).
- engine: ATR percentile uses iloc[-50:-1] to exclude the current bar
from its own comparison (off-by-one in volatility regime).
- signal_aggregator: always blend primary score with MTF average. The
prior code only blended on agreement, leaving the primary unblended
on disagreement — backwards. Disagreement is exactly when the score
should be pulled toward consensus.
- telegram_bot: JobQueue auto-scan every 10 min that pushes A/A+ to
ALERT_CHAT_ID with a prominent News & Events block (sentiment +
headline summary + event-risk + alignment hint). Per-bar dedup so
persistent setups alert once per new candle, not every 10 min.
Suppresses alerts when event_risk = "danger".
- telegram_bot: /myid returns chat ID for ALERT_CHAT_ID setup. Auto-scan
silently disabled when ALERT_CHAT_ID is unset.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>