The system buys when the bar's true range is above 25 points and TEMA(4) sits above EMA(4), but only in half months the seasonal table allows. It exits when Repulse(3) drops below -0.3 or a 5% stop is hit. Weekends are skipped and it never goes short.
Best run of 20. Gold, 10 min, spread 0.6, from run pf:2026-09-24-GOLD-10m.tsv:1.
| Period | Up to 2026-09-24 |
| Instrument | Gold, 10 minutes |
| 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-24 |
| positionSize Contracts per trade | 1 |
| halfMonthDay Last day counted as the first half of the month | 15 |
| minTrueRange Minimum bar true range in price points | 25 |
| temaPeriod TEMA length | 4 |
| emaPeriod EMA length compared with the TEMA | 4 |
| repulsePeriod Repulse length for the exit | 3 |
| repulseExitLevel Exit when Repulse falls below this | -0.3 |
| stopLossPct Protective stop as percent of entry price | 5 |
| janFirstHalf Seasonal weight, January days 1 to 15 (0 blocks entries) | 3 |
| janSecondHalf Seasonal weight, January day 16 onward (0 blocks entries) | 0 |
| febFirstHalf Seasonal weight, February days 1 to 15 (0 blocks entries) | 3 |
| febSecondHalf Seasonal weight, February day 16 onward (0 blocks entries) | 3 |
| marFirstHalf Seasonal weight, March days 1 to 15 (0 blocks entries) | 3 |
| marSecondHalf Seasonal weight, March day 16 onward (0 blocks entries) | 2 |
| aprFirstHalf Seasonal weight, April days 1 to 15 (0 blocks entries) | 3 |
| aprSecondHalf Seasonal weight, April day 16 onward (0 blocks entries) | 3 |
| mayFirstHalf Seasonal weight, May days 1 to 15 (0 blocks entries) | 1 |
| maySecondHalf Seasonal weight, May day 16 onward (0 blocks entries) | 1 |
| junFirstHalf Seasonal weight, June days 1 to 15 (0 blocks entries) | 1 |
| junSecondHalf Seasonal weight, June day 16 onward (0 blocks entries) | 2 |
| julFirstHalf Seasonal weight, July days 1 to 15 (0 blocks entries) | 3 |
| julSecondHalf Seasonal weight, July day 16 onward (0 blocks entries) | 2 |
| augFirstHalf Seasonal weight, August days 1 to 15 (0 blocks entries) | 2 |
| augSecondHalf Seasonal weight, August day 16 onward (0 blocks entries) | 3 |
| sepFirstHalf Seasonal weight, September days 1 to 15 (0 blocks entries) | 3 |
| sepSecondHalf Seasonal weight, September day 16 onward (0 blocks entries) | 0 |
| octFirstHalf Seasonal weight, October days 1 to 15 (0 blocks entries) | 3 |
| octSecondHalf Seasonal weight, October day 16 onward (0 blocks entries) | 2 |
| novFirstHalf Seasonal weight, November days 1 to 15 (0 blocks entries) | 1 |
| novSecondHalf Seasonal weight, November day 16 onward (0 blocks entries) | 3 |
| decFirstHalf Seasonal weight, December days 1 to 15 (0 blocks entries) | 3 |
| decSecondHalf Seasonal weight, December day 16 onward (0 blocks entries) | 2 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 10 min | 1.57 | 195 | 48.72 | 905 EUR | -177 |
| DAX 40 | 4 hours | 1.18 | 2,445 | 38.73 | 17,921 EUR | -3,328 |
| DAX 40 | Daily | 1.18 | 1,043 | 39.02 | 11,563 EUR | -2,819 |
| Silver | Daily | n/a | 752 | 36.84 | 26,593 USD | -9,081 |
| Dow Jones | Daily | n/a | 1,194 | 38.11 | 16,900 EUR | -8,908 |
| Dow Jones | 15 min | n/a | 3,884 | 37.33 | 13,052 EUR | -9,190 |
| Dow Jones | 4 hours | n/a | 810 | 40.49 | 10,700 EUR | -7,832 |
| Dow Jones | 30 min | n/a | 2,920 | 36.95 | 10,020 EUR | -8,556 |
| Dow Jones | 10 min | n/a | 3,031 | 37.55 | 9,588 EUR | -7,551 |
| Nasdaq 100 | 4 hours | n/a | 1,818 | 38.17 | 9,565 EUR | -3,611 |
| Dow Jones | 1 hour | n/a | 2,039 | 36.64 | 9,229 EUR | -8,470 |
| Nasdaq 100 | Daily | n/a | 824 | 40.29 | 7,322 EUR | -5,082 |
| Brent Crude | Daily | n/a | 595 | 40.34 | 6,984 EUR | -4,208 |
| US Crude Oil | 4 hours | n/a | 2,297 | 37.44 | 6,353 EUR | -5,078 |
| S&P 500 | Daily | n/a | 467 | 41.33 | 1,648 EUR | -966 |
| Gold | 30 min | n/a | 322 | 43.17 | 765 EUR | -441 |
| Gold | 5 min | n/a | 141 | 45.39 | 683 EUR | -245 |
| FTSE 100 | 3 min | n/a | 186 | 41.94 | 600 EUR | -551 |
| Gold | 15 min | n/a | 229 | 43.67 | 582 EUR | -297 |
| Gold | 1 min | n/a | 18 | 50.00 | 140 EUR | -119 |
Charts
Above 1.0 made money, below 1.0 lost money.
Longer history
With 734,000 bars available on Gold 10 minutes, net profit rose to EUR 1,495.5 from EUR 904.9 in the standard run, and the older data alone added EUR 590.6.
| Bars available | 734,000 |
| Net, standard 200,000-bar run | 904.90 EUR |
| Net, long run | 1,495.50 EUR |
| Net on the older data alone | 590.60 EUR |
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.
// ============================================================ // Seasonal Momentum Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 10 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade halfMonthDay = 15 // last day of the first half of the month minTrueRange = 25 // bar true range must exceed this, in price points temaPeriod = 4 // TEMA length emaPeriod = 4 // EMA length compared with the TEMA repulsePeriod = 3 // Repulse length for the exit repulseExitLevel = -0.3 // exit when Repulse falls below this stopLossPct = 5 // protective stop, percent of entry price // Seasonal weight per half month. Zero blocks new entries in that half. janFirstHalf = 3 janSecondHalf = 0 febFirstHalf = 3 febSecondHalf = 3 marFirstHalf = 3 marSecondHalf = 2 aprFirstHalf = 3 aprSecondHalf = 3 mayFirstHalf = 1 maySecondHalf = 1 junFirstHalf = 1 junSecondHalf = 2 julFirstHalf = 3 julSecondHalf = 2 augFirstHalf = 2 augSecondHalf = 3 sepFirstHalf = 3 sepSecondHalf = 0 octFirstHalf = 3 octSecondHalf = 2 novFirstHalf = 1 novSecondHalf = 3 decFirstHalf = 3 decSecondHalf = 2 ONCE seasonWeight = 0 // --- Indicators --- // CurrentMonth is the calendar month the system runs in, Day is the bar's day. IF CurrentMonth = 1 THEN IF Day <= halfMonthDay THEN seasonWeight = janFirstHalf ELSE seasonWeight = janSecondHalf ENDIF ELSIF CurrentMonth = 2 THEN IF Day <= halfMonthDay THEN seasonWeight = febFirstHalf ELSE seasonWeight = febSecondHalf ENDIF ELSIF CurrentMonth = 3 THEN IF Day <= halfMonthDay THEN seasonWeight = marFirstHalf ELSE seasonWeight = marSecondHalf ENDIF ELSIF CurrentMonth = 4 THEN IF Day <= halfMonthDay THEN seasonWeight = aprFirstHalf ELSE seasonWeight = aprSecondHalf ENDIF ELSIF CurrentMonth = 5 THEN IF Day <= halfMonthDay THEN seasonWeight = mayFirstHalf ELSE seasonWeight = maySecondHalf ENDIF ELSIF CurrentMonth = 6 THEN IF Day <= halfMonthDay THEN seasonWeight = junFirstHalf ELSE seasonWeight = junSecondHalf ENDIF ELSIF CurrentMonth = 7 THEN IF Day <= halfMonthDay THEN seasonWeight = julFirstHalf ELSE seasonWeight = julSecondHalf ENDIF ELSIF CurrentMonth = 8 THEN IF Day <= halfMonthDay THEN seasonWeight = augFirstHalf ELSE seasonWeight = augSecondHalf ENDIF ELSIF CurrentMonth = 9 THEN IF Day <= halfMonthDay THEN seasonWeight = sepFirstHalf ELSE seasonWeight = sepSecondHalf ENDIF ELSIF CurrentMonth = 10 THEN IF Day <= halfMonthDay THEN seasonWeight = octFirstHalf ELSE seasonWeight = octSecondHalf ENDIF ELSIF CurrentMonth = 11 THEN IF Day <= halfMonthDay THEN seasonWeight = novFirstHalf ELSE seasonWeight = novSecondHalf ENDIF ELSIF CurrentMonth = 12 THEN IF Day <= halfMonthDay THEN seasonWeight = decFirstHalf ELSE seasonWeight = decSecondHalf ENDIF ENDIF weekday = DayOfWeek = 1 OR DayOfWeek = 2 OR DayOfWeek = 3 OR DayOfWeek = 4 OR DayOfWeek = 5 wideBar = TR(close) > minTrueRange temaAboveEma = TEMA[temaPeriod](close) > ExponentialAverage[emaPeriod](close) repulseValue = Repulse[repulsePeriod](close)
18 more lines: the entry and exit rules.
Read this first
Questions
Yes, it is a long-only ProOrder system with a percent stop. The code has been rewritten but not compile-checked, and the stats are from the previous version.
Nine instruments from 1 minute to Daily. Gold 10 minutes had the best profit factor (1.57), and DAX 40 on 4 hours made the most in euro terms, EUR 17,920.50 over 2,445 trades with a profit factor of 1.18.
At 1 contract, Gold 10 minutes had a max drawdown of EUR 176.50. DAX 40 4 hours reached EUR 3,327.60, so size depends heavily on which market you pick.
Some half months, like the second half of January and September, have weight zero and block new longs. The idea is to avoid parts of the year that historically did worse for long entries.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.