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

The Hammer and the Hanging Man Are the Same Candle

说明与用途

candlestick 库通过评估趋势上下文并计算 contextFit 分数,解决了锤子和吊人形态信号的歧义,提高了信号可靠性,并通过流式处理降低了内存使用。

问题

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.

结果

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

工作流

  • 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.

证据

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

来源

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

来源

  • 记录日期: 2026-09-20T08:16:50.486Z