H Bandys Naive Mean Reversion
- Experts
- MATTHEW STAN WILLS
- 버전: 1.0
- 활성화: 5
Howard Bandy's - Naive Mean Reversion System
Version 1.0 – Developed by Matthew Wills
This EA automates a professional-grade mean reversion system designed to exploit one of the most consistent edges in equity markets: short-term reversals after clustered selling pressure. This Expert Advisor systematically enters trades after consecutive down days within an established trend, capturing the high-probability bounce that often follows. Both long and short trading are supported, with short disabled by default.
Core Edge
Markets frequently overreact in the short term. After several consecutive down closes, selling pressure becomes exhausted and price tends to revert. This EA captures that edge by identifying oversold conditions using consecutive down-day counts, filtering with a long-term trend via the 200-period SMA, and exiting through a structured triple framework that protects profits. This approach is simple by design, and that simplicity is what makes it robust across different market conditions and time periods.
Research Foundation
This EA implements the Naive Mean Reversion system from Dr. Howard Bandy's book "Mean Reversion Trading Systems: Practical Methods for Swing Trading" (Blue Owl Press, 2013). Dr. Bandy is a quantitative trading systems researcher and consultant whose books, including "Quantitative Trading Systems" and "Modeling Trading System Performance," are widely regarded as essential reading for systematic traders. The Naive system is intentionally elementary, reflecting Bandy's research philosophy that trading systems should be as simple as possible to remain effective across decades of market data rather than overfitted to recent conditions.
Strategy Rules
Long entry: N consecutive down closes (default 4) while price is above the SMA trend filter.
Short entry: N consecutive up closes (default 4) while price is below the SMA trend filter (disabled by default).
Exit logic uses a triple framework: percentage-based profit target, consecutive opposite-day exit, and N-bar timeout. All three work together to manage each position. Optional scaling allows additional entries during deeper pullbacks for traders who want to add to positions on subsequent down days (Note, each entry is treated as an independent signal and trade).
Typical System Behaviour
This is a mean reversion system, not a trend-following strategy. It profits from short-term pullbacks, not large directional moves. Expect a high win rate (often 70 to 90 percent depending on market and settings), small consistent gains, and occasional losing streaks during strong trending markets. It performs best on liquid equity indices and ETFs.
Who This EA Is For
This system is ideal for traders building multi-strategy portfolios, users familiar with systematic trading concepts, and traders targeting consistency over aggressive returns.
This system is not suitable for "set and forget" users expecting constant profits, traders who cannot tolerate temporary drawdowns, or users looking for high-risk high-return systems.
Key Features
Fully automated execution on MetaTrader 5 with multi-symbol trading supporting up to 10 markets from a single chart. Three position sizing modes are available: Fixed Lots, Dollar Value, and Account Percentage, with automatic currency conversion for cross-currency instruments. The triple-exit framework provides structured risk control through profit targets, consecutive day exits, and time-based exits. Optional scaling into deeper pullbacks is configurable. A built-in performance dashboard displays win rate, P&L, average trade, and open positions directly on the chart. Alerts are available via chart popups, push notifications, and email.
Example Performance on SPY
Using optimized settings of 3 consecutive down days, 0.5 percent profit target, 5-bar timeout, and 200-period SMA filter, the system produced an 87.6 percent win rate across 194 trades over a 21-year backtest period (2004 to 2026, $10,000 per trade, $0.02 per share commission). Default textbook settings use 4 down days and a 1.0 percent profit target as a conservative starting point. Results vary by instrument. Always test on your chosen market before trading live.
Recommended Markets
Best suited for US equity indices such as S&P 500 (US500), NASDAQ 100 (NDX100/US100), and Dow Jones (US30). Equity ETFs including SPY, QQQ, DIA, and IWM also work well, along with other liquid indices like ASX 200, DAX 40, and FTSE 100. Not recommended for low-liquidity instruments or Forex unless specifically tested. Each EA instance should trade similar asset classes.
Screenshots
Screenshots 1 through 4 show individual trade examples on SPY with entry and exit markers, indicator values, and strategy details. Screenshot 5 shows the backtest equity curve on SPY using default settings. Screenshot 6 shows the equity curve using optimized settings on SPY. Screenshot 7 shows the backtest equity curve on QQQ.
Part of a Professional EA Series
This EA is one of 9 mean reversion strategies available from M.Wills, each targeting a different market behaviour. The series includes Connors TPS (scale-in mean reversion), Connors RSI2 (RSI extreme readings), Connors Double 7s (7-day price channel), Connors Percent B (Bollinger Band), Bandy Naive MR (consecutive down days), Bandy PIRDPO (detrended price oscillator), Bandy RVI2 (relative vigor index), Bandy DV2 (close-to-midpoint momentum), and Bandy Z-Score (statistical z-score). Running multiple systems together can reduce drawdowns, improve consistency, and smooth equity curves.
Expert Advisor Settings and Configuration
General Settings
Magic Number (default: 12345) - Unique identifier for this EA's trades. Use different numbers when running multiple EAs on the same account to prevent trade conflicts.
Trade Entry Mode (default: Open of Next Bar) - Controls when trades are executed:
OPEN OF NEXT BAR - Places trades at the next bar open. Best for backtesting.
CLOSE OF THIS BAR - Executes near the daily session close. Recommended for live trading.
EXACT TIME - Executes at a user-defined time each day using the broker's server clock.
Exact Time (default: 23:54) - The time in HH:MM format used when Trade Entry Mode is set to Exact Time. All symbols are assessed for entries and exits at this time.
Timeframe (default: Current) - The chart timeframe for analysis. Daily is recommended for this mean reversion strategy.
Position Sizing
Sizing Mode (default: Lot Size) - Determines how position size is calculated:
LOT SIZE - Uses a fixed number of lots per trade entry.
TRADE VALUE $ - Allocates a fixed dollar amount per trade, automatically converted to the correct lot size.
ACCOUNT BALANCE % - Allocates a percentage of the current account balance per trade.
Position Size (default: 0.01) - The value applied to the selected sizing mode. For Lot Size this is the number of lots. For Trade Value this is the dollar amount. For Account Balance this is the percentage.
Symbol Management
Additional Symbols (default: blank) - Comma-separated list of additional symbols to trade from a single chart (e.g. US500,NDX100,ASX200). Leave blank to trade only the chart symbol. Invalid symbols are skipped automatically to prevent execution errors.
Max Symbols Open at Once (default: 2) - Maximum number of symbols that can have active trades simultaneously. Controls total exposure across multiple instruments.
Long System
Enable Long (default: true) - Toggles long (buy) trading on or off.
Trend Filter: Price > SMA (default: true) - When enabled, long trades are only taken when price is above the moving average. Ensures trades are taken in the direction of the broader uptrend.
Trend Filter: SMA Period (default: 200) - The lookback period for the moving average trend filter.
Entry: Consecutive Down Days (default: 4) - The number of consecutive lower closes required to trigger a long entry signal.
Entry: Additional on Subsequent Days (default: 0) - If the market continues falling after the initial entry, take additional positions on each subsequent down day. Set to 0 for a single entry only. Set to N for up to N additional entries on subsequent down days.
Exit: Consecutive Up Days (default: 1) - Close long positions after N consecutive higher closes. This captures the mean reversion bounce. Set to 0 to disable and rely on the profit target and N-bar timeout only.
Exit: Take Profit % (default: 1.0) - Percentage-based profit target applied to each position. The take profit is submitted with the order at the broker level for reliable execution. Set to 0 to disable.
Exit: N-Bar Timeout (default: 5) - Maximum number of bars to hold a position. If no other exit has triggered after N bars, the position is closed at market. Prevents capital from being tied up in stagnant trades. Set to 0 to disable.
Short System
Enable Short (default: false) - Toggles short (sell) trading on or off. Disabled by default.
Trend Filter: Price < SMA (default: true) - When enabled, short trades are only taken when price is below the moving average. Ensures trades are taken in the direction of the broader downtrend.
Trend Filter: SMA Period (default: 200) - The lookback period for the moving average trend filter.
Entry: Consecutive Up Days (default: 4) - The number of consecutive higher closes required to trigger a short entry signal.
Entry: Additional on Subsequent Days (default: 0) - If the market continues rising after the initial entry, take additional positions on each subsequent up day. Set to 0 for a single entry only.
Exit: Consecutive Down Days (default: 1) - Close short positions after N consecutive lower closes. Set to 0 to disable.
Exit: Take Profit % (default: 1.0) - Percentage-based profit target for short positions. Set to 0 to disable.
Exit: N-Bar Timeout (default: 5) - Maximum bars to hold a short position before closing at market. Set to 0 to disable.
Display Settings
Show Dashboard (default: true) - Displays the on-chart information panel showing all active settings and current trade status.
Font Size (default: 20) - Text size for the dashboard display.
Show Trade Metrics (default: true) - Includes performance statistics in the dashboard: total trades, win/loss ratio, accuracy, average trade, and cumulative P&L.
Metrics Start Date (default: 2000.01.01) - Starting date for performance calculations. Adjust this to measure performance over a specific period.
Alerts and Notifications
Chart Alerts (default: false) - Enable on-chart popup alerts when trade signals are generated.
Push Notifications (default: false) - Enable mobile push notifications for trade signals. Requires push notifications to be configured in the MetaTrader 5 terminal.
Email Notifications (default: false) - Enable email notifications for trade signals. Requires email to be configured in the MetaTrader 5 terminal settings.
Recommendations
Backtesting should be done using Open of Next Bar mode for stable and repeatable results, as the tester processes completed bars. Close of This Bar and Exact Time modes may not function correctly in the Strategy Tester.
Live trading should use Exact Time or Close of This Bar for precise execution that aligns with the daily close.
Use "1 minute OHLC" or higher tick model for accurate results on daily bars. Do not use "Open prices only" for daily timeframe strategies.
Do not mix different asset classes in the same EA instance. Indices, Forex, and Metals should be traded separately to avoid incorrect position sizing.
For Forex and Metals, use the Lot Size position sizing method only. Trade Value and Account Percentage modes are designed for stocks and indices and may produce incorrect lot sizes with other asset classes.
Requirements
MetaTrader 5 platform with a Hedging or Netting account type. Minimum recommended leverage is 1:30. Daily timeframe is preferred. All symbols must be available in your broker's Market Watch.
Support
If you need custom adjustments or have questions, leave a comment with your email and we will get back to you. Always test the EA on a demo account before running it on a live account.
Risk Disclosure
This EA trades mean reversion setups that historically produce high win rates. However, consecutive down days can extend significantly during market crashes, and exits may not prevent losses during severe drawdowns. Backtests use historical data and do not account for slippage, partial fills, or changing market conditions. Proper position sizing relative to account equity is essential. Always test with demo accounts before trading live. Past performance does not guarantee future results.
