Anyone who has ever opened a price action book knows the pin bar: a candle with a long wick showing that the market tried to move one way and was pushed back. Online it’s presented as one of the most reliable signals. I tested the classic rules on seven markets over 72 months: six of seven were negative. But on USDJPY H4, with a stricter pin bar selection and a distant take profit, this idea turned into a working robot. Below are its results, real trades on the chart, and how to download it for free.
- +44.9% over 72 months on USDJPY H4 with a risk of 1% per trade. Maximum drawdown: 9.3%.
- +12.5% in the forward test (10/2024–09/2026) with a profit factor of 1.37: on data the optimizer never saw, the robot kept making money.
- With a risk of 2% per trade, the same robot made +101.2% over 72 months with a 17.9% drawdown.
- In the archive: the ready-to-use MetaTrader 5 robot, the parameter file for USDJPY H4 and the instructions. You can launch it in 5 minutes.
📊 Download the “Trend Pin Bar” robot for free

What the robot does
The name “Pinocchio bar” was coined by Martin Pring in his book “Martin Pring on Price Patterns”: the long wick is like Pinocchio’s nose, it gives away that price “lied” about the breakout. Later the pin bar became the main signal in popular price action courses, for example Nial Fuller’s. The classic rules: the wick is at least 2/3 of the candle, the body is in the opposite third, the wick sticks out beyond the neighboring candles, and you trade only with the trend. The robot keeps this idea and changes what got in the way in the history:
- A strict pin bar. The wick is at least 2/3 of the whole candle and the body is in the opposite third. And the key point: the tip of the wick must go beyond the low (for a buy) or the high (for a sell) of the previous five candles. That means price really tested a new level and was rejected, rather than just leaving a shadow in the middle of a range.
- Trend filter: buys only if the candle closed above the SMA 200, sells only below it. The robot takes pullbacks within the trend and doesn’t try to catch reversals against it.
- Entry: at market at the open of the next H4 candle, right after the pin bar closes.
- Stop: beyond the tip of the wick with a margin of 0.2 ATR(14). Take profit: 4 times the stop distance.
- Position size: based on a risk as a percentage of the balance. 1% in the test; you can set your own in the parameters.
About 28% of trades close in profit. That’s normal for a system like this: one win of 4 stops covers three losses with room to spare.
What it looks like on the chart
Below are two real trades from the robot’s test on USDJPY H4. Both come from the forward period, which the optimizer never saw: one winner and one loser. The yellow line is the SMA 200, the trend filter. The yellow box marks the pin bar.

Winning trade. In mid-June 2026 USDJPY was above the SMA 200, so the robot looks only for buys. On June 15 the first H4 candle dropped below the lows of the previous five candles but closed in its upper part: a long wick down, a small body on top. The robot bought at the open of the next candle at 160.113, with the stop at 159.677 and the take profit at 161.857. On June 22 price reached the take profit: +$550.

Losing trade. On June 5, 2026, also above the SMA 200, the same kind of pin bar with a wick down appeared. The robot bought at 160.282, with the stop at 159.690 and the take profit at 162.650. For a few days price moved the right way but didn’t reach the take profit, and on June 11 it dropped sharply and hit the stop: −$141, about 1% of the balance. A few days later a new pin bar produced the winning trade above: that’s how this system works, a series of small stops and then one long win.
Manually: open USDJPY H4 and add the SMA 200 moving average. Look for a candle whose lower wick is at least 2/3 of the whole candle, with the body in the upper third and the low below the lows of the previous five candles. If it closed above the SMA 200, buy at the open of the next candle. Stop below the tip of the wick with a margin of 0.2 ATR(14), take profit at 4 times the stop distance. For sells everything is mirrored: wick up, price below the SMA 200.
The robot’s result: training and forward
So as not to fool myself with curve fitting, I split the history into two parts. Parameters are chosen only on 10/2020–09/2024. Then the robot takes the exam on 10/2024–09/2026, data the optimizer never saw. Test: MetaTrader 5 Strategy Tester, a demo account from FxPro with its quotes, spreads, commissions and swaps, $10,000 deposit, 1:500 leverage, “1 minute OHLC” mode, 72 months.

| Period (USDJPY H4) | Return | Profit factor | Max drawdown | Trades |
|---|---|---|---|---|
| Training, 10/2020–09/2024 | +29.1% | 1.47 | 7.2% | 74 |
| Forward, 10/2024–09/2026 | +12.5% | 1.37 | 9.2% | 41 |
| All 72 months, 1% risk | +44.9% | 1.43 | 9.3% | 115 |
| All 72 months, 2% risk | +101.2% | 1.39 | 17.9% | 115 |
| Longest stretch without a new high | ≈ 12.5 months (03/2021–04/2022) |
The key here is the forward test: on unfamiliar data the profit factor was 1.37 versus 1.47 in training, so the robot almost kept its edge. And it’s not one lucky combination of numbers. Neighboring settings are positive too: with a 0.4 ATR stop margin the robot made +17.2% in the forward test with a profit factor of 1.57; with a take profit of 3.5 stops, +12.1% and 1.39; with an SMA 150 instead of the SMA 200 and a take profit of 3.5 stops, +12.7% and 1.47. In the second, fine-tuning optimization pass, of 89 sets profitable in training, 66 also made money in the forward test. By year: 2021, −2.4%; 2022, +19.9%; 2023, +4.2%; 2024, +11.7%; 2025, +0.3%; 2026 through September, +5.9%. I’ll be straight with you: profit comes in bursts, and strong years alternate with years near zero. Costs are included: over 72 months commissions took $353, and swaps added +$59 in total.

📊 Download the robot and the USDJPY H4 parameters
Why the pin bar “from the internet” doesn’t work and this robot does
First I ran the classic: daily chart, a wick of at least 2/3 of the candle, the wick sticking out beyond the previous 3 candles, an SMA 200 filter, entry with a stop order beyond the pin bar’s high (low), stop beyond the wick and a take profit of 2 stops. Seven markets, 72 months:

| Instrument (D1) | Result | Profit factor | Max drawdown | Trades |
|---|---|---|---|---|
| GBPUSD | +2.7% | 1.21 | 9.0% | 20 |
| GOLD | −1.5% | 0.77 | 3.4% | 10 |
| WTI (oil) | −4.6% | 0.40 | 8.2% | 10 |
| EURUSD | −4.8% | 0.66 | 7.8% | 19 |
| USDJPY | −7.3% | 0.59 | 13.0% | 25 |
| BITCOIN | −9.3% | 0.32 | 13.0% | 19 |
| USDCHF | −13.0% | 0.29 | 15.3% | 21 |
Six markets of seven are negative, and even the best one, GBPUSD, is +2.7% in six years. There are three reasons:
- Too few signals on D1. 10–25 trades in six years. With a sample like that you can’t tell whether the system has an edge, and a few failed pin bars in a row eat the whole result.
- The take profit is too close. With a take profit of 2 stops you need to win at least a third of the trades, and the classic on USDJPY won only 24%. A good pin bar with the trend often starts a new move, and a 2-stop take profit cuts it off at the very beginning. The robot holds the trade up to 4 stops.
- Weak selection. A wick that sticks out beyond 3 neighboring candles shows up all the time on any chart. The robot requires it to go beyond 5 candles: price has to test a visible local extreme and be rejected from it.
The same classic rules on USDJPY H4 made +3.5% over 72 months with a profit factor of 1.04 on 134 trades: more signals, but almost no edge. The working robot differs precisely in its strict selection and distant take profit. Also, in the training optimization, entering at market at the open of the next candle turned out better than a stop order beyond the pin bar, and that’s how the robot enters. It is tuned only for USDJPY H4. On GBPUSD, EURUSD and gold H4 this same idea failed the test, so I don’t recommend moving the robot to other markets without your own test.
The risks, honestly
- Many small losses. Winning trades are about 28%, so losing streaks are normal. The longest: 8 losing trades in a row from May to October 2025, about −$1,120. Anyone who isn’t ready for that will switch the robot off right before the winning trade.
- Long pauses. The longest stretch without a new balance high was about 12.5 months (March 2021 to April 2022). 2021 ended at −2.4%, 2025 at +0.3%. The robot makes money in bursts, in years of strong yen trends.
- A 2% risk doubles both the return and the drawdown: +101.2% over 72 months, but with a 17.9% drawdown. Start with 1%.
- One market, shared losses. On USDJPY H4 I already have the “Williams Fractals”, Lambert’s CCI, “Holy Grail” and Supertrend robots. They all follow the trend, and their losing streaks can overlap. If you put several on one account, split the risk between them.
Where to run it
The robot works in MetaTrader 5 with any broker that offers USDJPY. My test was done at FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before putting it on your account, run it in your broker’s tester: it takes an afternoon and shows how it behaves with your quotes, spreads and swaps. The pin bar depends on the shape of the candle, and the closing time of H4 candles can differ between brokers, so this check is especially useful here. Keep the platform on a VPS so it works without pauses: the robot checks for a signal at the close of every H4 candle, and if the platform is off, the signal is missed.
Download the “Trend Pin Bar” robot for free
The robot is free for clients of the brokers in my ranking:
- Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
- Go to the Telegram bot with the button and send your account number.
- After verification, the bot sends you the file: the robot, the USDJPY H4 parameters, the classic parameters for your own experiments and the instructions.
📊 Download the “Trend Pin Bar” robot on Telegram
My conclusion
The pin bar in its classic form (daily chart, a 2-stop take profit and any wick beyond three candles) made nothing over 72 months: six markets of seven negative. But the idea itself is alive. If you take only pin bars that rejected a visible local extreme, trade them with the SMA 200 trend on H4 and don’t take profit too early, you get a robot: +44.9% in six years at 1% risk, a 9.3% drawdown, and a profit factor of 1.37 on two unfamiliar years. It’s a robot for patient people: it is often wrong by a little and occasionally right by a lot. Start with a 1% risk and judge it not by a month, but by a year.
I’ve tested candle ideas before: Heikin-Ashi works on gold H4, and Crabel’s NR7 failed the test. On the same USDJPY, look at Williams Fractals (+203% over 72 months) and the previous day breakout on H1. If you want a robot on another market so you don’t pile up yen risk, look at Chande’s Aroon on gold and “Envelopes” on EURUSD.
Why 72 months?
The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. That’s why I don’t run 10–20 year tests: they blend different markets into a single average figure, and when the market changes, you have to change the strategy anyway. The trend pin bar shows this well: it made money in the years of strong yen moves (2022 and 2024) and stood still when the yen moved without direction. If USDJPY goes into a long range, the robot will start collecting small stops, and then it should be stopped and re-tested.
That’s why I built my app “Take the Strategy”, in the browser or in Telegram. There you can test any idea on real quotes over up to 72 months, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the best ones over the last 36 months. It doesn’t promise profits: it helps you notice in time that the market has changed and find what works now.
Backtest results do not guarantee future results. Everything I write is my personal experience and opinion, not investment advice.
Sources
- Martin J. Pring: “Martin Pring on Price Patterns” (McGraw-Hill, 2005), the “Pinocchio bar”, a long-wicked candle that gives away a false breakout.
- Nial Fuller: materials on trading pin bars in his price action course (learntotradethemarket.com): the wick sticking out beyond neighboring candles and trading with the trend.
- Own tests in MetaTrader 5 on the FxPro demo server, November 2026.
Where to trade
These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country, and start small.
Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.


