PersistentAnti Expert Advisor for MT4/MT5 – Trend Persistence and Anti-Persistence Trading System

12/15/2022

The PersistentAnti Expert Advisor is an automated trading system for MetaTrader 4 and MetaTrader 5 that explores the concept of trend persistence and anti-persistence in Forex markets. The core idea behind this EA is that market price movements may alternate between two distinct behavioral modes:

  • Persistent mode, where price movements tend to continue in the same direction
  • Anti-persistent mode, where price movements are more likely to reverse direction

Recognizing which mode the market is currently exhibiting can provide a meaningful trading edge. The PersistentAnti EA attempts to identify this behavior using a simple, rule-based statistical approach, rather than complex indicators or heavy optimization.

Concept and Market Interpretation
In theory, persistent markets favor trend continuation, while anti-persistent markets favor reversals. Many advanced tools exist to measure such behavior, including the Hurst exponent and Z-Score, but these methods often suffer from instability, lag, or overfitting.

Instead, the PersistentAnti Expert Advisor uses a naïve but robust short-term analysis. It examines a fixed number of recent bars and evaluates how often price movements follow the direction of the previous bar versus how often they reverse.

  • If the proportion of direction-following bars exceeds a predefined threshold, the market is classified as persistent.
  • If the proportion of direction-reversing bars exceeds the same threshold, the market is classified as anti-persistent.
  • If neither condition is met, the market state is considered unclear, and the EA stays out of the market.

Trading Logic
The most unconventional aspect of this EA is that it trades against the detected market mode by default.

  • In a persistent market, the EA trades against the immediate bar direction
    • Buys after bearish bars
    • Sells after bullish bars
  • In an anti-persistent market, the EA trades with the immediate bar direction
    • Buys after bullish bars
    • Sells after bearish bars

This behavior may appear counterintuitive, but it is based on empirical backtesting without aggressive optimization. The EA opens positions at the opening of a new bar and closes them at the opening of a subsequent bar, without using traditional stop-loss or take-profit levels.

Because of this design, the strategy is fully reversible. Traders can switch between inverted and direct logic using the Reverse parameter. If backtests show persistent losses, reversing the logic can often transform losses into gains.

Trading Algorithm Overview

  1. On each new bar, analyze the previous N bars.
  2. Compare the direction of each bar with the direction of its preceding bar.
  3. Count persistent and anti-persistent occurrences.
  4. Determine market mode based on the defined ratio threshold.
  5. Close any open position if the market mode changes or becomes unclear.
  6. Open a new position according to the detected mode and the Reverse setting.

Backtest Results
A historical backtest was performed on the EUR/USD weekly (W1) chart over a 50-month period, using a fixed position size of 0.1 standard lot.

Backtest summary:

  • Initial Deposit: $10,000
  • Net Profit: $1,996
  • Maximum Relative Drawdown: 9.19%
  • Average Trade Frequency: approximately 10 trades per year

It is important to note that the drawdown period lasted over one year, indicating that this EA may experience long losing or stagnation phases. Traders must be psychologically and financially prepared for extended periods of underperformance.

Risk and Trading Characteristics

  • No stop-loss or take-profit levels are used
  • Average losing trade: 112 pips
  • Average winning trade: 153 pips
  • Best suited for higher timeframes (weekly charts)
  • Lower timeframes may suffer from excessive trades and spread costs

Conclusion
The PersistentAnti Expert Advisor is best suited for:

  • Traders interested in market behavior and statistical concepts
  • Long-term, low-frequency trading approaches
  • Systems with reversible logic
  • Research-oriented traders who understand drawdowns and regime changes

This EA is not designed for fast profits or scalping, but rather as a concept-driven system exploring persistence dynamics in Forex markets.

PersistentAnti | MT4
PersistentAnti | MT5

Password:forexsignalpro.net

Disclaimer: Always test the robot on a demo account before using real money. Trading involves risk.