The idea builds smoothed candles and buys when a large bullish body follows a bearish one, selling short on the mirror-image flip. Each trade has a 0.0174 percent stop and 0.0348 percent target, and an opposite signal reverses it.
Best run of 4. GBP/USD, Daily, spread 1.5, from run pf:2026-10-12-GBPUSD-D.tsv:1.
| Period | Up to 2026-10-12 |
| Instrument | GBP/USD, Daily |
| Spread | 1.5 points |
| 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-10-13 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GBP/USDBest run | Daily | 1.56 | 3,285 | 43.84 | 2,934 USD | -86.60 |
| USD/JPY | Daily | 1.55 | 3,213 | 43.82 | 236,770 USD | -5,760 |
| EUR/USD | Daily | 1.48 | 3,144 | 42.68 | 17,927 USD | -774 |
| Dow Jones | 4 hours | 1.22 | 2,455 | 38.29 | 2,183 EUR | -207 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Color Code Candle Flip // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE ccopen = 0 ccclose = (open + high + low + close) / 4 IF BarIndex = 0 THEN ccopen = (open + close) / 2 ELSE ccopen = (ccopen[1] + ccclose[1]) / 2 ENDIF cchigh = MAX(high, MAX(ccopen, ccclose)) cclow = MIN(low, MIN(ccopen, ccclose)) thresh = 0.01 * (cchigh - cclow)
18 more lines: the entry and exit rules.
Setup
Questions
Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.
It was tested on 4 market and timeframe combinations. The best run was GBP/USD, Daily, with a profit factor of 1.56 over 3,285 trades.
The best run had a maximum drawdown of 87 USD at the tested position size, against a net result of 2,934 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.