# Aurum Regime Momentum EA
## Adaptive regime-based trading for MetaTrader 5
Aurum Regime Momentum EA is an automated trading system designed for Gold and other broker symbols with the same market structure. It combines higher-timeframe regime classification with momentum confirmation, ATR-based risk control, and systematic position management.
The EA reads multiple timeframes automatically from one host chart:
- Entry timeframe: H1 by default
- Confirmation timeframe: H4 by default
- Regime timeframe: D1 by default
You only need to attach the EA once to the host chart. The confirmation and regime data are read internally.
## Main features
- Adaptive bullish, bearish, and range-regime routing
- Long, short, and range trading sleeves
- EMA slope and separation analysis
- ADX confirmation and ATR volatility measurement
- Bollinger Bands, EMA, RSI, and ATR signal components
- Balance-based position sizing
- Separate long, short, and range risk settings
- Maximum portfolio-risk protection
- Maximum open-position limit
- Session filter
- Break-even and ATR trailing management
- Optional month-end and calendar controls
- Optional chart dashboard with connection, trading, position, and account information
- Optional automatic Bollinger Bands and EMA chart indicators
The EA does not guarantee profits. Always test the product in the Strategy Tester and on a suitable demo account before considering live deployment.
## Recommended setup
- Attach to an M1 chart as the host chart. The EA reads the H1 entry data, H4 confirmation data, and D1 regime data internally by default.
- Use a Hedging account when multiple independent positions are required.
- Make sure Algo Trading is enabled.
- Use a broker symbol that provides sufficient Gold history and acceptable spread conditions.
- Start with conservative risk settings and validate the parameters for your broker.
## Input parameters
### Portfolio
- `InpMagicNumber` — Unique magic number used to identify EA positions. Default: `61001066`.
- `InpEntryTimeframe` — Entry signal timeframe. Default: `H1`.
- `InpRegimeTimeframe` — Higher-timeframe regime analysis. Default: `D1`.
- `InpConfirmTimeframe` — Confirmation timeframe. Default: `H4`.
- `InpCandidateSelectionMode` — Candidate selection mode: fixed sleeve choice or best available candidate.
- `InpBullCandidate` — Candidate used in a bullish regime.
- `InpBearCandidate` — Candidate used in a bearish regime.
- `InpRangeCandidate` — Candidate used in a range regime.
- `InpMaxOpenPositions` — Maximum number of positions managed by the EA. Default: `6`.
- `InpMaxSpreadPoints` — Maximum spread allowed in points. `0` disables the limit.
- `InpDeviationPoints` — Maximum execution deviation in points. Default: `30`.
### Decision replay
- `InpLLMMode` — Optional decision mode: `OFF`, `EXPORT`, `EXPORT_EXECUTED`, or `REPLAY`.
- `InpLLMRunId` — Identifier used for exported or replayed decisions.
### Calendar policy
- `InpUseCalendarFilter` — Enables calendar-month filtering.
- `InpLongMonthMask` — Months allowed for long trades.
- `InpShortMonthMask` — Months allowed for short trades.
- `InpRangeMonthMask` — Months allowed for range trades.
- `InpFlatAtMonthEnd` — Closes eligible positions at month end.
- `InpBlockLastCalendarDay` — Blocks entries on the last calendar day.
- `InpMonthEndExitHour` — Month-end exit hour.
- `InpMonthEndExitMinute` — Month-end exit minute.
### Balance compounding and risk
- `InpLongRiskPercent` — Risk percentage for long trades. Default: `2.00`.
- `InpShortRiskPercent` — Risk percentage for short trades. Default: `2.00`.
- `InpRangeRiskPercent` — Risk percentage for range trades. Default: `1.50`.
- `InpQualityRiskBoost` — Additional risk adjustment for signal quality.
- `InpMaxLot` — Maximum lot size. `0` uses broker and risk-based sizing.
- `InpRoundUpMinimumLot` — Rounds volume up to the broker minimum lot when enabled.
- `InpMaxPortfolioRiskPercent` — Maximum total risk for EA positions. Default: `10.00`.
### Regime engine
- `InpMacroFastEMAPeriod` — Fast macro EMA period. Default: `50`.
- `InpMacroSlowEMAPeriod` — Slow macro EMA period. Default: `200`.
- `InpMacroSlopeBars` — Bars used for macro slope measurement.
- `InpConfirmFastEMAPeriod` — Fast confirmation EMA period. Default: `20`.
- `InpConfirmSlowEMAPeriod` — Slow confirmation EMA period. Default: `100`.
- `InpConfirmSlopeBars` — Bars used for confirmation slope measurement.
- `InpConfirmADXPeriod` — ADX confirmation period. Default: `14`.
- `InpRegimeATRPeriod` — ATR period used by the regime engine. Default: `14`.
- `InpMinimumSeparationBps` — Minimum EMA separation threshold.
- `InpMinimumSlopeBps` — Minimum slope threshold.
- `InpMinimumConfirmADX` — Minimum confirmation ADX value. Default: `14.0`.
- `InpRegimeConfirmationBars` — Number of bars required to confirm a regime.
### H1 signal engine and exits
- `InpATRPeriod` — ATR period for entry and exit calculations. Default: `14`.
- `InpMinRiskReward` — Minimum accepted risk/reward ratio. Default: `1.51`.
- `InpMaxRiskReward` — Maximum risk/reward ratio. Default: `3.20`.
- `InpUseSession` — Enables the trading session filter.
- `InpSessionStartHour` / `InpSessionStartMinute` — Session start. Default: `06:00`.
- `InpSessionEndHour` / `InpSessionEndMinute` — Session end. Default: `22:00`.
- `InpBreakEvenRR` — Profit multiple at which break-even management starts. Default: `1.00`.
- `InpTrailStartRR` — Profit multiple at which trailing management starts. Default: `1.80`.
- `InpTrailDistanceATR` — ATR multiplier for trailing distance. Default: `0.70`.
- `InpTPFollowATR` — ATR multiplier for dynamic take-profit following. Default: `1.25`.
- `InpCloseProfitableOnAdverseRegime` — Closes profitable positions when the regime turns adverse.
### Chart interface
- `InpShowStatusPanel` — Shows the text dashboard on the chart.
- `InpShowChartIndicators` — Adds Bollinger Bands and EMA indicators to the chart.
## Important
Performance depends on symbol specifications, spread, execution quality, account mode, leverage, and risk settings. Historical tests are not a guarantee of future results. Use proper risk management and monitor the EA after installation.
# AurumRegimeMomentum_10Y.set — Configuration Notes
## How to use
- Attach `AurumRegimeMomentumEA` to an **M1 host chart**.
- The EA reads the entry timeframe, confirmation timeframe, and regime timeframe internally.
- This preset uses **H1 for entries**, **H4 for confirmation**, and **D1 for regime analysis**.
- Do not change `InpEntryTimeframe`, `InpConfirmTimeframe`, or `InpRegimeTimeframe` unless you intentionally want to test another configuration.
## Portfolio and execution
- `InpMagicNumber=61001066` — Unique identifier for Aurum positions.
- `InpMaxOpenPositions=6` — Maximum positions managed by the EA.
- `InpMaxSpreadPoints=0` — No hard spread limit in this preset.
- `InpDeviationPoints=30` — Maximum execution deviation in points.
- `InpCandidateSelectionMode=0` — Uses the fixed sleeve candidates below.
- `InpBullCandidate=2` — Candidate used in bullish regime.
- `InpBearCandidate=3` — Candidate used in bearish regime.
- `InpRangeCandidate=2` — Candidate used in range regime.
## Calendar policy
- `InpUseCalendarFilter=true` — Enables month-based trading filters.
- The long, short, and range month masks are already configured in the `.set` file.
- `InpFlatAtMonthEnd=true` — Enables month-end position handling.
- `InpBlockLastCalendarDay=true` — Blocks new entries on the last calendar day.
- Month-end handling runs at `22:00` server time.
## Risk and compounding
- `InpLongRiskPercent=3.00` — Risk allocation for long trades.
- `InpShortRiskPercent=3.00` — Risk allocation for short trades.
- `InpRangeRiskPercent=2.00` — Risk allocation for range trades.
- `InpQualityRiskBoost=0.35` — Quality-based risk adjustment.
- `InpMaxLot=0.00` — Uses risk-based sizing without a fixed lot ceiling.
- `InpRoundUpMinimumLot=true` — Rounds to the broker minimum lot when required.
- `InpMaxPortfolioRiskPercent=16.00` — Portfolio risk ceiling for this research preset.
## Regime engine
- Macro EMA: fast `50`, slow `200`.
- Confirmation EMA: fast `20`, slow `100`.
- Macro slope bars: `5`.
- Confirmation slope bars: `3`.
- ADX period: `14`.
- ATR period for regime analysis: `14`.
- Minimum EMA separation: `8.0` bps.
- Minimum slope: `1.0` bps.
- Minimum confirmation ADX: `14.0`.
- Required regime confirmation: `2` bars.
## Signal and exit engine
- Signal ATR period: `14`.
- Accepted risk/reward range: `2.00` to `3.20`.
- Session filter: `06:00` to `22:00` server time.
- Break-even starts at `1.00R`.
- Trailing starts at `1.80R`.
- Trailing distance: `0.70 ATR`.
- Take-profit following distance: `1.25 ATR`.
- Profitable positions are closed when the regime becomes adverse.
## Optional replay and chart interface
- `InpLLMMode=OFF` — Normal deterministic mode; no replay file is required.
- `InpLLMRunId` identifies optional export/replay data.
- `InpShowStatusPanel=true` — Shows the text dashboard directly on the chart.
- `InpShowChartIndicators=true` — Adds Bollinger Bands and EMA indicators to the chart.
## Important
This file is a research/test preset. Risk values are not recommendations. Validate symbol suffixes, contract size, spread, minimum lot, leverage, and broker execution before using a different account.