Adversarial Regime
- Experts
- Versione: 1.0
- Attivazioni: 10
Adversarial Regime is a machine-learning trend system. It trains a model to classify the market into trend or range, then trades only in the direction of a confirmed trend and stands aside when the market is ranging.
Strategy
The EA separates analysis from execution across two timeframes. On a higher timeframe it classifies the market regime, and on a lower timeframe it executes the trades.
The regime model is a decision forest trained on your chosen history. For each past bar it applies triple-barrier labeling: it looks a fixed number of bars ahead and records whether price first moved up by a volatility-scaled amount (uptrend), down by that amount (downtrend), or neither (ranging). From that history the model learns the conditions that precede each outcome, using five normalized inputs.
Live, the EA classifies the current regime on every higher-timeframe bar and acts only once the regime is confirmed, both by a minimum confidence level and by several consecutive bars of agreement. A confirmed uptrend opens a long, a confirmed downtrend opens a short, and a ranging market stays flat. It takes one position per confirmed regime and does not re-enter the same regime after a stop or target until the regime changes.
Built to travel across instruments
Every model input is normalized, expressed relative to price or volatility, so the classifier applies consistent logic across forex, metals, and indices rather than being tuned to one instrument scale. You re-optimize the timeframe pairing and the point-based risk settings per symbol.
Order safety
Before every entry the EA verifies free margin, respects the symbol stop level, and normalizes the lot to the broker minimum, maximum, and step. It supports fixed lot, percent-risk, and fixed-margin position sizing.
Key features
- Machine-learning regime classification, trend versus range, with triple-barrier labeling
- Separate higher timeframe for analysis and lower timeframe for execution
- Confidence floor and regime-persistence confirmation before any trade
- Five normalized, symbol-portable model inputs
- Margin, stop-level and lot-checked order execution
- Fixed lot, percent-risk, or fixed-margin position sizing
- Position management: trailing stop, break even, partial take profit, and an optional regime-based exit
- On-chart dashboard showing model status, current regime, and confidence
Requirements and notes
- Works on any account type, hedging or netting
- No martingale, no grid, no averaging. Risk per trade is fixed by your money-management and stop settings
- Requires sufficient history on the analysis timeframe to train the model before it begins trading
- Fully configurable for any symbol and timeframe. Re-optimize the timeframes and risk settings per instrument
- Tested on real tick data
- Past performance does not guarantee future results
Support
Support is provided through the product comments section and the MQL5 messaging system. Questions and setup notes posted in comments stay available to all users in every language.
