Blog / Strategy
Strategy

Directional Change Overshoot

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?

The Directional Change Overshoot strategy is an event-driven momentum system for MetaTrader 5 built on the Directional Change (DC) framework — a technique borrowed from high-frequency finance research (Guillaume, Dacorogna, Olsen and colleagues). Instead of acting on a fixed calendar-bar clock, it reacts to price events of a chosen magnitude, a concept often called "intrinsic time." A directional change is a confirmed reversal of a set percentage away from the most recent price extreme, and this Expert Advisor (EA) trades in the direction of each confirmed change to capture the "overshoot" leg that typically follows.

In plain terms, a directional change occurs when the market, after climbing to a running high (or falling to a running low), pulls back by a threshold percentage — signalling that the prior run has flipped. The empirical regularity the strategy leans on is that the average overshoot after a directional change is roughly the same size as the threshold that triggered it. The EA therefore enters in the new direction to study whether that overshoot materialises: a confirmed downturn produces a short, and a confirmed upturn produces a long.

This strategy is best viewed as a learning tool for traders who want to understand event-based (as opposed to time-based) trading logic, threshold-driven trend detection, and stop-and-reverse position management. It suits an intermediate student of algorithmic trading who is comfortable with concepts like ATR-scaled risk and wants to see how a research-grade market microstructure idea translates into a working MT5 EA. It is not a shortcut of any kind — it is a framework for structured experimentation on a demo account.

How It Works

The strategy runs a small state machine that classifies the market as being in an "up run" or a "down run," then watches for the threshold reversal that confirms a directional change. All price reads use the chart's own timeframe, so the "clock" bar is whatever timeframe you apply at test time — but the DC events are what actually drive the trades.

directional change overshoot MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
ThresholdPercent 0.35 0.05 2.00 The directional-change threshold (theta) as a percent of price. Larger values produce fewer, bigger events; smaller values react to minor swings.
AtrPeriod 14 5 40 Number of bars used to calculate the ATR that sizes the protective stop and target.
AtrStopMult 2.0 0.5 5.0 Stop-loss distance expressed as a multiple of ATR from the entry price.
RewardRiskRatio 1.5 0.5 4.0 Take-profit distance as a reward-to-risk multiple of the stop distance.
ReverseOnSignal 1 0 1 1 = flip the position on an opposite DC event (stop-and-reverse); 0 = only enter when flat.
Lots 0.10 0.01 1.0 Fixed order volume in lots for each trade.

(The EA also exposes a Magic number input, default 3417, used internally to tag and manage its own positions.)

directional change overshoot MT5 EA — MQL5 source code

Recommended Chart Settings

The Directional Change Overshoot EA is single-timeframe and instrument-agnostic by design — because the threshold is a percentage of price, the same rules can be applied across forex pairs, indices, or other CFDs. A common starting point for study is a major FX pair such as EUR/USD on the H1 (1-hour) timeframe, which offers a balance between event frequency and noise. Higher timeframes produce fewer, larger directional changes; lower timeframes produce more frequent, noisier events.

Because the "clock" bar is whatever timeframe you attach the EA to, the choice of timeframe interacts directly with ThresholdPercent. It is worth testing several combinations in the Strategy Tester. Remember that results will vary considerably across different symbols, spreads, and market conditions, so treat any single configuration as a hypothesis to examine rather than a fixed setting.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every approach, the Directional Change Overshoot strategy has clear strengths and equally clear limitations, and understanding both is the point of studying it.

Strengths. The DC framework is grounded in published market-microstructure research and offers an intuitive, self-adjusting definition of trend that does not depend on lagging moving averages. Measuring the threshold as a percentage of price makes the logic portable across instruments. The stop-and-reverse design keeps the EA continuously engaged with the dominant swing, and ATR-scaled risk means protective levels adapt to changing volatility rather than using fixed distances.

Limitations. The strategy assumes the historical regularity that overshoots tend to match the DC threshold; in practice, this is an average tendency and any individual overshoot may be smaller, larger, or absent. In choppy, range-bound markets the threshold can trigger repeatedly with little follow-through, producing a series of small losses often described as "whipsaw." Because the EA acts on bar closes rather than ticks, entries occur after the reversal is confirmed, which can mean giving up part of the move. A stop-and-reverse system may also underperform during sharp, one-directional trends that never generate the opposite event needed to exit near the extreme.

Where it may underperform. Low-volatility drift, wide-spread instruments, and news-driven gaps can all degrade the strategy's behaviour. The percentage threshold that suits one symbol may be far too sensitive or too coarse for another, so parameter choices are not universal.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Whatever configuration you study, keep these general principles in mind:

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