An inverted hammer and a shooting star can share the same small body and long upper shadow. Their traditional interpretation depends on the preceding decline or rise. Below we separate candle geometry, a stated trend filter, a next-candle confirmation rule and the price series used. A label alone supplies neither an executable order nor a probability of reversal.

One shape, two names — what decides the meaning

The two names describe similar geometry: a small body near the low and a relatively long upper shadow. Definitions vary. In our explicit filter, B=|Close−Open| must be positive and at most 25% of High−Low; the upper shadow must be at least 2B and the lower shadow at most 0.5B. Equality is allowed. A zero body is handled separately as a doji. This filter requires neither a particular body colour nor a gap.

Traditionally, a candidate after a decline is interpreted as an inverted hammer and a possible bullish reversal; after a rise, as a shooting star and a possible bearish reversal. The preceding sequence must be defined rather than inferred from a name. The linked hammer at the bottom of a trend has a long lower shadow. These interpretations describe hypotheses, not observed future direction.

While you are at it, do not confuse these two with the hammer and the hanging man. There the long shadow runs downward and the body sits at the top edge of the candle. Four names, two shapes and one ordering rule: first check which way the shadow points, and only then whether the candle stands after a decline or after a rise.

What OHLC shows about the upper shadow

A long upper shadow means that the recorded High lies well above both Open and Close. It does not establish who traded, why they traded, or whether the High preceded the Low. For O/H/L/C=1.1000/1.1040/1.0998/1.1008, both O→H→L→C and O→L→H→C paths are possible. At 0.0001 per pip, the body is 8 pips, the upper shadow 32 and the lower shadow 2.

The range is 42 pips, so the body occupies 19.05%; upper/body=4 and lower/body=0.25. The candle passes our shape filter. Three preceding closes 1.1120→1.1080→1.1040 supply our illustrative declining context; 1.0880→1.0920→1.0960 supply the rising context. The candidate remains the same upward body in both examples. This is a specified three-close model, not a complete TA-Lib input, because earlier Opens and warm-up candles are missing.

Why need an Ask candle not be a shifted Bid copy?

Four fictional consecutive Bid/Ask quotes are100/100.2;104/104.2;99.8/100;100.8/101.8. The first and last observations start and end the period; there are no other observations.

Variable spread changes the other-side candleSynchronous Bid/Ask quotes:100/100.2;104/104.2;99.8/100;100.8/101.8. Aggregating gives Bid body0.8 and upper wick3.2; Ask body1.6 and upper wick2.4. This is not a constant-spread shift.BID AND ASK: DIFFERENT BODIESBid: B = 0.8Ask: B = 1.6Upper wick: Bid3.2; Ask2.4.U/B:4 on Bid;1.5 on Ask.The last quote has a wider spread.

Arbitrary price units and four complete quote pairs. This calculates geometry, without orders or claims about participants. OANDA REST v20 Pricing Definitions separates Bid, Ask and quote creation time.

Both candles use the same observation times and one scale of arbitrary prices.

Bid O/H/L/C=100/104/99.8/100.8; Ask=100.2/104.2/100/101.8. Bid body B=0.8, upper wick U=3.2 and U/B=4; Ask B=1.6, U=2.4 and U/B=1.5. Our U≥2B condition passes only on Bid. The wider final spread causes this, not a different time history or bank activity. With constant spread and the same complete observations, adding a constant preserves lengths. Specify price type in the scanner; do not combine one side’s High with the other’s Close.

Why both candles need confirmation

A detector code is separate from a trade. TA-Lib C v0.6.4 uses rolling shape thresholds and an additional strict real-body gap: downward for CDLINVERTEDHAMMER, upward for CDLSHOOTINGSTAR. Its functions do not test the preceding trend. With 12 warm-up candles O/H/L/C=90/100/88/95, then a predecessor with H/L/C=104/95/98, and a candidate 100/105/99.9/101, changing only the predecessor Open from 97 to 100 or 102 changes the shooting-star code from −100 to 0 or 0. The candidate geometry is unchanged; a touching or overlapping body fails the strict upward gap.

Our optional confirmation variant examines only the immediately following closed candle: Close>1.1040 for the declining-context candidate, or Close<1.0998 for the rising-context candidate. Closes 1.1042 and 1.0996 pass their respective tests by 2 pips; equality does not. If the next candle fails, this one-candle window expires instead of silently extending. These rules do not identify an entry fill, costs, stop or target, and do not prove who controls the market.

Write down the price source, timeframe, shape thresholds, prior-context filter and confirmation window before counting results. A change in any of these can change the candidate set. Separately specify how the order will execute, its cancellation rule, stop, target and position size. Ordinary protective stops can slip, so their existence alone does not fix the maximum realised loss.

How to trade each pattern

One illustrative inverted-hammer procedure waits for the stated declining context and a next-candle close above the candidate High before considering a long. It then uses a planned stop below the candidate Low and a target at a previously defined resistance. The trigger and execution price are separate; this is one testable procedure rather than the pattern’s compulsory strategy.

Shooting-star variant: use the rising-context filter and next-candle close below the Low before considering a short; the planned stop lies above the candidate High and the target at a defined support. Neither crossing an extreme nor filling a stop establishes traders’ motives. The guide to draw support and resistance can help define levels before the signal.

The specified EUR/USD candle has a 42-pip range and an 8-pip body. Reducing only its High from 1.1040 to 1.1020 reduces the upper shadow to 12 pips: upper/body=1.5 and body/range=36.36%. It now fails both our upper-shadow and body-share conditions. The preceding trend and confirmation window cannot repair a shape that fails the chosen detector. Prices here are hypothetical, and no trading outcome is assigned to either candle.

A longer timeframe changes the OHLC aggregation; it does not establish a higher reversal success rate. An RSI indicator condition can be tested as an additional filter, but it is another transformation of price rather than automatically independent evidence. Compare the same declared entry, exits and costs with and without the filter on data outside the rule-development sample.

The most common mistakes

Common errors include applying a traditional trend interpretation without defining the prior trend, mixing Bid and Ask fields, and counting a confirming close as an executable fill. A scanner may still emit a geometric code in consolidation if it has no trend filter. A stop halfway through a shadow is a different invalidation rule; its risk and observed outcomes must be tested rather than dismissed by an assumed hit frequency.

The engulfing pattern can be compared with this detector under a common data and trade protocol. Adding several price-derived indicators does not by itself prove fewer false signals. Preserve rejected candidates and failed confirmations in the test, rather than displaying only examples that later reversed.

What to do tomorrow

  1. Measure geometry before naming the candle. Record O/H/L/C, price side, body, both shadows and range; apply the stated thresholds to passing and failing examples.
  2. Separate context, confirmation and execution. State the prior-close filter and the one-candle window, then define actual entry, protective order, costs, target and cancellation rules.
  3. Compare detector variants. Keep our no-gap shape rule separate from the pinned TA-Lib rolling averages and strict body-gap requirements. A different code can reflect a different definition, not a data error.
  4. Test complete rules without a readiness deadline. Include all eligible candidates, transaction costs and out-of-sample data. Demo practice checks implementation; one week or a few examples cannot establish expected returns or readiness to risk money.

If you want to organise all your knowledge of candlesticks within a broader course, a good starting point is the technical analysis section in our library.