• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cm45t3r / candlestick / 29552177465
100%

Build:
DEFAULT BRANCH: main
Ran 17 Jul 2026 03:21AM UTC
Jobs 4
Files 29
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2026 03:21AM UTC coverage: 99.639% (+0.04%) from 99.598%
29552177465

push

github

web-flow
feat(patternChain): trend-context-aware confidence, deprecate static confidence (#99)

* feat(patternChain): trend-context-aware confidence, deprecate static confidence

Pattern functions are evaluated independently with no shared trend
context. On real data (AAPL, 2025-07-22/23) this lets the identical
candle qualify as both `hammer` (bullish reversal, expects a preceding
downtrend) and `hangingMan` (bearish reversal, expects a preceding
uptrend) — opposite signals on the same shape, disambiguated only by
context. Each pattern's static `confidence` also can't distinguish a
textbook occurrence from a marginal one.

Adds an opt-in `trendContext` option to `patternChain`:

- `trendMethod: "sma-slope" | "ema-slope" | "pct-change"` — built-in
  trend measures (src/trend.js), signed fractions comparable across
  price levels.
- `externalTrend` / `trendFn` — escape hatches for callers with a more
  advanced trend/regime model, mirroring #96/#97's design for
  volatility (this package implements neither GARCH nor an HMM itself).
- Each match derives its expected preceding-trend direction from its
  existing `type`+`direction` metadata (src/contextFit.js):
  reversal patterns expect the OPPOSITE trend, continuation patterns
  expect the SAME trend, neutral patterns expect nothing. This is the
  exact rule that resolves the hammer/hangingMan contradiction above.
- Results carry `trendContext` (a coarse label) and `contextFit` (0-1).
  `enrichWithMetadata` additionally computes `effectiveConfidence`
  (`confidence * contextFit`) — the trend-aware alternative to the
  now-deprecated static `confidence` (kept for backward compatibility,
  marked `@deprecated` in JSDoc/types, not scheduled for removal before
  a major version).
- `resolveConflicts: true` optionally drops the lower-`contextFit` side
  of a same-candle, opposite-direction conflict (default: surface both).

Reuses `src/seriesResolver.js` (#97) for the method/external/callback
resolution, same precede... (continued)

884 of 893 branches covered (98.99%)

Branch coverage included in aggregate %.

346 of 346 new or added lines in 5 files covered. (100.0%)

3254 of 3260 relevant lines covered (99.82%)

15716.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-20.x - 29552177465.1 17 Jul 2026 03:21AM UTC 29
99.68
GitHub Action Run
2 run-ubuntu-latest-22.x - 29552177465.2 17 Jul 2026 03:21AM UTC 29
99.7
GitHub Action Run
3 run-windows-latest-20.x - 29552177465.3 17 Jul 2026 03:22AM UTC 29
99.68
GitHub Action Run
4 run-windows-latest-22.x - 29552177465.4 17 Jul 2026 03:22AM UTC 29
99.68
GitHub Action Run
Source Files on build 29552177465
  • Tree
  • List 29
  • Changed 10
  • Source Changed 2
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29552177465
  • 6056dbfc on github
  • Prev Build on main (#29127823745)
  • Next Build on main (#29552351244)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc