After three lower closes in a row, if the day also closes in the bottom 14% of its range, the system buys. It sells at the close of the third bar after entry, win or lose.
Best run of 31. Alphabet, Daily, from run stock2-queue:2026-09-15-Alphabet.tsv:4.
| Period | Up to 2026-09-15 |
| Instrument | Alphabet, Daily |
| Capital per trade | 10,000 |
| Costs | Not recorded for this run. |
| Bars | Daily bars, full available history |
| Last tested | 2026-09-15 |
| capitalPerTrade Money committed to each trade | 10000 |
| ibsThreshold Maximum internal bar strength at entry | 0.14 |
| maxBarsInTrade Sell once more than this many bars have passed since entry | 2 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| AlphabetBest run | Daily | 2.77 | 63 | 61.90 | 8,487 USD | -1,057 |
| Meta | Daily | 2.64 | 77 | 62.34 | 13,259 USD | -2,467 |
| ExxonMobil | Daily | 2.63 | 251 | 62.95 | 26,970 USD | -2,537 |
| Visa | Daily | 2.63 | 103 | 60.19 | 12,279 USD | -1,970 |
| Cisco | Daily | 2.34 | 201 | 61.19 | 29,800 USD | -3,668 |
| Broadcom | Daily | 2.29 | 90 | 62.22 | 14,466 USD | -2,522 |
| Intel | Daily | 2.20 | 277 | 60.65 | 42,409 USD | -3,710 |
| Apple | Daily | 2.05 | 230 | 45.22 | 28,773 USD | -7,155 |
| Berkshire Hathaway | Daily | 1.92 | 199 | 59.30 | 13,456 USD | -2,305 |
| Bank of America | Daily | 1.88 | 215 | 61.40 | 26,749 USD | -4,635 |
| Mastercard | Daily | 1.84 | 121 | 59.50 | 12,342 USD | -2,436 |
| Microsoft | Daily | 1.83 | 240 | 59.58 | 22,153 USD | -3,844 |
| Johnson & Johnson | Daily | 1.78 | 257 | 60.31 | 15,056 USD | -2,885 |
| Oracle | Daily | 1.73 | 246 | 53.25 | 28,680 USD | -3,666 |
| Costco | Daily | 1.73 | 225 | 58.67 | 17,307 USD | -4,651 |
| Walmart | Daily | 1.70 | 241 | 54.77 | 15,188 USD | -2,934 |
| Eli Lilly | Daily | 1.69 | 343 | 55.69 | 25,389 USD | -3,443 |
| Amazon | Daily | 1.68 | 190 | 60.00 | 26,140 USD | -6,161 |
| Lam Research | Daily | 1.58 | 240 | 56.25 | 29,888 USD | -5,942 |
| Palantir | Daily | 1.57 | 44 | 54.55 | 7,064 USD | -4,223 |
| Coca-Cola | Daily | 1.55 | 301 | 49.17 | 13,646 USD | -4,941 |
| JPMorgan | Daily | 1.51 | 326 | 53.68 | 22,593 USD | -5,113 |
| Caterpillar | Daily | 1.49 | 316 | 52.85 | 18,853 USD | -3,154 |
| Applied Materials | Daily | 1.48 | 174 | 52.30 | 14,817 USD | -7,809 |
| S&P 500 | Daily | 1.47 | 319 | 56.11 | 11,181 EUR | -4,532 |
| Nvidia | Daily | 1.37 | 171 | 41.52 | 14,658 USD | -8,077 |
| Chevron | Daily | 1.26 | 196 | 57.65 | 5,938 USD | -4,723 |
| Micron | Daily | 1.25 | 266 | 53.76 | 17,352 USD | -11,551 |
| Tesla | Daily | 1.21 | 90 | 57.78 | 4,831 USD | -4,883 |
| AMD | Daily | 1.20 | 286 | 52.45 | 13,220 USD | -9,780 |
| AbbVie | Daily | 1.03 | 66 | 48.48 | 228 USD | -2,862 |
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.
// ============================================================ // Three Down Days // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- capitalPerTrade = 10000 // money committed to each trade ibsThreshold = 0.14 // buy only when the close is near the day's low maxBarsInTrade = 2 // sell once more than this many bars have passed // --- Indicators --- positionSize = capitalPerTrade / close ibsValue = (close - low) / (high - low)
14 more lines: the entry and exit rules.
Read this first
Questions
Yes, on daily bars with 10000 divided by the close as the position size. The code has not been compile checked since the rewrite.
Every stock run was profitable. Intel made USD 42,408.50 with a profit factor of 2.2, and Cisco made USD 29,800.30.
Each trade puts 10000 USD to work. On Alphabet the maximum drawdown was USD 1,056.50, while Nvidia reached USD 8,077.18.
The pattern is about closing prices over several days. Holding for three bars on a daily chart gives a short swing trade.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.