XAU Cipher Logo

XAU Cipher - User Guide

Detailed documentation for installation, configuration, and optimization.

Introduction

XAU Cipher is an Expert Advisor designed specifically for Gold (XAUUSD), a market known for sharp volatility, impulsive price behavior, and sudden changes in momentum. This EA is not built around random entries or isolated signals. XAU Cipher works as a cycle-based execution engine, where entry, position management, and exit are part of one complete structure. In practical terms, it can be described as a controlled reversal system with progressive position management, adapted to the behavior of Gold and supported by operational filters that help avoid unfavorable trading conditions.

Installation (MQL5 Market)

1
Terminal Login: Open your MT5 terminal, go to Tools > Options > Community and log in with your MQL5.com account credentials.
2
Market Download: Open the Navigator window (Ctrl+N). Locate the Market directory and expand it to find the My Purchases subdirectory. Your purchased Expert Advisor will be listed there ready to Install. MT5 Navigator Market Purchases
3
Attach to Chart: After installation, the EA will appear in the Navigator window under Expert Advisors > Market. Drag it onto an H1 chart of XAUUSD.
4
Enable Trading: In the EA properties window, ensure "Allow Algo Trading" is checked. Also, enable the global Algo Trading button in the top toolbar.

Loading Set Files

Set files are crucial as they contain the optimized configurations for specific risk levels.

1
Open the XAU Cipher properties (F7 on the chart).
2
Go to the Inputs tab. Here you will see the list of all parameters. Click the Load button on the right side. EA Inputs tab and Load button
3
Click the Load button and select the .set file you downloaded from this website.

Input Parameters Reference

Below is the complete list of parameters. Click on each group to expand or collapse its details.

Quick Access & Support
ParameterDescription
Official product pageDirect link to purchase the Expert Advisor, read verified user reviews, and see the full technical description on the MQL5 Market.
Official set files channelLink to the Telegram channel where optimized .set files are shared monthly.
Official updates channelMQL5 channel for official announcements and new version alerts.
Recommended broker (Forex/Metals)Affiliated links to brokers verified for optimal execution and tight spreads.
A. Main Controls
ParameterDescription
Target profit per cycle (% balance)Defines the profit target the EA will attempt to reach for the entire trading cycle. Increasing this makes the system more aggressive; decreasing it reduces exposure but limits profit per cycle.
Max allowed loss (% max balance)Defines the maximum allowed loss based on the highest account balance reached. It acts as a real risk boundary. If the floating loss reaches this limit, the EA closes the cycle to stop further deterioration.
Max positions per cycleMaximum number of positions the EA can open inside one cycle. Higher values give more room to build recovery but increase exposure.
B. Position Sizing
ParameterDescription
Profit projection distance (internal units)Helps project the operational distance used by the system to calculate lot size according to the cycle profit target. Larger values assume wider distance, producing smaller lot sizes (more conservative).
C. Signal Engine
ParameterDescription
Trading directionAllows you to define whether the EA will trade BUY ONLY, SELL ONLY, or BOTH directions.
Signal timeframeTimeframe used to evaluate signal conditions. A lower timeframe makes the system more reactive. XAU Cipher is designed to work on M1.
Range periodPeriod used to calculate an average reference of market movement.
Entry expansion strengthMeasures how strong price expansion must be before the EA considers an entry opportunity. Higher values make it more selective.
Wick rejection strengthDetermines how clear price rejection must be through wick structure.
Recovery strength after expansionDefines how much recovery price should show after expansion to validate the signal more strongly.
Noise tolerance (opposite wick)Helps filter candles with weak structure or excessive noise on the opposite wick.
Volatility threshold (panic)Defines from which expansion level the market may be considered extreme or panic-like.
Recovery strength in panicHelps evaluate whether, even under extreme conditions, there is still enough recovery to avoid blocking recovery entries.
Minimum valid movementDefines the minimum movement required for a candle or price move to be considered operationally relevant.
D. Recovery Control
ParameterDescription
Distance to enable recovery (internal units)Defines the minimum distance price must move away from the last entry before allowing a new position inside the cycle.
E. Safety Filters
ParameterDescription
Enable news filterActivates or deactivates the news filter to avoid opening trades during relevant news events.
Minutes before newsMinutes before a news event during which the EA will stop opening new trades.
Minutes after newsMinutes after a news event during which the EA will continue avoiding new trades.
Max allowed spread (internal units)Defines the maximum spread the EA will accept in order to open new trades. Expressed in internal system units, not broker points.
F. System Settings
ParameterDescription
Magic numberUnique identifier used by the EA to recognize and manage its own positions. Must be different if running multiple instances.

Optimization Guide

To optimize XAU Cipher professionally in MetaTrader 5, follow this workflow:

1. Strategy Tester Setup

1
Open Tester: Press Ctrl + R in MetaTrader 5 to open the Strategy Tester window.
2
Settings Tab: Configure the following main options:
  • Expert: Select XAU Cipher.
  • Symbol & Period: Select XAUUSD and set period to 6-12 months.
  • Timeframe: Select H1 for visual tracking (The EA engine is multi-timeframe and processes data independently of the chart).
  • Modeling: Select "1 Minute OHLC".
  • Optimization: Select "Fast genetic based algorithm".
MT5 Strategy Tester Settings Tab

2. Practical Exercise: Optimizing Target profit per cycle

Follow these steps in the Inputs tab as an example to learn the workflow. For a real, full optimization, make sure to include all the variables listed in the Recommended Parameters & Ranges table below.

1
Enable Parameter: Find Target profit per cycle (% balance) (Internal name: Inp_TargetProfitPercent) and check the box to the left of its name.
2
Set Search Range: Configure the values as follows:
  • Start: 0.10 | Step: 0.10 | Stop: 0.80
3
Start: Click the Start button to begin the optimization process.
4
Load Results: Go to the Optimization Results tab. Double-click on the best performing result. This will automatically load those specific parameters into the Inputs tab.
5
Save Set File: Switch back to the Inputs tab, right-click and select Save to create your new .set file.

3. The "Non-Optimization" Rule: Structural Stabilizers

CRITICAL: Do Not Optimize Structural Parameters

Some parameters act as structural stabilizers. If optimized too aggressively, they create settings too tightly fitted to historical data. Do NOT optimize aggressively: Volatility threshold (panic), Recovery strength in panic, Noise tolerance, and Minimum valid movement.

Input Comment (Visible) Internal Name (MT5) Start Step Stop
Target profit per cycleInp_TargetProfitPercent0.100.100.80
Max positions per cycleInp_MaxTradesPerCycle4220
Profit projection distanceInp_TargetDistance_UBF5025300
Entry expansion strengthInp_ExtensionFactor1.200.203.00
Wick rejection strengthInp_WickFactor0.800.202.00
Recovery strength after expansionInp_RecoveryFactor0.200.100.80
Distance to enable recoveryInp_RecoveryDistance_UBF2525200

Recommendations

  • Timeframe: Base configuration is designed to work on M1. We recommend using H1 for better tracking and visualization.
  • Brokers: Use low-latency brokers with tight spreads like Deriv or IC Markets.
  • Professional Criteria: When optimizing, do not just pick the highest profit. Prioritize reasonable drawdown, stable equity curves, and a sufficient number of trades.
  • VPS: A 24/7 VPS is mandatory for automated trading to avoid downtime.

Risk Management & Expectations

XAU Cipher is a trading tool, not a profit guarantee. Gold can enter highly directional or extremely volatile phases. Start on demo or with reduced risk, optimize with discipline, and do not treat a strong backtest as a future guarantee.