All posts
PublishedByEvidence recordPin barWickPrice actionHammerCandlestick patternsBacktestUSDJPY

Is the Pin Bar Profitable? 252 Backtests on USD/JPY

Pin bar win rates on USD/JPY over two years across every wick-to-body ratio from 1 to 5, and what happens when the wick is measured against the bar's range instead.

A pin bar has one long wick. A long lower wick is read as buying that came in below, a long upper wick as selling that came in above, and the usual rule is to enter against the wick.

"Long" is a number here. Formiq's backtester compares the wick with the body, at a default of two times, and this article moves that from 1 to 5.

One thing came out of the counting first. At the default of 2, between 27.57% and 30.38% of all bars qualify — nearly one bar in three.

Raising the number barely moves the result. On the hourly chart in 2024 a ratio of 1 reads 51.46% and a ratio of 5 reads 51.69%, while the candidates fall from 2,973 bars to 859.

What moved the result was changing what the wick is measured against. Comparing it with the bar's whole range instead of its body clears the base rate in five cells of six.

−20+2+4+615-minute 202515-minute 2024Hourly 2025Hourly 20244-hour 20254-hour 2024points above the base rate
wick at 2x the body (the default)wick at 70% of the rangeUSD/JPY, judged on the close ten bars later
Points above the base rate ten bars out, on the same bars filtered two ways. The wick measured against the range clears the base rate in five cells of six; the shipped wick-to-body ratio clears it in four, and by less.

What the pin bar condition actually tests

  • lower wick ≥ body × ratio, and lower wick > upper wick → long
  • upper wick ≥ body × ratio, and upper wick > lower wick → short

The wick is the part outside the body: from the lower of open and close down to the low, and from the higher of the two up to the high.

The comparison is wick against body. The range, high to low, never enters it. A bar with a small body clears any ratio easily; a bar with a large body fails it however long the wick is in absolute terms.

The default calls nearly one bar in three a pin bar

Counting bars where one wick is longer than the other and the ratio of 2 is met:

TimeframeYearBars consideredQualifying at 2Share
15-minute202524760695728.10%
15-minute202424860685327.57%
Hourly20256205175728.32%
Hourly20246242186229.83%
4-hour2025159246929.46%
4-hour2024161349030.38%

27.57% to 30.38%: about 1,800 a year on the hourly chart and 6,900 on the 15-minute. A description that fits one bar in three is not filtering much.

Settings and the one number it takes

Nothing is drawn; the pattern is a single candle already on the chart.

ConditionNumeric fieldDefaultWhat changes
Pin barwick ratio2raising it keeps only wicks that are longer relative to the body, and cuts the count

The same value applies to both sides. There is no way to make one side stricter.

The published trading rule

Enter at the close of the pin bar, against the wick: long on a long lower wick, short on a long upper wick. The usual exit is an opposite pin bar, and the usual stop sits at the tip of the wick.

How this was measured

ItemValue
PairUSD/JPY
Timeframes15-minute, hourly, 4-hour
Period1 January 2024 to 31 December 2025
Detectionthe same test the backtest runs, rewritten and checked against it
Controlevery bar of the same window, weighted to each group's mix of sides
Horizonthe close 1, 5, 10 and 20 bars after the signal bar
Exitsan opposite pin bar, and a fixed ten-bar hold
Wick ratios1, 1.5, 2, 2.5, 3, 4 and 5
Runs7 ratios x 2 exits and one spread-free pass x 3 timeframes x 4 windows = 252
Spread0.3 pips, fixed
Lot0.1
Fillat the close

One note on the control. The pin bar produces long and short signals, so comparing a short-heavy group with the share of bars that closed higher would penalise it in a year that rose. Each group is therefore compared with a base rate blended to its own count of long and short signals.

Walking the wick-to-body ratio from 1 to 5

Share of signals that closed against the wick ten bars later, with the gap to the base rate in brackets:

RatioHourly 2025Hourly 20244-hour 20254-hour 2024
12898 at 50.83% (+0.81)2973 at 51.46% (+0.81)766 at 52.09% (+2.15)789 at 55.64% (+3.70)
1.52188 at 50.78% (+0.76)2281 at 51.64% (+1.01)584 at 53.42% (+3.49)618 at 55.66% (+3.94)
21757 at 50.88% (+0.87)1862 at 51.40% (+0.83)469 at 52.88% (+2.95)490 at 56.12% (+4.18)
2.51476 at 50.68% (+0.66)1562 at 51.47% (+0.82)385 at 54.29% (+4.36)416 at 56.01% (+3.76)
31246 at 50.40% (+0.38)1365 at 51.72% (+1.08)336 at 55.65% (+5.73)350 at 55.43% (+2.86)
4977 at 50.05% (+0.03)1052 at 51.52% (+0.79)270 at 54.81% (+4.88)273 at 53.11% (+0.80)
5806 at 50.00% (-0.02)859 at 51.69% (+1.02)227 at 53.74% (+3.83)228 at 52.63% (+0.30)

On the hourly chart in 2024 the gap at a ratio of 5 is +1.02 points, against +0.81 at a ratio of 1. In 2025 the gap shrinks as the ratio rises, reaching -0.02 at 5.

The 4-hour chart peaks at a ratio of 3 in 2025 (+5.73) and at 2 in 2024 (+4.18). The ratio that worked best does not agree between the two years.

The 15-minute chart is below its base rate at all seven steps: -0.90 to -0.40 in 2025 and -1.06 to -0.06 in 2024.

Raising the ratio does one thing reliably, and that is cutting the count: 2,898 down to 806 on the hourly chart in 2025.

Measuring the wick against the range instead

The same bars, cut by how much of the bar's high-to-low range the longer wick occupies:

Wick shareHourly 2025Hourly 20244-hour 20254-hour 2024
30% or more4092 at 50.22% (+0.20)4208 at 51.43% (+0.73)1059 at 51.46% (+1.52)1087 at 55.20% (+3.29)
40% or more3038 at 50.79% (+0.77)3159 at 51.47% (+0.75)802 at 52.00% (+2.07)818 at 55.13% (+3.07)
50% or more1971 at 50.03% (0.00)2125 at 51.44% (+0.63)520 at 52.50% (+2.58)556 at 56.12% (+3.78)
60% or more1121 at 50.04% (+0.03)1142 at 53.06% (+2.10)296 at 55.41% (+5.51)300 at 56.00% (+3.25)
70% or more511 at 53.03% (+3.01)510 at 53.53% (+2.23)126 at 56.35% (+6.44)140 at 55.71% (+1.92)

The 70% row clears the base rate on the hourly and 4-hour charts in both years. On the 15-minute chart it clears in 2024 by +0.34 and misses in 2025 by -1.36, so five cells of six.

The default wick-to-body ratio of 2 clears in four cells, by 0.83 to 4.18 points. The range measure wins on both counts: more cells, and larger gaps.

The two rules do not pick the same bars. On the hourly chart in 2025, 1,757 bars meet the ratio of 2, 1,971 have a wick at half the range or more, and 1,506 do both. 251 bars are chosen only by the ratio and 465 only by the range, so roughly a quarter of each set is unique to it.

Formiq's backtester has no "wick at N% of the range" condition, so the range measure here is a count rather than something to trade directly.

A bar with no body can never qualify

The test requires body > 0. A bar whose open and close are exactly equal is never a pin bar, however far the wick runs.

TimeframeYearBars consideredBody exactly zeroShareMedian wick share of range
15-minute202524760830.34%66.67%
15-minute2024248601050.42%66.67%
Hourly20256205100.16%58.65%
Hourly20246242130.21%73.18%
4-hour2025159220.13%80.26%
4-hour2024161340.25%72.83%

They are 0.13% to 0.42% of bars, so not many. What they are, though, is bars whose wick takes 60 to 80% of the range, excluded because the divisor is zero. Under a ratio test, a body of zero is not an infinite ratio; it is out of scope.

How the hammer differs

A hammer is the long side of a pin bar with one more requirement: the upper wick must not exceed the body. The long pin bar only asks that the lower wick be the longer of the two.

On the hourly chart in 2025 there were 937 long pin bars, of which 306 (32.66%) also met the hammer requirement. Ten bars later, 50.69% of the pin bars had risen against 54.58% of the hammers.

All 306 hammers are inside the 937 pin bars. They cannot be compared as separate methods.

Trading all 252 runs

Entering at the close and holding until an opposite pin bar, hourly:

Ratio2025 trades2025 win rate2025 net pips2024 trades2024 win rate2024 net pips
1141749.40%-636.7146849.86%+455.4
1.5108349.86%-276.3112250.98%+1430.8
288450.68%+858.989049.33%+1560.4
2.574151.55%+581.573048.77%+753.4
362751.20%-105.263048.73%+1229.3
446750.11%-576.848448.14%+612.0
539150.13%+339.439446.70%+1008.0

Three of the seven cleared both years (2, 2.5 and 5), with 3 and 4 failing in between. The survivors are not a contiguous range.

The 4-hour chart cleared six of seven (everything but 2.5). The 15-minute chart cleared none of the seven, at either exit. With a fixed ten-bar exit the hourly chart cleared two and the 4-hour four.

The 4-hour figures differ sharply between years. At a ratio of 2 the average trade returned +0.60 pips in 2025 and +14.40 in 2024, on 224 and 243 trades.

Splitting 2025 in half

Ratio2025Jan-JunJul-Dec
1-636.7-198.3-446.1
1.5-276.3+916.5-1269.3
2+858.9+931.7-149.3
2.5+581.5+486.1+18.9
3-105.2+549.8-731.5
4-576.8+845.1-1345.5
5+339.4+701.3-290.2

Only the 2.5 ratio was profitable in both halves. The ratio of 2, which finished 2025 at +858.9 pips, lost 149.3 of them in the second half.

Last year's best ratio, held through this year

Timeframe2024 winner2024 net pips2025 net pips2025 rank2025 median of 7
15-minute5+551.2-3212.95th-2830.5
Hourly2+1560.4+858.91st-105.2
4-hour2+3498.7+133.86th+415.7

Only the hourly pick held its position. The 4-hour ratio of 2 went from +3,498.7 pips to +133.8, sixth of seven.

Stops, targets and cost

Stop / target2025 trades2025 win rate2025 net pips2024 net pips
none (exit on an opposite pin bar)88450.68%+858.9+1560.4
30 / 60111643.46%+184.6+332.3
60 / 30105654.92%+79.9-362.1
50 / 50104050.00%+348.3+177.3

Hourly, ratio 2. The 60 / 30 exit gives the highest win rate and the only losing year of the four. The entries are identical; the win rate runs from 43.46% to 54.92%.

TimeframeRatioTradesSpread paidTrades x 0.3
15-minute156121683.51683.6
15-minute235221056.51056.6
Hourly2884265.2265.2
4-hour222467.267.2
4-hour58826.426.4

Spread paid matched trade count times 0.3 pips. The 15-minute chart at a ratio of 2 still returns -1,505.6 pips at zero spread, so the loss is in the entry rather than the trade count.

Notes

The data is USD/JPY from 1 January 2024 to 31 December 2025. Fills are at the close, the spread is fixed at 0.3 pips, and the lot is 0.1. The detection code is a rewrite of the backtester's own test; at the default ratio of 2 it matches the engine's counts and rates in all twelve cells of three timeframes by two years by two sides. Bars whose upper and lower wicks are exactly equal point in no direction and are excluded. Because the horizons run out to 20 bars, that many bars at the end of each year are excluded from the counts.

Questions people ask

What is the win rate of the pin bar?
On the hourly chart in 2025 the default setting (wick at twice the body) fired 1,757 times, and 50.88% of those closed against the wick ten bars later. Every bar of the same window, weighted to the same mix of long and short signals, gives 50.01%. The 15-minute chart is below its base rate in both years; the 4-hour chart is above it in both.
How many times the body should the wick be?
Changing it barely moved the result. On the hourly chart in 2024 the seven steps from 1 to 5 all land between 51.40% and 51.72%. In 2025 the rate falls as the ratio rises, from 50.83% at 1 to 50.00% at 5, while the count drops from 2,898 to 806.
Should the wick be measured against the body or the range?
Against the range separated more. Requiring the wick to be at least 70% of the bar's high-to-low range beat the base rate in five cells of six, by 3.01 and 2.23 points on the hourly chart and 6.44 and 1.92 on the 4-hour. The default wick-to-body ratio of 2 beat it in four, by 0.83 to 4.18 points.
How is a hammer different from a pin bar?
A hammer is the long side of a pin bar with one clause added: the upper wick must not exceed the body. Of the 937 long pin bars on the hourly chart in 2025, 306 (32.66%) also qualified as hammers. Ten bars later 50.69% of the pin bars had risen against 54.58% of the hammers.
Can I change the pin bar ratio in Formiq?
Yes. The pin bar condition in the backtest builder exposes a wick ratio, set to 2 by default, and the same value applies to the long and the short side.

Formiq is a free browser-based FX terminal with replay practice and no-code backtesting. Open the chart or see what the free plan includes.