Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The Hammer and the Hanging Man Are the Same Candle

Description and use

The candlestick library resolves ambiguous hammer/hanging‑man signals by evaluating trend context and computing a contextFit score, improving signal reliability and reducing memory usage with streaming support.

Problem

Pattern detection libraries often return both hammer and hanging man for the same candle, leaving users to decide which signal to trust based on prior trend context.

Outcome

By incorporating trend context and contextFit, the library eliminates ambiguous hammer/hanging‑man signals, improves signal reliability, and reduces memory usage with streaming support.

Workflow

  • 1. Import candlestick and required functions.
  • 2. Call patternChain with data, allPatterns, and trendContext options (e.g., trendMethod:'sma-slope', trendPeriod:10).
  • 3. Inspect returned matches; each includes trendContext and contextFit.
  • 4. Use metadata.enrichWithMetadata to compute effectiveConfidence (confidence × contextFit).
  • 5. Optionally set resolveConflicts:true to drop weaker opposite‑direction matches.
  • 6. Consume matches via onMatch callback or process the array as needed.

Evidence

Same uptrend, same long-lower-wick geometry, and the library tells you which reading the context supports.

Source

Passing resolveConflicts:true goes further and drops the weaker side of a same-candle, opposite-direction conflict outright.

Source

  • Record date: 2026-09-20T08:16:50.486Z