Panel Setup · XAUUSD M5 · Stable Template

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 SymbolLeave blank to use the current chart symbol automatically.
Signal TimeframePERIOD_M5
Direction ModeDIR_NEUTRAL, neutral dual direction.

License Protection

License ModeLICENSE_CLOUD_OR_LOCAL
License CodeFill 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 ModeSet Enable Copy Trading to false, EA Role to COPY_DISABLED, and leave Master ID blank.
Master AccountSet Enable Copy Trading to true and EA Role to COPY_MASTER. Master ID is recommended to use the master MT5 account number.
Slave AccountSet Enable Copy Trading to true and EA Role to COPY_SLAVE. Master ID must be the MT5 account number you want to follow.
Copy ChannelUse COPY_TRANSPORT_FILE for multiple MT5 terminals on the same computer. Use COPY_TRANSPORT_HTTP for different computers or cloud copy trading.
Slave Lot Multiplier1.0 means same proportion, 0.5 means half of master lots, 2.0 means double lots.
Fixed Lot0.0 disables fixed-lot mode. When filled, slave accounts copy using this fixed lot size.
Slave Max Lot0.0 means no limit. For live accounts, set a cap according to account size.
Advanced Copy OptionsSync 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 Bars5
Trend Trigger Percent0.05
MA Filtertrue
MA Period / Method20 / MODE_EMA
Breakout Trend Entrytrue
Breakout Lookback Bars20
Breakout Buffer Percent0.03
Long First-entry Lot Units0, use long base lots.
Short First-entry Lot Units0, use short base lots.

Trend-following Pyramid

Enable Pyramid Add-onstrue
Pyramid Layer Lots5,4,3,2,1
Fixed Dollar Step5.0
ATR Period / Multiplier14 / 1.0
Independent Take Profittrue
Take-profit Dollar Distance5.0
Independent Stop Losstrue
Stop-loss Dollar Distance10.0

Reverse Entry Block

Upper Reverse Blockfalse
Upper Block Price4500
Lower Reverse Blockfalse
Lower Block Price3500

Long / Short Lots and Martingale

Long Base Lot Units1
Short Base Lot Units1
Global Max Martingale Layers12, stable template recommendation.
Long Max Layers12
Short Max Layers12
Fixed Add-on Dollar Step20.0
Multiplier Sequence1,2,3,4,5,6,7,8,9,10,11,12
Strict Multiplier Checktrue
Pause Martingale on Opposite Breakouttrue
Breakout Lookback / Buffer20 / 0.05

Neutral Grid Refill

Initial Grid Spacing Multiplier1.0. Use original spacing; 0.5 means half spacing, 2.0 means double spacing.
Initial Grid Lot Multiplier1.0, use original layer lots.
Neutral Auto-refillfalse in the stable template.
Refill After Take Profittrue
TP Refill Spacing Multiplier1.0. Use 0.5 for closer refill; use 1.5 or 2.0 for a more conservative distance.
TP Refill Lot Multiplier1.0
Refill After Stop Losstrue
SL Refill Spacing Multiplier3.0. After a stop loss, refill farther away to reduce repeated entries after consecutive stop-outs.
SL Refill Lot Multiplier1.0, refill using the stopped order lot size.
Refill Cooldown Seconds0 means no cooldown. If refills happen too frequently, set 30 to 120 seconds.

Order Take Profit / Stop Loss

Original Entry Take Profittrue
Long TP Points1000
Short TP Points1000
Original Entry Stop Losstrue
Long SL Points3000
Short SL Points3000

Account Risk Control

Enable Account Risk Controltrue
Max Account Loss Percent20.0, stable template recommendation.
Max Account Loss Amount0.0, amount limit disabled.
Max Floating Loss Amount0.0, floating amount limit disabled.
Close All on Risk Stoptrue
Risk-stop Sleep Minutes30
Auto-adjust Cashflow Baselinetrue
Cashflow Detection Threshold1.0
Manual Reset Baselinefalse. Set true only when you need to reset the baseline, then save and reload.

Order Control

Max Spread Points500
Allowed Slippage Points50
Order Cooldown Seconds30

One-sided Trend Pyramid Template

Enable One-sided Trend Modefalse. Turn true only when the market has a clear one-sided trend.
First-entry MA Filterfalse
Fixed DirectionSINGLE_SIDE_LONG or SINGLE_SIDE_SHORT, selected according to market direction.
Max Pyramid Layers5
Layer Lots5,4,3,2,1
Trend Add-on Dollar Step5.0. For a more conservative setup, use 6.0 to 8.0.
Full-layer Take-profit Percent30.0. Current logic performs layer reduction after full-layer target, while retaining the trend base position.
Allow Pullback Add-onstrue
Pullback Max Layers5
Pullback Layer Lots1,2,3,4,5
Pullback Trigger Dollar Step5.0
Pullback Single-order TP Distance3.0
Max One-sided Total Layers0 means no limit. For live accounts, set a hard cap according to account size.
Max One-sided Total Lots0.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.

Email & X

Email sherifxiao@gmail.com
X Account sherif xiao @SherifXiao29360

Telegram

Username @xiaosherif Telegram QR code

WeChat

WeChat ID dubai20190601 WeChat QR code