Join today
Strategies / Mean reversion / Three Lower Highs and Lows

Three Lower Highs and Lows Strategy

Three bars in a row that each make a lower high and a lower low signal a buy, provided close is above the 200 period SMA and below the 5 period SMA. The trade is sold on a close back above the 5 SMA with a partial range break, or on an inside day. A 1.4% stop protects each trade.

Mean reversionLong onlySwingNikkei 225Daily
2.36Profit factor
29,690Net profit USD
49.20%Win rate
187Trades
-3,718Max drawdown
159Avg trade

Best run of 11. Nikkei 225, Daily, spread 10, from run pf:2026-09-24-NIKKEI-D.tsv:1.

Entry rules, long

  1. Close above the 200-period SMA
  2. Close below the 5-period SMA
  3. Members only

Exit rules

  1. Stop loss at 1.4% from entry
  2. Members only
  3. Sell on an inside day (daily low above and daily high below yesterday's)

Test conditions

PeriodUp to 2026-09-24
InstrumentNikkei 225, Daily
Spread10 points
Contracts1
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-09-24

Parameters

positionSize
Contracts per trade
1
trendPeriod
SMA trend filter length
200
fastPeriod
Short SMA for the pullback test and the exit
5
stopLossPct
Protective stop, percent of entry price
1.4

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best runDaily2.36 18749.2029,690 USD-3,718
USD/JPYDailyn/a 17054.12437,500 JPY-122,600
USD/JPY30 minn/a 2,48852.97234,620 JPY-102,420
USD/JPY4 hoursn/a 45758.4275,230 JPY-67,850
EUR/USD4 hoursn/a 53652.2410,596 USD-8,618
Dow JonesDailyn/a 40445.054,249 EUR-3,714
DAX 40Dailyn/a 18848.404,232 EUR-1,114
Nasdaq 100Dailyn/a 26129.501,913 EUR-1,613
Brent Crude4 hoursn/a 22952.841,681 EUR-1,587
Gold3 minn/a 1,75941.901,577 EUR-519
Gold5 minn/a 1,99139.281,135 EUR-568

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-200K-100K250K500KUSD/JPY · DailyUSD/JPY · 30 minUSD/JPY · 4 hoursNikkei 225 · DailyEUR/USD · 4 hoursDow Jones · DailyDAX 40 · DailyNasdaq 100 · DailyBrent Crude · 4 hoursGold · 3 minGold · 5 min

The code

ProBuilder, rewritten to house standard

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 Lower Highs and Lows
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: Daily
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
trendPeriod = 200         // SMA trend filter length
fastPeriod = 5            // short SMA for the pullback test and the exit
stopLossPct = 1.4         // protective stop, percent of entry price

// --- Indicators ---
trendMA = Average[trendPeriod](close)
fastMA = Average[fastPeriod](close)

// Three bars in a row, each with a lower high and a lower low.
lowerBars = high[2] < high[3] AND low[2] < low[3] AND high[1] < high[2] AND low[1] < low[2] AND high < high[1] AND low < low[1]

22 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • The stop is only set on the entry bar, as in the tested code. Check how it behaves in your platform before relying on it.
  • Long only, and the 200 SMA filter keeps it out of downtrends, so it can sit idle for long periods.
  • Several tests won fewer than half their trades. Nasdaq 100 Daily won only 29.5% of trades, and Nikkei 225 Daily 49.2%.
  • Most market rows have no recorded profit factor, since they come from sweeps.

Indicators used

SMA

How to load it

  1. Copy the code with the copy button above the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Questions

About this strategy

Does it run in ProOrder?

Yes, it is an automated long only system with a stop and two exit rules.

How did it do across markets?

Every tested row was positive. USD/JPY did well on daily, 4 hour and 30 minute charts, and DAX 40 Daily made 4,232.4 EUR with a 1,113.7 EUR drawdown.

What drawdown should I expect at 1 contract?

On Nikkei 225 Daily the worst drawdown was 3,718 USD at 1 contract, against 29,690.3 USD of net profit.

Why daily bars?

The exits use the daily high and low, so the rules are built around daily candles.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Monday Dip Buy

Best run on the same market, Nikkei 225.

n/a PF · 146 trades

One Notch Long

A similar profit factor.

2.38 PF · 161 trades

Join the ProRealAlgos waitlist to see pullback systems like this running live.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs