Blog / Strategy
Strategy

Centroid Torque Expansion

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 Centroid Torque Expansion strategy is a single-timeframe, trend-expansion expert advisor (EA) for MetaTrader 5 that builds its trading logic around a physics-inspired "torque" measurement instead of a conventional oscillator. At its core it uses an Exponential Moving Average (EMA) — a smoothed line that represents a rolling "equilibrium" price, often called the centroid — together with the Average True Range (ATR), a volatility gauge, to size its stops and targets. The trading style is best described as directional breakout / expansion trading: it tries to detect the onset of a leg that is driving price away from equilibrium.

Rather than reacting to a moving-average crossover or a fixed band, the strategy measures how fast price is pulling away from the EMA. It defines a per-bar quantity called torque — the product of price's distance from the centroid (the "lever arm") and its one-bar change (the "velocity"). Mathematically, that product is the rate of change of "deviation energy," a measure of how far price has stretched from its equilibrium. When torque is positive and rising, the deviation energy is growing, which the strategy interprets as a fresh directional expansion getting under way.

As an educational tool, Centroid Torque Expansion is well suited to traders who want to study how first-principles reasoning can be turned into concrete entry and exit rules. It is not a "set and forget" money tool; it is a framework for learning how volatility-adaptive thresholds, equilibrium models, and momentum confirmation can be combined. Beginners can use it to understand adaptive thresholds, while more experienced students can dissect how the exit logic ties directly back to the entry hypothesis.

How It Works

The strategy processes one completed bar at a time on the chart's primary timeframe. On each new bar it recomputes the centroid, the torque, an adaptive threshold, and the ATR, then checks for an entry or manages an open position.

Core calculations the strategy performs:

The strategy signals a long entry when all of the following are true:

The strategy signals a short entry when the mirror conditions hold: smoothed torque crosses above the adaptive threshold, the lever arm r is negative (price below equilibrium), and velocity dv is negative to confirm downward push.

Exit logic is tied directly to the same hypothesis. The strategy holds only one position at a time and closes it when the expansion is judged to be over:

Stop-loss and take-profit are volatility-based. When a trade opens, the strategy places:

Because these distances are derived from ATR, they widen in volatile conditions and tighten in calm ones, so the risk framework adapts automatically. Note that a position can be closed either by the torque/centroid exit rules or by hitting the ATR stop/target — whichever occurs first.

Centroid Torque Expansion MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
CentroidPeriod 40 10 120 Length of the EMA that defines the moving equilibrium (centroid). Longer values create a slower, smoother lever arm.
TorqueSmoothing 8 2 30 Window size (M) for averaging recent torque into the smoothed torque signal T. Larger values reduce noise but add lag.
StatWindow 60 20 200 Rolling window (L) used to estimate the standard deviation of torque for the adaptive threshold. Automatically clamped to be at least as large as TorqueSmoothing.
ThresholdK 1.20 0.20 3.00 Self-adapting z-score multiplier. Entry triggers when smoothed torque crosses above ThresholdK × sigma(torque). Higher values demand stronger expansion.
AtrPeriod 14 5 40 Number of bars used to calculate the Average True Range for dynamic stop and target sizing.
AtrStopMult 2.00 0.50 5.00 Stop-loss distance as a multiple of ATR. Larger values give the trade more room but increase risk per trade.
AtrTakeMult 3.00 0.50 8.00 Take-profit distance as a multiple of ATR. Combined with the stop multiple, this sets the reward-to-risk ratio.
Lots 0.10 0.01 1.00 Fixed trade size in lots for each position opened.
Centroid Torque Expansion MT5 EA — MQL5 source code

Recommended Chart Settings

Centroid Torque Expansion is a single-timeframe strategy — every calculation uses the chart's own timeframe, so you simply attach it to the timeframe you want it to trade. The default parameters (a 40-bar centroid and a 60-bar statistics window) are geared toward capturing intraday-to-swing expansion legs, which historically makes timeframes such as M15, M30, or H1 a reasonable starting point for study.

For the instrument, the strategy is symbol-agnostic and can be applied to major forex pairs (for example EUR/USD or GBP/USD) as well as other liquid CFD markets. Because the adaptive threshold scales with each market's own volatility, the logic can transfer across instruments — but the ideal parameter values will differ. Results will vary considerably across different symbols, timeframes, and market conditions, so treat any single configuration as a hypothesis to be tested, not a fixed recommendation. Always validate settings on historical data and a demo account before considering them further.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths of the approach. The most distinctive feature of Centroid Torque Expansion is its self-adapting threshold. By expressing the entry trigger as a multiple of the recent standard deviation of torque, the strategy raises its bar during volatile regimes and lowers it during quiet ones, instead of relying on a fixed constant that quickly goes stale. Its exit logic is also unusually coherent: positions are closed on the same physical reasoning that opened them — when the expansion stops growing or price falls back through equilibrium — rather than on an unrelated rule. The ATR-based stops and targets add a further layer of volatility adaptation.

Known limitations. Expansion and breakout strategies, by design, tend to perform best when markets actually trend or make sustained directional moves. In range-bound or choppy conditions, torque can repeatedly poke above the threshold only for price to snap back toward equilibrium, producing a string of small losing trades — a classic "whipsaw" problem for breakout systems. The strategy also trades one position at a time and uses a fixed lot size, so it does not scale exposure to account equity or pyramid into strong moves. Because it acts only on completed bars, entries are inherently slightly delayed relative to intrabar price action, and the smoothed-torque averaging adds a little more lag in exchange for fewer false signals.

Where it may underperform. Very low-volatility instruments or timeframes may generate a torque standard deviation so small that the adaptive threshold becomes noisy, while news-driven gaps can move price past ATR-based stops before they fill at the intended level. None of these are unique flaws of this EA — they are general realities of systematic trading — but they matter when you evaluate whether the logic fits a given market. Approach the strategy as a study of adaptive-threshold expansion trading rather than a finished product, and expect to spend meaningful time testing before drawing conclusions.

Risk Management Tips

Sound risk management is what separates disciplined study from gambling. Whatever strategy you examine, the following educational principles apply:

Treat this EA as a learning laboratory: change one parameter at a time, observe the effect, and build an understanding of why the strategy behaves as it does.

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