By running one instance as a buyer and another as a seller, the system coordinates simultaneous opposing entries. The two instances communicate status and synchronization via shared local files. It manages risk through fixed lot sizing and take profit targets calculated from a specific dollar amount. The system only initiates trades when account balances are within a defined range. Notably, the strategy does not include a standard stop loss.
Read from XAU_Hedge_Strategy.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InitialBalance
double
50.0
Số dư tối thiểu ($)
MaxBalance
double
55.0
Số dư tối đa ($)
LotSize
double
0.15
Khối lượng giao dịch
TakeProfitAmount
double
60.0
TP khi lợi nhuận đạt ($)
Symbol_Trade
string
XAUUSD
Cặp tiền giao dịch
MagicNumber_B
int
100001
Magic number cho tài khoản B (BUY)
MagicNumber_S
int
100002
Magic number cho tài khoản S (SELL)
IsAccountB
bool
true
true = Tài khoản B (BUY), false = Tài khoản S (SELL)
SharedFolder
string
XAU_Hedge
Thư mục chia sẻ trong MQL5\Files
IAgreeToRiskDisclaimer
bool
false
⚠️ TÔI ĐÃ ĐỌC VÀ CHẤP NHẬN RỦI RO (Đặt = true để sử dụng)
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone mraicodedev/xau-hedge-strategy from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.
Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT
This expert advisor for MetaTrader 5 utilizes a genetic algorithm and neural network to make autonomous trading decisions without relying on traditional technical indicators. It implements a self-learning mechanism that evaluates a population of species to determine entry, exit, and lot sizing across multiple currency
High Frequency Grid EA is an automated trading robot for MetaTrader 5 that implements a mean-reversion strategy through a grid of pending orders. It places buy and sell stop orders at calculated distances, using dynamic spread monitoring to ensure execution only during favorable conditions. The EA includes a trailing s
This grid trading robot for MetaTrader 5 automates the placement of multiple limit orders within a user-defined price range. It populates the market with a configurable number of buy and sell limit orders between specified high and low boundaries. The expert advisor includes risk management features such as individual
DBasket EA is a statistical arbitrage expert advisor for MetaTrader 5 that trades three-pair correlation baskets. It identifies price divergences between related currency pairs using Z-score analysis and enters hedged three-leg positions expecting mean reversion. The system incorporates advanced statistical modules inc
This MetaTrader 5 expert advisor is designed for gold trading, utilizing a multi-timeframe strategy across the M15, H1, and H4 charts. It integrates technical indicators including ADX, RSI, and Moving Averages to identify trend-following and breakout opportunities. Risk controls include dynamic lot sizing based on acco