Loading…

Acceleration Phase System

A market can keep printing new highs while its rate of ascent is already falling - deceleration inside an uptrend that "price is rising" alone cannot see. Most momentum EAs trade the first derivative (is price going up) or nothing more rigorous than a moving average slope; this system reads the SECOND derivative directly. A smoothed price series (an EMA of Close) is built, its bar-to-bar change gives velocity, and velocity's own bar-to-bar change gives acceleration. An entry requires the most recently closed bar's acceleration to have crossed beyond a threshold in a given direction, with velocity already pointing the same way - a genuine acceleration START, not noise wobbling around zero. The exit is symmetric and immediate: the moment acceleration measures against the open position, the position is closed, regardless of whether price is still extending in the trade's favour. Trading the phase rather than the level means giving back some of a move that keeps accelerating smoothly, in exchange for getting out at the first objective sign the phase has ended rather than waiting for a lagging price-based exit to catch up. Two builds are provided from this folder: an MQL4 original and a native MQL5 port. Both read exactly the same signal and apply exactly the same entry/exit rules - only the order-handling plumbing behind them differs, as covered below. Notes and limitations - The exit is deliberately not a trailing stop - it closes on the measured second-derivative signal alone, which can occasionally exit into a brief pullback that later resumes. - A very small InpAccelThreshold trades every minor wobble in a choppy market and will produce a high trade count with small average gains; raise it for fewer, cleaner phase changes. - The protective ATR stop exists as a hard backstop only - in normal operation the deceleration exit should trigger well before it. - Only one position at a time, on both platforms. - Lot sizing uses tick value/tick size (MODE_TICKVALUE/MODE_TICKSIZE or their SYMBOL_TRADE_TICK_VALUE/SYMBOL_TRADE_TICK_SIZE equivalents), not a hardcoded contract size.

Expert advisor · MT5 · v1.0 · Free

About Acceleration Phase System

Acceleration Phase System is an expert advisor (trading robot) for MetaTrader 5 based on Moving Average and ATR. It can size trades from your balance and risk percent. It has 11 settings, such as Smooth period, Accel threshold and Atr period. MQL source code included.

Files in the download: AccelerationPhaseSystem.ex5, AccelerationPhaseSystem.mq5, AccelerationPhaseSystem.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Smooth period8EMA period applied to Close to build the smoothed price series
Accel threshold0.0Minimum |acceleration| (in points) required to call it a confirmed phase change
Atr period14ATR period used for the initial stop distance
Stop atr multiple2.0Initial stop distance as a multiple of ATR
Use risk sizingtrueSize by percent risk to the stop instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a sizing fallback
Magic number32801Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Moving Average · Momentum · Risk & Lot Size · ATR · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria