In this article
After this article, you can
- Reconstruct both sides’ OHLC from one quote sequence.
- Test how variable spread changes an upper-wick condition.
Terms at hand: bid and ask (bid-ask prices) · spread (bid-ask spread) · Backtesting · Demo account · Stop loss · Short position
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.
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.
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
- 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.
- 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.
- 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.
- 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.
Check your understanding
One short exercise
About 2 min · you can try again
Ask O100.2,H104.2,L100,C101.8. Does it meet U≥2B?
- Yes, because simultaneous Bid has U/B=4.
- Yes, because divide the entire High by Close.
- No: U=2.4 and B=1.6, so2.4<3.2.
Check the answer and explanation
No: U=2.4 and B=1.6, so2.4<3.2.
The upper body edge is101.8;104.2−101.8=2.4. Body length is1.6 and twice it is3.2.
Frequently asked
What is the difference between the inverted hammer and the shooting star?
The traditional distinction is preceding context: inverted hammer after a decline, shooting star after a rise. Both can have a small body near the Low and a long upper shadow, regardless of body colour. Exact scanner rules may differ: our stated shape filter has no gap, whereas TA-Lib C v0.6.4 additionally requires a strict real-body gap down or up, respectively, and does not itself test the trend. A label is not a guaranteed reversal.
Why do these patterns need a confirming candle?
Confirmation is a chosen rule for delaying a decision, not proof that a pattern is profitable. Our illustration tests only the immediately following close above the High for the declining-context candidate or below the Low for the rising-context candidate. Equality fails and a missed window expires. Other confirmation rules produce different samples. No unverified stock-market success percentage is applied to currencies.
Where do you place the stop loss and target for these candles?
In the illustrated long variant, the planned stop is below the candidate Low and the target at defined resistance; in the short variant, the stop is above the High and the target at support. These are optional trade rules, separate from candle detection. Calculate reward and loss from executable prices, position size and costs. Ordinary stops can slip. Higher timeframes and additional price filters do not by themselves establish greater reliability.
Sources & bibliography
-
Thomas N. Bulkowski Inverted Hammer Candlestick — performance statistics · Describes the inverted-hammer candle and the author's sample analysis. thepatternsite.com ↗
-
Thomas N. Bulkowski Shooting Star Candlestick — performance statistics · Describes the shooting-star candle and the author's sample analysis. thepatternsite.com ↗
-
Thomas N. Bulkowski Candlestick Patterns — index · An index of candlestick-pattern pages with links to the author's descriptions and sample statistics. thepatternsite.com ↗
-
Bank for International Settlements Triennial Central Bank Survey 2022 · The 2022 survey provides background on global foreign-exchange turnover and market structure. www.bis.org ↗
-
TA-Lib CDLINVERTEDHAMMER — C v0.6.4 implementation · Specifies rolling candle-shape thresholds and a strict preceding-body gap down; does not identify a preceding downtrend or estimate trade returns. raw.githubusercontent.com ↗
-
TA-Lib CDLSHOOTINGSTAR — C v0.6.4 implementation · Specifies a strict preceding-body gap up and a −100 code under its shape conditions; the synthetic gap examples were independently emulated, not run with a native library. raw.githubusercontent.com ↗
-
OANDA developer documentation REST v20 Pricing Definitions · Distinguishes quote timestamp and Bid/Ask liquidity buckets; supports specifying the price side in the fictional synchronous-quote model, not broker-wide execution guarantees. developer.oanda.com ↗
