Blog / Strategy
Strategy

Quadratic Trend Acceleration

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?

Quadratic Trend Acceleration is a trend-ignition strategy for MetaTrader 5 that fits a second-order (quadratic) least-squares regression — a parabola — to recent price and reads its acceleration, the rate at which a trend is strengthening or fading. Most trend tools rely on a straight-line (linear) regression or a moving average, which can only tell you which way price is leaning. Quadratic Trend Acceleration goes one step further by measuring the curvature of price, so it aims to detect the precise moment a quiet, drifting market begins to bend into an accelerating move.

The core idea comes from calculus. A linear fit gives you velocity — the slope, or how fast price is moving. A quadratic fit adds the second derivative: the curvature, which behaves like acceleration. By fitting the equation y = a·x² + b·x + c to the last several closing prices, the strategy extracts two readings: the curvature (from the a coefficient) and the endpoint slope (velocity at the newest bar). Both are then divided by the Average True Range (ATR) — a common volatility measure — so the same thresholds behave consistently across different symbols and timeframes.

This is best understood as a learning tool for traders who want to study momentum and trend dynamics rather than a shortcut to results. It is designed for markets that transition from range-bound drift into directional acceleration, and it deliberately tries to avoid both flat chop and tired, decelerating late-trend moves. If you are interested in how regression math, volatility normalization, and signal timing fit together in an automated system, this strategy offers a clear, self-contained example to examine.

How It Works

The strategy processes one signal per newly closed bar on the chart's primary timeframe. On each closed bar it rebuilds the quadratic fit and evaluates whether a fresh acceleration "ignition" has occurred.

quadratic trend acceleration MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
RegPeriod 20 8 60 Number of closing prices fitted by the quadratic regression window. Larger values smooth the curve and react more slowly.
MinAccel 0.30 0.05 2.0 Curvature ignition threshold, measured in "ATRs of bend." Higher values demand a sharper acceleration before signalling.
SlopeFloor 0.02 0.0 0.30 Minimum endpoint velocity (ATR per bar) that must agree with the curvature direction for a signal to fire.
AtrPeriod 14 7 30 Lookback period for the ATR used to volatility-normalize the acceleration, slope, stop, and target.
SlAtrMult 2.0 1.0 4.0 Stop-loss distance as a multiple of ATR.
TpAtrMult 3.0 1.0 6.0 Take-profit distance as a multiple of ATR.
MaxSpreadPoints 30 0 200 Maximum allowed spread (in points) to accept a trade; 0 disables the filter.
Lots 0.10 0.01 1.0 Trade volume in lots.
quadratic trend acceleration MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy was designed to run on a single symbol and timeframe using the chart's primary timeframe. A common starting point for studying acceleration-based systems is a liquid major forex pair such as EUR/USD on an intraday timeframe like the H1 (1-hour) chart, where trends and ranges alternate frequently enough to exercise the ignition logic. The ATR normalization is designed to make the thresholds portable, so you can also study its behavior on other majors or higher timeframes. Keep in mind that results will vary considerably across different symbols, timeframes, and market conditions, and no single configuration is optimal everywhere. Treat any setting as a starting point for your own testing rather than a fixed recommendation.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Quadratic Trend Acceleration has a clear conceptual strength: by measuring curvature rather than just slope, it attempts to catch trends as they ignite instead of chasing them after they are well established. The volatility normalization via ATR is a thoughtful design choice that helps the same thresholds behave more consistently across instruments, and the fresh-cross requirement is a genuine effort to avoid signalling on stale, persistent conditions.

That said, every approach has limitations. Curvature is inherently a second-order measurement, which makes it sensitive to noise — a single erratic bar can distort the parabola fit and produce a false ignition, especially with short RegPeriod values. Because the entry depends on a fresh cross, choppy markets that repeatedly poke across the acceleration band can generate whipsaw signals that are stopped out. Conversely, in strong, smooth trends the acceleration may ignite once and then never re-cross, meaning the strategy could sit out large portions of a move after an early exit. Fixed ATR-based stops and targets also do not adapt to changing trend structure once a position is open. As with any single-indicator system, performance can degrade sharply during low-volatility ranges, news-driven spikes, or regime shifts. Study it in a controlled environment before drawing conclusions.

Risk Management Tips

Sound risk management matters more than any single entry signal. Consider these general principles as you study this or any strategy:

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

← Back to Blog