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?
Momentum Curvature Shift is a trend-following, pullback-continuation strategy that times its entries using curvature — the second derivative (or second finite difference) of a smoothed price line — rather than a simple moving-average cross or an oscillator level. In plain terms, most pullback systems wait for price to touch a line (a moving average, a band, or an oversold reading). This strategy instead watches how the rate of change of momentum behaves, looking for the exact moment a retrace stops decelerating and momentum begins to re-ignite in the direction of the larger trend.
The core idea rests on three layers of price math. First, an exponential moving average (EMA) — a moving average that weights recent prices more heavily — smooths the closing price. The first difference of that smoothed line is its slope, which represents velocity. The second difference is its curvature, which represents acceleration. Inside a healthy trend, a pullback shows up as the smoothed slope decelerating: curvature turns negative in an uptrend and positive in a downtrend. When the retrace exhausts and price resumes with the trend, curvature crosses back through zero. That zero-cross is the earliest mathematical read that momentum is turning, often before a slope or moving-average cross would confirm it.
As a learning tool, Momentum Curvature Shift is well suited to traders who already understand basic trend-following and want to explore how higher-order derivatives of price can be used to refine entry timing. It is designed with trending intraday forex or index conditions in mind — for example, a major currency pair or index on the M15 to H1 timeframes. It is best framed as a study in signal construction and entry precision, not as a shortcut to any particular outcome.
How It Works
The strategy evaluates once per completed bar and enforces a fully symmetric set of rules for long and short trades. It only considers a new entry when no position is already open under its Magic number, and it skips signals when the spread is wider than the configured limit so that fills stay realistic.
Trend gate (the direction filter):
- A longer trend EMA must be sloping in one direction, measured over the
SlopeLookbacknumber of bars. - Price must sit on the correct side of that trend EMA (above it for longs, below it for shorts).
- The slope must be meaningful — its absolute value divided by ATR (Average True Range, a volatility measure) must be at least
MinTrendSlopeAtr. This filters out flat, choppy conditions where curvature is just noise.
Long entry — the strategy signals a buy when all of these align:
- The trend gate confirms an uptrend.
- Curvature crosses up through zero (the previous curvature reading was at or below zero and the current one is above it), indicating deceleration has ended and momentum may be re-accelerating.
- The just-closed bar is bullish (its close is above its open), a candle-colour confirmation that the re-acceleration is real rather than a smoothing artefact.
Short entry — the strategy signals a sell when all of these align:
- The trend gate confirms a downtrend.
- Curvature crosses down through zero (previous reading at or above zero, current below).
- The just-closed bar is bearish (its close is below its open).
Stop-loss and take-profit logic:
- Risk is anchored to volatility using ATR. When a trade fills, the stop-loss is placed
SlAtrMult × ATRaway from the entry, and the take-profit is placedTpAtrMult × ATRaway. - With the defaults (1.5 and 2.5), this creates a reward-to-risk structure of roughly 2.5 to 1.5. There is no trailing stop or manual exit — each position is left to reach either its ATR-based stop or target.
- Only one position per Magic number is held at any time, so the strategy does not stack trades.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SmoothPeriod | 10 | 4 | 40 | Period of the fast EMA whose curvature (second difference) is tracked for the entry trigger. |
| TrendPeriod | 50 | 20 | 200 | Period of the longer EMA that defines the prevailing trend direction. |
| SlopeLookback | 5 | 1 | 30 | Number of bars back used to measure the trend EMA's slope. |
| MinTrendSlopeAtr | 0.10 | 0.0 | 1.0 | Minimum ratio of absolute trend slope to ATR for the trend to count — higher values demand a stronger trend and filter more chop. |
| AtrPeriod | 14 | 5 | 40 | ATR lookback period, used for both the slope-strength filter and risk sizing. |
| SlAtrMult | 1.5 | 0.5 | 5.0 | Stop-loss distance as a multiple of ATR. |
| TpAtrMult | 2.5 | 0.5 | 8.0 | Take-profit distance as a multiple of ATR. |
| MaxSpreadPoints | 30 | 0 | 200 | Maximum spread (in points) allowed for a fill; 0 disables the filter. |
| Lots | 0.10 | 0.01 | 1.0 | Trade volume in lots. |

Recommended Chart Settings
Momentum Curvature Shift was designed with trending intraday conditions in mind. A reasonable starting point for study is a major forex pair such as EURUSD, or a major stock index, on the M15 to H1 timeframes. The underlying code is single-timeframe by design — every calculation uses the chart's own timeframe — so the strategy will run on whatever timeframe you attach it to, and nothing is hardcoded.
Because curvature-based timing depends on relatively clean, directional movement, the strategy tends to behave very differently between trending and range-bound periods. Results will vary across symbols, sessions, and market regimes, so treat any single chart setting as a starting point for testing rather than a fixed recommendation.
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
Momentum Curvature Shift has some genuine conceptual strengths. By reacting to the inflection of momentum rather than a level touch, it may signal continuation entries earlier than a moving-average cross would, and its multi-layer trend gate (slope direction, price side, and ATR-relative slope strength) is a deliberate attempt to avoid trading noise. Because both stops and targets scale with ATR, the strategy automatically adapts its risk to the current volatility of the market.
There are also important limitations to understand. Curvature is a second derivative, and higher-order derivatives are inherently sensitive to noise — small wiggles in price can produce curvature zero-crosses that do not lead anywhere. The candle-colour and trend-strength filters exist precisely to suppress those false signals, but no filter removes them entirely. In choppy, sideways, or news-driven markets, the trend gate may still let through entries that reverse quickly. The fixed ATR stop-and-target design also means the strategy does not lock in gains as a trade moves in its favour; a position that is well ahead can still return to its stop.
Every parameter interacts with the others. A shorter SmoothPeriod makes curvature more reactive but noisier; a higher MinTrendSlopeAtr demands stronger trends but produces fewer trades. There is no single "correct" configuration, and over-optimising these values to a specific historical period is a common way to produce results that historically looked strong but did not generalise. Approach this EA as a framework to study and stress-test, not as a finished system.
Risk Management Tips
- Size positions conservatively. A widely taught guideline is to risk no more than 1–2% of account equity on any single trade. Use the
Lots,SlAtrMult, and account size together to keep each trade's potential loss within that band. - Test on a demo account first. Run the strategy in a simulated environment across different symbols and market conditions before considering any live capital.
- Understand drawdown. Even a well-constructed trend-continuation approach will experience losing streaks. Know the maximum drawdown you are willing to tolerate before you begin, and stop if it is reached.
- Do not over-leverage. Leverage magnifies both gains and losses. Keep total exposure modest relative to your account.
- Keep expectations realistic. No strategy signals correctly all the time. Judge this one on process and consistency over many trades, not on any individual result.
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: MomentumCurvatureShift.ex5 (31 downloads)
- Source Code: MomentumCurvatureShift.mq5 (32 downloads)
- Documentation: MomentumCurvatureShift.pdf (36 downloads)