Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
Forecast Baseline Reclaim is a trend-pullback trading strategy built around a least-squares Time Series Forecast (TSF) baseline — a statistical "fair value" line that many discretionary traders never see on a standard chart. Instead of relying on a conventional moving average like the EMA or Hull, the strategy fits an ordinary least-squares regression line to the last several closing prices and uses the end-point of that line as its reference level. Because the regression end-point is projected onto the newest bar rather than trailing behind it, it behaves as a near zero-lag estimate of where price "should" be sitting right now.
The strategy is designed for trending markets that experience healthy pullbacks — the everyday two-steps-forward, one-step-back rhythm you see in liquid instruments. It only looks for entries when the regression slope confirms a genuine trend, and it deliberately stays flat when the slope is too shallow to matter. The core idea is a classic one dressed in more rigorous statistics: buy a temporary dip in an uptrend the moment price reclaims its fair-value line, and mirror that logic for downtrends.
As a learning tool, Forecast Baseline Reclaim is well suited to traders who want to understand how linear regression, slope filtering, and volatility normalization can be combined into a single rules-based system. It is not a shortcut or a promise of any outcome — it is a transparent framework for studying how a zero-lag baseline behaves relative to price. Beginner and intermediate traders can use it to see, step by step, how a mechanical entry filter is constructed and why each condition exists.
How It Works
The strategy recalculates everything once per completed bar. From a single least-squares regression over the last RegPeriod closes, it derives three quantities: the Baseline (the regression end-point), the Slope (price change per bar), and the Forecast Oscillator — the distance from price to the baseline measured in ATR units. Average True Range (ATR) is a volatility measure, and using it to normalize distances lets the same rules behave consistently whether the market is quiet or busy.
Regime filter (are we trending?)
- The strategy expresses the regression slope in ATR-per-bar units (slope ÷ ATR) so the trend test adapts to volatility.
- It signals an uptrend only when that normalized slope rises above
SlopeThreshold. - It signals a downtrend only when the normalized slope falls below the negative of
SlopeThreshold. - When the slope sits between those bounds, the market is treated as flat and no trades are taken — this keeps the system out of chop, where reclaiming a baseline means little.
Long entry conditions (buy the dip in an uptrend)
- The regime filter confirms an uptrend.
- The prior completed bar closed at least
PullbackDepthATRs below the baseline — evidence of a genuine pullback, not noise. - The newest bar reclaims the baseline, meaning the Forecast Oscillator crosses back to zero or above.
Short entry conditions (mirror image)
- The regime filter confirms a downtrend.
- The prior completed bar closed at least
PullbackDepthATRs above the baseline. - The newest bar loses the baseline, with the Forecast Oscillator crossing back to zero or below.
Exit and reversal logic
- The strategy holds one position at a time.
- If an opposite reclaim signal appears while a trade is open, the strategy closes the current position and reverses into the new direction.
- Otherwise, positions are managed entirely by their stop-loss and take-profit levels.
Stop-loss and take-profit logic
- The stop-loss distance is set to
AtrStopMult× ATR, so it widens in volatile conditions and tightens in calm ones. - The take-profit is placed at
RewardRatio× the stop distance, giving a fixed, symmetric reward-to-risk structure on every trade. - Long and short trades use identical, mirror-image risk rules.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| RegPeriod | 20 | 8 | 60 | Number of closing prices in the least-squares regression window — the baseline's "memory." Larger values produce a smoother, slower baseline. |
| SlopeThreshold | 0.05 | 0.00 | 0.30 | Minimum absolute slope (in ATR-per-bar units) required to classify the market as trending. Higher values demand stronger trends before trading. |
| PullbackDepth | 0.50 | 0.10 | 2.00 | How far (in ATRs) the prior bar must sit off the baseline to count as a genuine pullback. Higher values require deeper dips. |
| AtrPeriod | 14 | 5 | 40 | Lookback window for the ATR used in normalization and stop sizing. |
| AtrStopMult | 2.0 | 0.5 | 5.0 | Stop-loss distance as a multiple of ATR. |
| RewardRatio | 1.8 | 0.8 | 4.0 | Take-profit distance as a multiple of the stop distance (reward-to-risk ratio). |
| Lots | 0.10 | 0.01 | 1.0 | Fixed position size in lots. |

Recommended Chart Settings
Forecast Baseline Reclaim was designed with liquid forex pairs and index CFDs in mind, on the M15 to H1 timeframes, where trends develop with regular, tradeable pullbacks. That said, the strategy never hardcodes a timeframe — it runs on whatever chart period you attach it to, so you are free to study its behavior on other markets and intervals.
As a practical starting point for exploration, consider a major pair such as EUR/USD on the M15 or H1 chart. Keep in mind that trend character, spread, and volatility differ enormously across instruments and sessions, so results will vary across different market conditions. Always test any configuration on historical data and a demo account before drawing conclusions.
How to Install on MetaTrader 5
- Download the .ex5 file from the link below.
- Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Every mechanical strategy has strengths and blind spots, and Forecast Baseline Reclaim is no exception.
Strengths of this approach
- The regression end-point baseline is a near zero-lag reference, so reclaim signals can appear earlier than they would with a lagging moving average.
- The ATR-normalized slope filter is genuinely adaptive: it automatically demands larger raw slopes when volatility is high, which helps the trend test travel across different markets.
- The rules are fully symmetric and transparent, making the strategy easy to study, backtest, and reason about.
Known limitations
- Like all trend-pullback systems, it can suffer during sharp reversals, where a "pullback" turns into a full trend change and the reclaim signal buys into weakness.
- In ranging or whipsaw conditions, the slope filter may flicker just above and below its threshold, producing signals that quickly reverse. A higher
SlopeThresholdreduces this but also cuts trade frequency. - The regression baseline reacts quickly to a few outlier closes, so news spikes and gaps can momentarily distort the fair-value line.
- A single fixed reward-to-risk ratio does not adapt to changing market structure, so the same
RewardRatiomay be well-suited to one regime and poorly matched to another.
The strategy is best understood as a structured study of trend-pullback timing, not a finished, hands-off system. Thoughtful parameter testing and ongoing observation are essential.
Risk Management Tips
Sound risk management matters far more than any single entry rule. Consider these general principles as part of your education:
- Risk a small, fixed fraction per trade. Many educational sources suggest never risking more than 1–2% of account equity on any single position. Size your lots so that the ATR-based stop-loss keeps you within that limit.
- Always test on a demo account first. Use MT5's Strategy Tester and a demo account to observe how the strategy behaves across many market conditions before considering any live capital.
- Understand drawdown. Even a well-designed strategy will experience losing streaks. Study the maximum peak-to-trough decline in your testing so you know what to expect emotionally and financially.
- Match position size to volatility. Because stops scale with ATR, a wider stop in volatile conditions implies a smaller lot size to keep monetary risk constant.
- Never trade with money you cannot afford to lose. Leverage magnifies both gains and losses, and no configuration removes the possibility of loss.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: ForecastBaselineReclaim.ex5 (32 downloads)
- Source Code: ForecastBaselineReclaim.mq5 (30 downloads)
- Documentation: ForecastBaselineReclaim.pdf (32 downloads)