Candlestick patterns at trendlines combine two simple ideas: a trend that has respected a diagonal line, and a reversal candle that shows the pullback to that line is being bought (or, in a downtrend, sold). The line tells you where to look; the candle tells you when. A hammer or a piercing line that closes back above a rising line gives a defined entry and a stop just under the pattern, while a candle that closes well below the line warns that the trend may be breaking. This guide explains how to draw a usable trendline, which patterns to wait for, a worked example on gold and what the real charts and data scan below show.
Candlestick patterns at trendlines: drawing the line
- Two real swing points. For an uptrend, connect two clear swing lows; for a downtrend, two clear swing highs. Draw the line before the pattern appears, not afterwards.
- Closing basis. Small wicks through the line are normal; a close well beyond it means the line has failed.
- Angle. Very steep lines break quickly; lines at a moderate angle hold more often and give more room.
- Freshness. The second and third touches usually react best; a line touched many times is crowded and easier to break.
How to use a candle at the line
- Wait for the touch. The pattern’s low (longs) or high (shorts) should reach or slightly pierce the projected line.
- Look for a reversal candle. Hammer, bullish engulfing, piercing line or morning star in an uptrend; the mirror patterns in a downtrend.
- Confirmation close. Enter when a later candle closes above the pattern high (long) or below the pattern low (short).
- Combine with levels. A trendline that meets a horizontal support or resistance level or a rising moving average makes the zone stronger.

Where to place the stop and the target
- Stop below the pattern. A small buffer under the pattern low; if the stop must also sit below the line, include that.
- Targets. The last swing high is the first hurdle; a 2R target is a clear rule for testing.
- Size from the risk. On gold, 0.01 lot changes by about $1 for each $1 move.
Worked example: an illustrative hammer at a rising trendline
Illustrative example only. The prices below were constructed for teaching. They are not taken from a live or historical chart, they are not a past result, and they are not a signal to buy or sell gold, forex or any other market.
Context. XAUUSD on H1 has made two higher swing lows; a line through them rises by about $5 per candle. Price rallies to 4,152, then pulls back for four red candles toward the line near 4,086.
Pattern. A candle opens at 4,102, drops to 4,084, just under the line, and closes at 4,108: a hammer whose long lower shadow tested the trendline and was rejected.
Confirmation. The next candle closes at 4,126, above the hammer’s high of 4,110.
- Illustrative entry: 4,126 (buy at the confirmation close).
- Illustrative stop loss: 4,080, below the hammer’s low of 4,084. Risk: $46 per ounce, which is $46 for 0.01 lot.
- Illustrative take profit 1 (1R): 4,172. Take profit 2 (2R): 4,218.

Why the touch matters. The wick went through the line but the body closed back above it, so the line held on a closing basis, which is the rule this example uses.

Managing the trade
- The last high is the first hurdle. Here 4,152 sits below 1R; expect a pause there.
- If the line breaks. A close well below the line after entry is a reason to reconsider, even before the stop.
- Check a higher timeframe. A line on H1 that agrees with the H4 trend usually has more weight; see our guide to multi-timeframe analysis.
A pre-trade checklist for trendline patterns
- Line: drawn through two clear swing points before the pattern.
- Touch: the pattern tests the line without a deep close beyond it.
- Candle: a recognised reversal pattern closing on the trend side.
- Trigger: confirmation close beyond the pattern.
- Numbers: stop beyond the pattern, target at the last swing or 2R, size from the dollar risk.
Real gold examples: patterns at a trendline
The charts below use real XAUUSD candles (Dukascopy Bank public data, spot gold, Bid price; times in UTC+7). Nothing on them is edited or invented. We scanned gold’s H1 and M30 history from January 2012 to 19 November 2026 with the rules of our core pattern guides (hammer, shooting star, bullish and bearish engulfing, morning and evening star, piercing line, dark cloud cover): entry by each pattern’s rule, stop loss a small buffer beyond the pattern, take profit at 2R. A trade counted here only if a rising trendline through two earlier swing lows (falling line through two swing highs for shorts) had held on a closing basis, the pattern’s low (high) came within 0.3 ATR of the projected line and the pattern closed back on the trend side of it. 497 trades passed this filter and 37.0% of them reached 2R before the stop. Without the filter, 3245 trades on the same eight patterns reached 2R in 32.8% of cases, so in our data the filter raised the hit rate only slightly. The two charts below are selected winning examples, not typical results.
Example 1: Piercing line at a trendline, XAUUSD H1, 17 Sep 2025

Real XAUUSD H1 chart (Dukascopy data, UTC+7). Entry $3,665.78, stop $3,659.10, target $3,679.14: +$13.36 per 0.01 lot.
- Pattern: completed on the H1 candle that opened at 17 Sep 2025 18:00 (UTC+7).
- Trendline: drawn through the swing lows of 11 Sep 2025 19:00 ($3,611.47) and 15 Sep 2025 14:00 ($3,633.47), times UTC+7; it stood at $3,660.30 at the pattern. The pattern’s low came within 0.3 ATR of the line and the candle closed back above it.
- Entry: Buy at $3,665.78, at the close of the candle that completes the pattern.
- Stop loss: $3,659.10, a small buffer below the pattern’s stop level at $3,659.82. Risk: $6.68 per ounce (1R).
- Take profit: $3,679.14 (2R). Price passed TP1 at $3,672.46 (1R) and reached TP2 after 1 H1 candles, at 17 Sep 2025 19:00 (UTC+7).
- Result: +$13.36 per 0.01 lot (1 ounce), or +134 pips (1 pip = $0.10).
Example 2: Bearish engulfing at a trendline, XAUUSD M30, 17 Jan 2024

Real XAUUSD M30 chart (Dukascopy data, UTC+7). Entry $2,022.32, stop $2,029.23, target $2,008.50: +$13.82 per 0.01 lot.
- Pattern: completed on the M30 candle that opened at 17 Jan 2024 20:00 (UTC+7).
- Trendline: drawn through the swing highs of 16 Jan 2024 06:00 ($2,055.49) and 16 Jan 2024 20:30 ($2,044.91), times UTC+7; it stood at $2,028.50 at the pattern. The pattern’s high came within 0.3 ATR of the line and the candle closed back below it.
- Entry: Sell at $2,022.32, at the close of the confirmation candle, the first close below $2,023.35.
- Stop loss: $2,029.23, a small buffer above the pattern’s stop level at $2,028.90. Risk: $6.91 per ounce (1R).
- Take profit: $2,008.50 (2R). Price passed TP1 at $2,015.41 (1R) and reached TP2 after 3 M30 candles, at 17 Jan 2024 22:00 (UTC+7).
- Result: +$13.82 per 0.01 lot (1 ounce), or +138 pips (1 pip = $0.10).
Past results do not guarantee future results. Broker prices, spreads and slippage differ slightly from these data. Trading gold with leverage carries a high risk of loss.
Common mistakes with candlestick patterns at trendlines
- Redrawing the line to fit the latest candle.
- Buying a hammer after the line has already broken on a close.
- Using lines that are too steep to hold.
- Ignoring that the third or fourth touch is often weaker.
- Placing the stop exactly on the line, where wicks often reach.
FAQ
Is a trendline better than a horizontal level?
Not by itself. Horizontal levels are easier to define; trendlines add the trend’s direction. The scan below compares trades at trendlines with all trades.
Can I use trendlines on M15 or M30?
Yes, but lines on lower timeframes break more often. The real charts below include both H1 and M30.
What if the pattern forms slightly away from the line?
This guide’s rule allowed a small gap (0.3 ATR). Farther away, it is just a pattern in a trend, not a trendline trade.
Which patterns work at a trendline?
Any reversal pattern can. The real examples below use the patterns the data actually produced.
Risk note: Trading gold, forex and CFDs with leverage carries a high risk of loss, including the loss of your entire deposit. This article is for information and education only and is not investment advice, not a personal recommendation and not a signal. The worked prices are illustrative. Past patterns do not guarantee future results. Use only risk capital, set a stop loss before you enter, and never size a trade so that one loss can damage your finances.
Related: Hammer candlestick pattern: how to identify it and an example entry · Support and resistance candlestick patterns: trading key levels with an example entry · Candlestick patterns with moving averages: trade the pullback with an example entry · Multi-timeframe analysis: how to align your entries · Piercing line candlestick pattern: how to identify it and an example entry
Sources: Trend lines · Thomas Bulkowski, The Pattern Site — Hammer
A note from TopFundTrading
Trading gold, forex and CFDs with leverage carries a high risk of loss, including the loss of your entire deposit. This article is for information and education only and is not investment advice.
If you want to trade larger capital without risking your own savings, you can consider a funded-trader challenge. WeMasterTrade is listed #1 (9.7/10) in TopFundTrading’s own prop-firm ranking – our editorial listing, not an independent rating.
Sign up for a WeMasterTrade account now
Referral link: topfundtrading.com may earn a commission if you sign up through this link.


Français
简体中文
繁體中文
한국어
Русский


