A close above the highest high of the last 55 bars opens a long, and a close below the 55-bar low opens a short. Positions exit on a close through the opposite 20-bar channel or at a 1% stop. Only one position is held at a time.
Best run of 16. Gold, 1 hour, spread 0.6, from run pf:2026-09-15-GOLD-1h.tsv:2.
| Period | Up to 2026-09-15 |
| Instrument | Gold, 1 hour |
| Spread | 0.6 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-15 |
| positionSize Contracts per trade | 1 |
| channelPeriod Entry channel length | 55 |
| exitChannelPeriod Exit channel length | 20 |
| stopLossPct Protective stop, percent | 1 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 1 hour | 1.13 | 1,639 | 37.03 | 1,598 EUR | -1,051 |
| Gold | 30 min | 1.10 | 2,652 | 37.29 | 1,641 EUR | -1,095 |
| DAX 40 | 30 min | n/a | 2,902 | 35.25 | 1,642 EUR | -5,496 |
| Gold | 15 min | n/a | 2,718 | 34.18 | 361 EUR | -1,579 |
| Gold | 5 min | n/a | 2,664 | 36.19 | 311 EUR | -1,163 |
| DAX 40 | 15 min | n/a | 2,846 | 37.28 | -351 EUR | -6,964 |
| DAX 40 | 1 hour | n/a | 1,713 | 33.39 | -1,560 EUR | -7,384 |
| S&P 500 | 5 min | n/a | 2,820 | 33.16 | -2,674 EUR | -2,868 |
| Nasdaq 100 | 5 min | n/a | 2,805 | 36.08 | -3,694 EUR | -6,256 |
| S&P 500 | 15 min | n/a | 3,010 | 35.38 | -4,044 EUR | -4,363 |
| S&P 500 | 1 hour | n/a | 1,870 | 33.64 | -4,087 EUR | -4,349 |
| S&P 500 | 30 min | n/a | 2,941 | 35.63 | -4,158 EUR | -5,239 |
| DAX 40 | 5 min | n/a | 2,807 | 32.31 | -4,660 EUR | -4,814 |
| Nasdaq 100 | 15 min | n/a | 3,087 | 34.56 | -10,623 EUR | -11,286 |
| Nasdaq 100 | 30 min | n/a | 3,050 | 36.03 | -10,667 EUR | -13,326 |
| Nasdaq 100 | 1 hour | n/a | 1,931 | 30.45 | -12,450 EUR | -14,962 |
Charts
Above 1.0 made money, below 1.0 lost money.
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.
// ============================================================ // Donchian 55 Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 1 hour // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade channelPeriod = 55 // entry channel length exitChannelPeriod = 20 // shorter exit channel length stopLossPct = 1 // protective stop, percent of entry price // --- Indicators --- // Channels end on the previous bar so the breakout bar is not part of its own level. channelHigh = Highest[channelPeriod](high)[1] channelLow = Lowest[channelPeriod](low)[1] exitHigh = Highest[exitChannelPeriod](high)[1] exitLow = Lowest[exitChannelPeriod](low)[1]
25 more lines: the entry and exit rules.
Read this first
Questions
Yes, it is a simple ProOrder system. The code was rewritten and has not been compile-checked, and the stats are from the version before that.
Mainly on Gold. Gold 1 hour made EUR 1,597.70 and Gold 30 minutes EUR 1,641.40. Index markets were mostly losing.
At 1 contract, Gold 1 hour had a max drawdown of EUR 1,050.90. On Nasdaq 100 1 hour it reached EUR 14,961.70 while losing money.
The long entry channel waits for a clear break of recent range, while the shorter exit channel gets out faster when the move fades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.