The robot monitors the price difference between XAUUSD and the GC futures contract, opening simultaneous buy and sell orders when the spread exceeds a defined threshold. Risk management is handled through a basket-based system, closing all related positions once a specific USD profit or loss target is reached. It includes a graphical interface for real-time monitoring and requires a license key to operate. The EA supports automated entry logic and limits the maximum number of active trade pairs.
Read from XAUAndGC.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpLicenseKey
string
License Key
InpTakeProfit
double
500.0
止盈金额(USD)
InpStopLoss
double
300.0
止损金额(USD)
InpTPBuffer
double
5.0
止盈提前触发量(USD)
InpMagicNumber
int
20240101
Magic Number
InpTimerMs
int
500
监控间隔(毫秒)
InpDefaultSymA
string
XAUUSD
品种A
InpDefaultSymB
string
GC
品种B
InpDefaultLotsA
double
0.1
手数A
InpDefaultLotsB
double
0.1
手数B
InpSpreadAutoOpen
bool
false
启用基差自动开仓
InpSpreadThreshold
double
5.0
基差开仓阈值(绝对值)
Show all 13 inputs
Name
Type
Default
Description
InpSpreadMaxPairs
int
3
基差开仓最大同时持仓对数
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone qiin/XAUAndGC 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, and any .mqh files into the Include folder the code expects.
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.
This expert advisor facilitates arbitrage trading between futures and spot instruments, primarily targeting gold and stock indices. Available for MetaTrader 4 and 5, it monitors the price difference between two related symbols against a moving average to identify trade opportunities. The logic includes a noise-filterin
This MetaTrader 5 expert advisor implements a triangular arbitrage strategy targeting price discrepancies between correlated currency pairs. The robot monitors specific instruments, including EURUSD, USDJPY, EURJPY, USDCAD, and CADJPY, to identify synthetic price gaps. It executes trades when the calculated gap exceeds
This MetaTrader 4 expert advisor implements a pairs trading or statistical arbitrage strategy primarily designed for energy commodities like USOIL and UKOIL. It monitors the price differential between two correlated assets over a specific lookback period to identify mean-reversion opportunities. The robot executes simu
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 high-frequency trading robot implements latency arbitrage by comparing price feeds across two separate MetaTrader terminals. It requires a fast data source to serve as a reference and a slower broker where price delivery lags behind the market. The EA communicates between instances via a socket library to detect p
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