MAIDR Documentation - v4.4.0
    Preparing search index...

    Function candleShape

    • Names the shape a candle is drawn in, or nothing when it is an ordinary one.

      The tests are asked most specific first, because they overlap by construction: every doji also satisfies the spinning top's body condition (0.05 of a range is under 0.33), and a doji with two even wicks satisfies all of it. Doji is the narrower statement and so the one worth making. Marubozu cannot collide with either — a body at 95% of the range and one at 5% are the two ends of the same measurement.

      Parameters

      • candle: Ohlc

        The candle's four prices

      • thresholds: CandleShapeThresholds = DEFAULT_CANDLE_SHAPE_THRESHOLDS

        How strict to be; the requests' figures by default

      Returns CandleShape | null

      The shape's name, or null for a candle that is none of them