A long signal needs a bullish candle that closes above the highest high of the previous 8 bars with a body larger than ATR(24). Shorts mirror that on the downside. Every trade has a stop 20 price units away and a target at twice that distance, and an opposite signal reverses the position.
Best run of 6. USD/JPY, 30 min, spread 1, from run sweeps:2026-09-24-USDJPY-30m-opt.tsv:4.
| Period | Up to 2026-09-24 |
| Instrument | USD/JPY, 30 minutes |
| 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-24 |
| positionSize Contracts per trade | 1 |
| lookbackPeriod Prior bars whose high / low must be broken | 8 |
| atrPeriod ATR length the candle body is compared with | 24 |
| stopLossDistance Protective stop (price units) | 20 |
| rewardRatio Target as a multiple of the stop | 2 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 30 min | n/a | 4,636 | 37.81 | 376,390 JPY | -295,530 |
| USD/JPY | Daily | n/a | 373 | 45.31 | 2,955,660 JPY | -940,800 |
| USD/JPY | 1 hour | n/a | 3,337 | 39.59 | 780,930 JPY | -317,430 |
| EUR/USD | Daily | n/a | 329 | 44.07 | 174,355 USD | -49,166 |
| Gold | 4 hours | n/a | 1,298 | 37.06 | 1,523 EUR | -388 |
| Brent Crude | Daily | n/a | 364 | 39.84 | 1,148 EUR | -600 |
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.
// ============================================================ // Big Candle Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade lookbackPeriod = 8 // prior bars whose high / low must be broken atrPeriod = 24 // ATR length the candle body is compared with stopLossDistance = 20 // protective stop (price units) rewardRatio = 2 // target as a multiple of the stop // --- Indicators --- channelHigh = Highest[lookbackPeriod](high[1]) channelLow = Lowest[lookbackPeriod](low[1]) bodySize = ABS(close - open) atrValue = AverageTrueRange[atrPeriod](close)
16 more lines: the entry and exit rules.
Read this first
Questions
It is written for ProOrder and can run automatically. The code is a rewrite that has not been compile-checked yet, and the tested stats come from the earlier version, so check it on a demo account first.
USD/JPY on 30 minutes, 1 hour and Daily, EUR/USD Daily, Gold 4 hours and Brent Crude Daily. All five rows were profitable, with USD/JPY Daily the largest at JPY 2,955,660 over 373 trades.
The best run, USD/JPY 30 minutes at 1 contract, had a max drawdown of JPY 295,530. EUR/USD Daily was far smaller at USD 49,166. Check your own contract size and margin with your broker.
Measuring the body against ATR(24) keeps only candles that are large compared with recent volatility. Ordinary breakouts of the 8-bar range with small bodies are ignored.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.