Strategies

Linear Regression Channel: 72-Month Test and Which MT5 Robot to Use

Anton Rozhnovsky · November 17, 2026 · 11 min read
Linear Regression Channel: 72-Month Test and Which MT5 Robot to Use

The linear regression channel looks like the perfect tool: a “fair” middle line is drawn through the latest candles, two boundaries are placed two standard deviations around it, and anything that leaves a boundary looks overbought or oversold. Sell at the upper boundary, buy at the lower one, and wait for the return. I wrote a robot with these rules and ran it on seven markets over 72 months. Here is what came out, where this idea breaks, and which robot is better to use instead.

📊 Download the “Williams Fractals” robot for free, the one that does work

Linear regression channel: an honest 72-month test of a MetaTrader 5 robot

The strategy rules

The regression channel was brought to trading by Gilbert Raff, which is why this version is called the Raff Regression Channel. A straight line is fitted through the closes of the last N candles with the least squares method: the regression line, the “fair” price for that stretch. Boundaries are built around it. In the popular version, the one I tested, they sit two standard deviations of price away from the line. The rules:

The logic is the same as with Bollinger Bands and envelopes: price has moved far from its average, so it will come back. The difference is that here the average is not flat but sloped: the channel takes the direction of the move into account. The classic timeframe is D1.

What it looks like on the chart

Below are two real trades from the best set the optimizer found on USDJPY H4. Both come from the forward period, which the optimizer never saw. In this set the channel is built on 200 candles, the boundaries are the same ±2σ, the exit is at the opposite boundary or after 20 candles, and the stop is 1.5 ATR. The yellow line is the regression line, the blue ones are the channel boundaries, and the yellow circle marks the signal candle.

Example of a winning regression channel trade on USDJPY H4: sell from the upper boundary, time exit

The trade that makes people love the channel. On June 23, 2025, the dollar/yen jumped and an H4 candle closed above the upper boundary. The robot sold at 147.610 with the stop at 148.285. The jump turned out to be an overshoot: price came back to the regression line, and after 20 candles the robot closed the trade on time: +$536. That is exactly how the system is meant to work: catch the overshoot and collect the return.

Example of a losing regression channel trade on USDJPY H4: sell from the upper boundary, stop exit

The trade that shows the weakness. On February 25, 2026, a candle again closed above the upper boundary: a sell signal. The robot sold at 156.694 with the stop at 157.573. But this was not an overshoot, it was the start of a rally: price moved along the upper boundary, the channel began to bend upward after it, and on March 2 the stop was hit: −$112. The chart shows the main point: in a trend, the boundary doesn’t stop price, it follows it.

Manually it looks like this: MetaTrader 5 has a “Standard Deviation Channel” object. Stretch it over the last 100 D1 candles (in the best set, 200 H4 candles) with a deviation of 2. A candle closes above the upper boundary: sell; below the lower one: buy; exit at the middle line. The channel has to be redrawn on every new candle; the robot does it on its own.

How I ran the test

MetaTrader 5 Strategy Tester, a demo account from FxPro with its quotes, spreads, commissions and swaps, $10,000 deposit, 1:500 leverage, “1 minute OHLC” mode, 72 months (10/2020–09/2026). Risk: 1% of the balance per trade.

Linear regression channel in its classic form: D1, 7 instruments, 72 months
Instrument (D1) Result Profit factor Max drawdown Trades
EURUSD +4.8% 1.20 8.5% 50
GBPUSD +3.2% 1.14 5.7% 52
GOLD −1.6% 0.95 11.4% 43
WTI (oil) −3.7% 0.77 8.6% 34
USDCHF −18.4% 0.41 22.1% 52
USDJPY −19.2% 0.42 22.2% 51
BITCOIN −19.9% 0.53 21.9% 86

The two “positives” on the euro and the pound are +4.8% and +3.2% in six years, less than 1% a year. On the markets with strong trends (dollar/yen, dollar/franc, bitcoin), about −20%. The reasons:

What if optimization saves it?

I gave the optimizer everything that could help: channel length from 40 to 200 candles, boundary width from 1.5 to 3σ, a slope filter (trade only with the channel slope or only in a range), three exit variants, stop, take profit and time exit. Parameters were chosen only on 10/2020–09/2024 and then checked on 10/2024–09/2026, data the optimizer never saw. I tested H4 on four markets: EURUSD, GBPUSD, USDJPY and GOLD.

On EURUSD, of 72 profitable sets in training, only 10 stayed positive in the forward test. On GBPUSD, 27 of 92, and on gold only 9 sets were profitable in training at all. The best result came on USDJPY H4: there 18 sets of 30 made money in the forward test. Here is the best of them:

Regression channel on USDJPY H4: training 10/2020–09/2024 and forward 10/2024–09/2026
Best set (USDJPY H4) Return Profit factor Max drawdown Trades
Training, 10/2020–09/2024 +14.0% 1.09 25.5% 205
Forward, 10/2024–09/2026 +23.3% 1.55 12.2% 76
All 72 months, 1% risk +38.3% 1.19 28.9% 281
Longest stretch without a new high almost 3 years (11/2023 to the end of the test)

The forward test is positive, and on its own that doesn’t look bad. But look at the curve. By year: 2021, +15.8%; 2022, −8.0%; 2023, +24.3%; 2024, −19.8%; 2025, +5.0%; 2026 through September, +18.2%. A year of profit, a year of loss: that’s not an edge, it’s a seesaw. In March 2022, when the yen began its big fall, the robot took 14 losing trades in a row, about −$1,683. A 28.9% drawdown for +38% in six years: for every dollar earned, the account lost almost another dollar along the way. And one more detail: over 72 months swaps took $1,522 and commissions $484. That’s a third of all profit before costs.

MetaTrader 5 tester report: regression channel on USDJPY H4, best set

The honest conclusion: even the best set gives about 6% a year with a drawdown of almost 30% and a three-year wait for a new high. There is no point keeping a robot like that on your account when the same USDJPY H4 has robots that passed the test far more convincingly.

What to use instead of the regression channel: robots that passed the test

The first two robots trade the same USDJPY H4, but not against the move, with it: they enter once the trend is already confirmed. The third is for those who like the mean-reversion idea itself: on EURUSD H4 it works if you trade only pullbacks in the direction of the trend.

Robot Market 72 months, 1% risk Max drawdown Forward 10/2024–09/2026
“Williams Fractals” USDJPY H4 +203% 7.3% +47.3%
Lambert’s CCI USDJPY H4 +111% 10.7% +22%
“Envelopes” EURUSD H4 +30% 6.0% +9.9%

“Fractals” and CCI trade the same USDJPY H4, and their losing streaks can overlap. If you put both on one account, split the risk between them.

📊 Download the “Williams Fractals” robot for USDJPY H4

📊 Download the Lambert CCI robot for USDJPY H4

📊 Download the “Envelopes” robot for EURUSD H4

Where to run them and how to download them

The robots work in MetaTrader 5 with any broker that offers USDJPY and EURUSD. My test was done at FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before putting a robot on your account, run it in your broker’s tester, and keep the platform on a VPS so it works without pauses.

The robots are free for clients of the brokers in my ranking:

  1. Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
  2. Go to the Telegram bot with the button of the robot you need and send your account number.
  3. After verification, the bot sends you the file: the robot, the parameters and the instructions.

The regression channel robot is also in the bot, for your own experiments in the tester (regression channel robot), but I don’t recommend putting it on a real account.

My conclusion

The linear regression channel describes the past well and predicts the future poorly. For it, price leaving the boundary means “too far”, but in the live market that is just as often the start of a new move. In its classic form on D1, over 72 months the channel lost about 20% on three trending markets and made almost nothing on the rest. Optimization found a set on USDJPY H4 with a positive forward test, but with a drawdown of almost 30% and three years without a new high. That’s not a robot, it’s a seesaw. Protect your deposit: on the same USDJPY H4, “Williams Fractals” made +203% over the same six years with a 7.3% drawdown. They wait for the trend to be confirmed and go with it, not against it.

I tested mean reversion before as well, with Connors’ RSI-2, Bollinger Bands and envelopes. The conclusion is the same every time: trading the return against the trend is expensive, while pullbacks with the trend do work.

Why 72 months?

The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. That’s why I don’t run 10–20 year tests: they blend different markets into a single average figure, and when the market changes, you have to change the strategy anyway. The regression channel shows this especially clearly: in a range it makes money, in a trend it gives it all back, and over six years of USDJPY these regimes switched several times. A robot that doesn’t notice the market changing is doomed to the seesaw.

That’s why I built my app “Take the Strategy”, in the browser or in Telegram. There you can test any idea on a history of up to 72 months, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12 and 36 months. It doesn’t promise profits: it helps you notice in time that the market has changed.

Backtest results do not guarantee future results. Everything I write is my personal experience and opinion, not investment advice.

Sources

Where to trade

These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country, and start small.

Where I trade and what I recommend
Forex & CFD brokers
1
FxPro
A broker with a history going back to 2006 and one of the best-known names in the market. Fast execution and many platforms.
MT4MT5cTraderFxPro App
Open account
2
RoboForex
Low minimum deposit and many account types. A good option to start with little capital.
MT4MT5R StocksTraderCopyFX
Open account
3
Tickmill
Low spreads and competitive commissions. Built for people who trade often and count every pip.
MT4MT5Low spreads
Open account
Crypto exchanges
1
Bybit
One of the largest crypto derivatives exchanges. Futures, spot and copy trading in one account.
FuturesSpotCopy trading
Sign up
2
BingX
A very strong exchange for copy trading: you can follow traders and see their results.
Copy tradingFuturesSpot
Sign up
3
KuCoin
Hundreds of cryptocurrencies and plenty of altcoins. Spot, futures and trading bots in one account.
SpotFuturesTrading bots
Sign up
These are affiliate links: if you open an account, I may receive a commission at no cost to you. Trading CFDs, Forex and leveraged crypto carries a high risk of losing money. Check that the service is available in your country and only trade with money you can afford to lose.
Want my 4 indicators for MT5 free for 30 days? Open an account with a trusted broker, send the number to the Telegram bot and get them. No deposit.

Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.

Anton Rozhnovsky
Anton Rozhnovsky

Trader for 14 years. He has automated and tested more than 2,000 strategies in trading robots and develops his own indicators for MetaTrader 5.

← PreviousMT5 Envelopes Robot: +30% on EURUSD in 72 Months, 6% Drawdown

Keep reading

Pivot Point Trading: A 72-Month Test and Which MT5 Robot to Use Instead
Strategies

Pivot Point Trading: A 72-Month Test and Which MT5 Robot to Use Instead

I tested the bounce off the P pivot over 72 months in MT5: it lost in all 7 markets. Here's why, and which robot to use instead on USDJPY.

TTM Squeeze Robot for MT5: +55% on Gold in 72 Months with a 4.7% Drawdown
Strategies

TTM Squeeze Robot for MT5: +55% on Gold in 72 Months with a 4.7% Drawdown

I tested TTM Squeeze over 72 months on MT5: the classic version loses in 5 of 7 markets; buy-only on GOLD H4 gave +55% and +36% in the forward test. Free robot.

Ichimoku Strategy: 72-Month Test and Free MT5 Robot
Strategies

Ichimoku Strategy: 72-Month Test and Free MT5 Robot

I tested Ichimoku over 72 months on MT5: half the markets ended at a loss; the version with a Kijun exit passed the forward test on bitcoin D1. Free robot.