Three Candles looks at the last three bars. It buys after two falling closes that end more than 10 pips below the open two bars ago, and sells after two rising closes that end more than 25 pips above it. Trades have a 75 point target, a 70 point stop and a profit lock once 30 pips ahead.
Best run of 10. EUR/USD, Daily, spread 1, from run sweeps:2026-09-17-EURUSD-D-opt.tsv:3.
| Period | Up to 2026-09-17 |
| Instrument | EUR/USD, Daily |
| Spread | 1 points |
| Contracts | 1 |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-09-17 |
| positionSize Contracts per trade | 1 |
| longMinMovePips Minimum three-bar drop for a long, pips | 10 |
| shortMinMovePips Minimum three-bar rise for a short, pips | 25 |
| takeProfitPoints Profit target in points | 75 |
| stopLossPoints Protective stop in points | 70 |
| profitLockTriggerPips Open profit that arms the lock stop | 30 |
| profitLockPips Lock stop distance from entry | 30 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | Daily | n/a | 4,565 | 53.06 | 101,901 USD | -25,135 |
| USD/JPY | 2 min | n/a | 602 | 68.27 | 100,860 JPY | -74,490 |
| EUR/USD | 3 min | n/a | 560 | 66.25 | 18,424 USD | -7,574 |
| EUR/USD | 2 min | n/a | 317 | 61.51 | 7,684 USD | -6,400 |
| EUR/USD | 1 min | n/a | 63 | 73.02 | 4,582 USD | -2,067 |
| S&P 500 | Daily | n/a | 1,266 | 62.24 | 4,035 EUR | -1,501 |
| GBP/USD | 3 min | n/a | 574 | 67.25 | 1,330 USD | -852 |
| S&P 500 | 5 min | n/a | 1,143 | 64.83 | 1,206 EUR | -1,206 |
| GBP/USD | 5 min | n/a | 1,043 | 66.63 | 1,050 USD | -883 |
| GBP/USD | 1 min | n/a | 147 | 68.71 | 465 USD | -339 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Three Candles // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade longMinMovePips = 10 // minimum three-bar drop for a long shortMinMovePips = 25 // minimum three-bar rise for a short takeProfitPoints = 75 // profit target stopLossPoints = 70 // protective stop profitLockTriggerPips = 30 // open profit that arms the lock stop profitLockPips = 30 // lock stop distance from entry // --- Indicators --- bigDrop = (open[2] - close) > longMinMovePips * PipSize bigRise = (close - open[2]) > shortMinMovePips * PipSize
29 more lines: the entry and exit rules.
Read this first
Questions
Yes, entries, stop, target and the profit lock are coded. Review the short lock stop before going live, since it sits on the wrong side of entry.
EUR/USD Daily made 101,901 USD over 4565 trades. Other positive runs include EUR/USD 3 minutes at 18,424 USD, S&P 500 Daily at 4,035.18 EUR and GBP/USD 3 minutes at 1,330.20 USD.
With 1 contract and a 1 point spread, the EUR/USD Daily run had a max drawdown of 25,135 USD. Each single loss is capped by the 70 point stop.
The pattern is just three bars, so it can appear on any chart. It was run on 1, 2, 3 and 5 minutes and Daily to see where the pip thresholds fit.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.