Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

test

  • test(candles: Candle[], trend: Trend, offset?: number): boolean
  • Tests whether the given candle matches the pattern: Engulfing

    sample

    sample

    Rules

    1. A definite trend must be underway.
    2. The second day's body must be completely engulfed by the prior day's body. This dies not mean, however, that either the top or bottom of the two bodies cannot be equal; it just means the both tops and both bottoms cannot be equal.
    3. The first day's color should reflect the trend; black for a downtrend and white for an uptrend.
    4. The second real body of the engulfing pattern should be the opposite color of the first real body.

    Remarks

    • Source: p.35

    Parameters

    • candles: Candle[]

      candles to be tested against this pattern

    • trend: Trend

      trend in which candle occured

    • Default value offset: number = 0

      offset to earliest / first candle

    Returns boolean

Generated using TypeDoc