Xauusd tyham
- Experts
- Versione: 1.0
XAUUSD TYHAM
Fully automated Expert Advisor built exclusively for XAUUSD (Gold).
This EA is not a multi-symbol tool — it is tuned and validated for gold only. Do not attach it to other instruments; signal logic and default values assume XAUUSD price behavior and will not produce reliable results elsewhere.
Key Advantages
- Built specifically for gold. Every threshold, ATR setting, and signal filter is calibrated for XAUUSD volatility.
- Full risk control at order level. Choose between fixed lot size or percentage-of-balance risk sizing — the EA calculates the exact lot for you.
- Two exit models. Fixed price distances or a dynamic ATR-based stop/target with a configurable Reward:Risk ratio.
- Built-in safety layers. Maximum spread filter, trading-hours filter, position timeout, and a strict one-position-at-a-time mode.
- Ready-made risk presets. Conservative, Moderate, and Aggressive profiles let you start trading immediately without tuning every parameter.
- Live on-chart status panel. Shows current market regime, exposure, open positions, pending signals, and spread in real time.
Risk & Money Management Parameters
Position Sizing
- Size Mode — Fixed Lot or Risk Percent. Determines whether every trade uses the same lot size or a lot calculated from your account balance.
- Fixed Lot — the lot size used when Size Mode = Fixed Lot (default 0.01).
- Risk Percent — the percentage of account balance risked per trade when Size Mode = Risk Percent (default 0.50%). The EA converts this into a lot size using the actual stop-loss distance, so risk stays consistent regardless of stop size.
- Max Lot — a hard ceiling on lot size, applied regardless of sizing mode, to prevent oversized positions during high-balance or high-volatility conditions.
Exit / Stop Management
- Exit Model — Fixed Price (static SL/TP in price units) or ATR M15 (SL/TP calculated dynamically from current M15 volatility).
- Fixed SL — stop-loss distance in price, used only in Fixed Price mode (default 20.0).
- Fixed TP — take-profit distance in price, used only in Fixed Price mode (default 40.0).
- ATR Period — number of M15 bars used to calculate ATR for dynamic stops (default 14).
- ATR Multiplier — multiplies the ATR value to set stop-loss distance in ATR mode (default 2.0). Larger values = wider stops, smaller position size under Risk Percent mode.
- Reward:Risk — take-profit distance as a multiple of the stop-loss distance in ATR mode (default 2.0–2.5 depending on preset).
- Timeout (hours) — automatically closes a position if it has been open longer than this many hours, regardless of profit or loss. Set to 0 to disable.
Exposure Control
- One Position Only — when enabled, the EA will not open a new trade while one is already active on the symbol/magic number.
- Allow Long / Allow Short — independently enable or disable buy-side and sell-side trading.
- Deviation (points) — maximum allowed slippage on order execution.
Account Protection Filters
- Max Spread (price) — blocks new entries if the current spread exceeds this value. Set to 0 to disable.
- Use Trading Hours — restricts entries to a defined hour range (server time).
- Trading Start Hour / End Hour — the allowed trading window when the hours filter is active.
Risk Presets
| Preset | Sizing | Exit Model | Reward:Risk |
|---|---|---|---|
| Conservative | Fixed lot 0.01 | ATR(14) × 2.0 | 2.0 |
| Moderate | Risk 0.50% of balance | ATR(14) × 2.0 | 2.5 |
| Aggressive | Risk 1.00% of balance | ATR(14) × 2.0 | 2.5 |
Selecting a preset overrides the individual risk inputs above with its own fixed values. Choose Custom to set every parameter manually.
General Settings
- Symbol — leave empty to trade the chart's current symbol (must be XAUUSD).
- Magic Number — unique identifier for this EA's orders.
- Order Comment — text attached to every order for identification.
- Preset — Custom / Conservative / Moderate / Aggressive.
- Show Status on Chart — toggles the live on-chart information panel.
Signal Configuration Parameters
(Advanced — pre-tuned for XAUUSD; adjust only if you understand the underlying logic)
- DIDI short/medium/long period and threshold (H1)
- Vortex period, persistence, and threshold (M15)
- Consolidation candle count, previous-trend window, direction filter, range threshold, and signal validity window (M15)
- Structural lookback for regime detection (D1/H4)
Risk Disclaimer
Trading gold with leverage carries a high level of risk. Past backtest or walk-forward results do not guarantee future performance. Test on a demo account before live deployment, and never risk capital you cannot afford to lose.
