User Guide: XAUUSD M5 Stable Parameter Template
This page explains how to configure the EA input panel. The template is designed for XAUUSD on M5 in standard neutral grid mode. Test on a demo account for at least 72 hours before using small live capital.
Unit rule: 1 = 0.01 lot. Dollar-distance parameters refer to real price/profit distance after the unified distance logic. Adjust lot size according to account size; do not increase layers blindly.
Recommended Panel Settings
Basic Settings
| Trading Symbol | Leave blank to use the current chart symbol automatically. |
|---|---|
| Signal Timeframe | PERIOD_M5 |
| Direction Mode | DIR_NEUTRAL, neutral dual direction. |
License Protection
| License Mode | LICENSE_CLOUD_OR_LOCAL |
|---|---|
| License Code | Fill in the code provided by the administrator when using local/offline authorization. Cloud-authorized accounts are controlled from the backend. |
Multi-account Copy Trading
| Independent Strategy Mode | Set Enable Copy Trading to false, EA Role to COPY_DISABLED, and leave Master ID blank. |
|---|---|
| Master Account | Set Enable Copy Trading to true and EA Role to COPY_MASTER. Master ID is recommended to use the master MT5 account number. |
| Slave Account | Set Enable Copy Trading to true and EA Role to COPY_SLAVE. Master ID must be the MT5 account number you want to follow. |
| Copy Channel | Use COPY_TRANSPORT_FILE for multiple MT5 terminals on the same computer. Use COPY_TRANSPORT_HTTP for different computers or cloud copy trading. |
| Slave Lot Multiplier | 1.0 means same proportion, 0.5 means half of master lots, 2.0 means double lots. |
| Fixed Lot | 0.0 disables fixed-lot mode. When filled, slave accounts copy using this fixed lot size. |
| Slave Max Lot | 0.0 means no limit. For live accounts, set a cap according to account size. |
| Advanced Copy Options | Sync open, close, SL/TP, EA orders, and manual orders default to true. Existing-position sync can be enabled or disabled as needed. Recommended sync interval: 2 or 3 seconds. |
Trend Signal
| Trend Lookback Bars | 5 |
|---|---|
| Trend Trigger Percent | 0.05 |
| MA Filter | true |
| MA Period / Method | 20 / MODE_EMA |
| Breakout Trend Entry | true |
| Breakout Lookback Bars | 20 |
| Breakout Buffer Percent | 0.03 |
| Long First-entry Lot Units | 0, use long base lots. |
| Short First-entry Lot Units | 0, use short base lots. |
Trend-following Pyramid
| Enable Pyramid Add-ons | true |
|---|---|
| Pyramid Layer Lots | 5,4,3,2,1 |
| Fixed Dollar Step | 5.0 |
| ATR Period / Multiplier | 14 / 1.0 |
| Independent Take Profit | true |
| Take-profit Dollar Distance | 5.0 |
| Independent Stop Loss | true |
| Stop-loss Dollar Distance | 10.0 |
Reverse Entry Block
| Upper Reverse Block | false |
|---|---|
| Upper Block Price | 4500 |
| Lower Reverse Block | false |
| Lower Block Price | 3500 |
Long / Short Lots and Martingale
| Long Base Lot Units | 1 |
|---|---|
| Short Base Lot Units | 1 |
| Global Max Martingale Layers | 12, stable template recommendation. |
| Long Max Layers | 12 |
| Short Max Layers | 12 |
| Fixed Add-on Dollar Step | 20.0 |
| Multiplier Sequence | 1,2,3,4,5,6,7,8,9,10,11,12 |
| Strict Multiplier Check | true |
| Pause Martingale on Opposite Breakout | true |
| Breakout Lookback / Buffer | 20 / 0.05 |
Neutral Grid Refill
| Initial Grid Spacing Multiplier | 1.0. Use original spacing; 0.5 means half spacing, 2.0 means double spacing. |
|---|---|
| Initial Grid Lot Multiplier | 1.0, use original layer lots. |
| Neutral Auto-refill | false in the stable template. |
| Refill After Take Profit | true |
| TP Refill Spacing Multiplier | 1.0. Use 0.5 for closer refill; use 1.5 or 2.0 for a more conservative distance. |
| TP Refill Lot Multiplier | 1.0 |
| Refill After Stop Loss | true |
| SL Refill Spacing Multiplier | 3.0. After a stop loss, refill farther away to reduce repeated entries after consecutive stop-outs. |
| SL Refill Lot Multiplier | 1.0, refill using the stopped order lot size. |
| Refill Cooldown Seconds | 0 means no cooldown. If refills happen too frequently, set 30 to 120 seconds. |
Order Take Profit / Stop Loss
| Original Entry Take Profit | true |
|---|---|
| Long TP Points | 1000 |
| Short TP Points | 1000 |
| Original Entry Stop Loss | true |
| Long SL Points | 3000 |
| Short SL Points | 3000 |
Account Risk Control
| Enable Account Risk Control | true |
|---|---|
| Max Account Loss Percent | 20.0, stable template recommendation. |
| Max Account Loss Amount | 0.0, amount limit disabled. |
| Max Floating Loss Amount | 0.0, floating amount limit disabled. |
| Close All on Risk Stop | true |
| Risk-stop Sleep Minutes | 30 |
| Auto-adjust Cashflow Baseline | true |
| Cashflow Detection Threshold | 1.0 |
| Manual Reset Baseline | false. Set true only when you need to reset the baseline, then save and reload. |
Order Control
| Max Spread Points | 500 |
|---|---|
| Allowed Slippage Points | 50 |
| Order Cooldown Seconds | 30 |
One-sided Trend Pyramid Template
| Enable One-sided Trend Mode | false. Turn true only when the market has a clear one-sided trend. |
|---|---|
| First-entry MA Filter | false |
| Fixed Direction | SINGLE_SIDE_LONG or SINGLE_SIDE_SHORT, selected according to market direction. |
| Max Pyramid Layers | 5 |
| Layer Lots | 5,4,3,2,1 |
| Trend Add-on Dollar Step | 5.0. For a more conservative setup, use 6.0 to 8.0. |
| Full-layer Take-profit Percent | 30.0. Current logic performs layer reduction after full-layer target, while retaining the trend base position. |
| Allow Pullback Add-ons | true |
| Pullback Max Layers | 5 |
| Pullback Layer Lots | 1,2,3,4,5 |
| Pullback Trigger Dollar Step | 5.0 |
| Pullback Single-order TP Distance | 3.0 |
| Max One-sided Total Layers | 0 means no limit. For live accounts, set a hard cap according to account size. |
| Max One-sided Total Lots | 0.0 means no limit. For larger capital or multi-account operation, set a lot cap. |
When one-sided mode is enabled, the standard neutral grid and normal strategy logic are automatically blocked. When a slave account is in copy-trading mode, its own direction mode, trend signal, and martingale parameters do not make trading decisions; it follows the master account signal only.
Operating Notes
- For larger or smaller capital, adjust base lot units first. Do not blindly increase the number of layers.
- During volatile gold sessions, widen the martingale dollar step, pyramid step, and stop-loss refill spacing multiplier.
- For cloud copy trading, the Master account uses the full strategy template. Slave accounts mainly configure role, Master ID, lot multiplier, fixed lot, and max lot.
- Keep risk control enabled in live trading. Do not disable protection only for short-term return expectations.
Contact Support
Mingbang Zhice Technology Co., Ltd.
Focused on quantitative trading technology development. We build custom quantitative scripts, fully automated trading strategies, asset management systems, and long-term technical support solutions with source-code delivery available on request.