An example of an Expert Advisor, which compares EURGBP to a synthetic equivalent and trades in the direction of a delay in quotes following an original logic (one-leg arbitrage). The delay is calculated for each currency pair: EURGBP, EURUSD, GBPUSD. Only one position is opened for a lagging symbol, without opening hedging positions on other symbols. However, positions on all three symbols can be opened, if market entry signals appear on all of them.
input int spread=35; // Spread deviations in points (between synthetic and base pair) input long delay=200; // Delays in milliseconds (between synthetic and base pair) input int checkout=200; // Check signal every (ms) input string ettings="MONEY MANAGEMENT SETTINGS"; input string SymbolSuffix=""; input int MaximumSpread = 30; input int StopLoss=250; input double MaximumRisk=0.01;
A deviation in points from a synthetic equivalent and the minimum time lag (how long the deviation lasts) are set for each pair.
Now brokers offer high-quality and fast quoting, therefore this simple arbitrage has low (or zero) efficiency in real conditions. However, the original strategy can be used as an example to create your own strategies.
Testing should be performed on real ticks. Check the screenshot for the example of settings.