• Visão global
  • Comentários (12)
  • Discussão (289)
  • O que há de novo

TriArb Trader

The Expert Advisor implements the "triangular arbitrage" strategy, which is successfully used by hedge funds.

"Triangular" arbitrage refers to a class of market-neutral strategies, in which the profit or loss of open positions does not depend on the direction of the market movement as a whole, but om the relative change of asset prices.

The EA tries to profit prom price divergencies between pairs and their cross courses.

The advantages of the strategy

  • no risk that market reverses against your position;
  • no risk of 'stops' taking by a broker or market maker;
  • the strategy is neutral to news swings and gaps.

Risks of the Strategy

  • Arbitrage uses hedging, the cost of which may exceed the profit of the strategy;
  • Arbitrage positions may long stay in minus;
  • Delays in trade execution can lead to losses.

Arbitration strategies are difficult to implement in practice. That is why, they are widely used by hedge funds.

Principles of the strategy

In the interbank market, a cross-rate (for example of EURGBP or EURJPY) may deviate from the ratio (or product) of the rates of two currencies to the US dollar (for example, the EURUSD / GBPUSD ratio or the product of EURUSD x USDJPY /Hereinafter, such a ratio (product) will be called a synthetic cross-rate/).

The cross-rate can deviate from the synthetic cross, because the former depends on the demand and supply of the two currencies relative to each other, and the latter one depends on the demand and supply of these currencies to USD.

Such deviations create the possibility of arbitrage, which is called "triangular", because the arbitrage opportunity is implemented by buying and selling currencies in a triangle (buy EUR sell USD, buy USD sell GBP, buy GBP sell EUR - a triangle is formed).

Although market makers try to eliminate any deviations of rates, in times of strong market movements the market maker might not have the time to "level" the rates. As a result such "triangular" arbitrage opportunities arise more or less regularly (confirmed by numerous empirical studies).

The TriArb Trader EA

  • Uses a high-frequency trading algorithm.
  • Is Optimized for market execution (but can work in other modes).
  • Resistant to execution delays of up to 200 ms.
  • Automatically adjusts the "triangle" in case one of positions is not opened or closed by accident.
  • Can be configured to trade any combinations of currencies both in direct and reverse quotes.
  • Able to "pick up" a position previously opened on a different platform.
  • Allows for presence of other EA and manual trading.
  • Can adjust Take Profit depending on deviation and slippage when opening a position.

Description of the EA parameters and recommendations on configuration

  • Cross pair symbol - symbol of the cross pair. For example, EURJPY or EURGBP.
  • First cross pair symbol - the first symbol of the cross pair. Both for EURJPY and EURGBP it is EUR (EURUSD).
  • Second cross pair symbol - the second symbol of the cross pair. For EURJPY - JPY (USDJPY). For EURGBP - GBP (GBPUSD).
  • Second symbol is in direct quotation - true, if the second symbol is given in a direct quote. GBPUSD is in a direct quote => true. false if the second symbol is given in an indirect quote. USDJPY is in an indirect quote => false.
  • Expert Advisor ID (Magic Number) - ID of the Expert Advisor, a unique number for each EA on the account.
  • Arb. period (ms) - period for checking the arbitrage conditions. The optimal value in the range 300-500 ms.
  • Min. deviation (points) - threshold deviation to open positions. The optimal value is in the range of 8-15 points for a five-digit account.
  • Take Profit (USD) - target profit (in the deposit currency) of all three positions, at which the EA will close the triangle. The optimum value ~ Min. deviation x Trading volume.
  • Trading volume - lot size. The optimal value depends on the broker's liquidity. With low liquidity, the order is executed at a weighted average price.

The detailed description of the EA operation principles and configuration of the parameters is provided in Russian and English.

Expert Advisor monitoring is available in Signals: ActiveTrades Live.

miguelossa 2018.03.14 05:57 

Works like expected and loses like you are not expecting

Tomas Gracias
Tomas Gracias 2017.09.06 16:43 

Does not work on real account , get only loss.

Even though I was using metaquotes VPS with minimal latency, same broker and same settings

Beta Fx suarl
Giovanni Bruno 2017.08.09 12:15   

Work not on real account , get only slippage and loss

sed351 2017.07.27 07:55 

Если коротко и внятно - експерт работает,результат положительный,поддержка от автора более,чем конкретная и доброжелательная.

Так что респект Олегу, как автору ,так и человеку . Очень рад знакомвству .

Cristiano 2017.06.21 23:03 

I'm testing this interesting EA. I'm monitoring the first results, i'm very happy. Some difficult to start but with the great assistance from the developer, in finding best input parameters and in resolving some my mistakes. I'll upgrating in the next week this review.

avtal 2017.05.22 20:07   

Revision 2017/05/22.

Going back to test EA with new configurations suggested by the author.


Evaluation after weeks of testing with version 8.5 in real account and demo account simultaneously, with 5 ms latency (ActivTrades broker).

The result in demo account is very good and resembles the backtest. However, the actual account result is totally different. While the demo closes profitably on the actual account almost always closes at a loss. Even altering the parameters, the actual account result is always negative.

Before buying EA i suggest renting and testing on real account.

If EA becomes profitable in the future I will review the comment.

Yury Gavrilov
Yury Gavrilov 2017.03.17 13:29 

Это единственный робот, который может делать 100 % в месяц. при депозите 300-500 долларов и мин.лоте.

Мне удалось подобрать параметры, при которых робот зарабатывает.

Нужен брокер с хорошим исполнением и VPS.

За две недели заработано (и выведено) лотом 0.05 $541.75.

Обычно при таком лоте в течение недели он зарабатывает немного, долларов 10, но раз-два в неделю, на новостях, проявляет себя в полной красе.

Особенно хорошо показал себя на последнем NFP (10 марта 2017), ~170 долл. за 5 минут

Это отличная штука, но нужно подбирать параметры для каждого брокера.

Mahmoudibarmas Mehdi
Mahmoudibarmas Mehdi 2017.01.27 18:30 

this works very good on backtest and demo account. but in real account, all trades close with loss and can eat all your deposit during 1-2 weeks.


Tommaso Santarelli
Tommaso Santarelli 2017.01.18 19:28 

I'm testing this EA, both in test mode and in real account. The first results are good. Great assistance from the developer, in finding best input parameters and in resolving some my mistakes. Keep going like this!

Alexander Kutschma
Alexander Kutschma 2017.01.17 14:08 

Don´t buy this EA it will destroy your Tradingaccount,maybe not immediately but definitely.

It doesn´t matter if it looks good in the tester.

Airat Zainetdinov
Airat Zainetdinov 2017.01.15 10:48 

Работает хорошо , но не зарабатывает!(((( жалко потраченных денег((( еще один вывод: Реал всегда отличается от демо или тестера. Может быть вмешательство брокера???!!!!

Nikolay Mikhnev
Nikolay Mikhnev 2017.01.03 13:36 

Моё мнение. СУПЕР.

Versão 9.3 2017.07.24
Added some checks and slight improvements.
Versão 9.1 2017.05.29
The Expert Advisor code has been additionally optimized.
The set of inputs has been simplified.
Versão 8.5 2017.01.13
Minor changes in the algorithm of parallel operation of multiple experts.
Reduced and optimized the amount of entries in the experts log.
Versão 8.4 2016.12.30
The following changes have been made to the new version (8.4) of the Expert Advisor:
- Significantly increased the execution speed of trading orders by the use of high-frequency trading (HFT) algorithms.

- Implementation of a more efficient algorithm for checking the triangle integrity allowed to eliminate the pauses between placing trading orders and checks.
Accordingly, the "Pause before integrity check (ms)" parameter has been excluded from the inputs.

- Significant optimization of the code allowed to additionally increase the execution time of trading operations, which allows the EA to cope with a delay of 300 ms.

Parameters of the EA and their recommended values
- Cross pair symbol - enter the symbol of the cross pair (for example, EURJPY)
- First cross pair symbol - enter the first symbol of the cross pair (in case of EUR - EURUSD)
- Second cross pair symbol - enter the second symbol of the cross pair (in case of JPY - USDJPY)
- Second symbol is in direct quotation - set to true, if the second symbol in the direct quote; set to false if in indirect (in the example with EURJPY, the second symbol is in indirect quote, so set to false)
- Expert Advisor ID (Magic Number) - any integer value less than 2,147,483,647, unique for each EA on the account.
- Max deviation (slipage) - as it is important to ensure the trades are opened, select a sufficiently large value for this parameter (100-200).
- Arb. period (ms) - period for checking the arbitrage conditions (the EA works optimally when the checking period is set to 100-500 ms).
- Max. number of trade retries - the maximum number of attempts to place a trade order (3-4 are enough, but setting 30-40 is more reliable).
- Minimum deviation for in-trade (points) - the minimum deviation of the triangle prices for opening position (works well with 5-15 points for five-digit account, however, when increasing the Take Profit parameter, it is better to increase the value to 20-40. Decreasing the parameter to 2 while reducing the Take Profit defines the mode of risky scalping).
- Minimum deviation for out-trade (points)- the minimum deviation of the triangle prices for closing position once the total loss of triangle position exceeds the value of the Max. Loss parameter (it is better to set it 1.5-2 times less than the Minimum Deviation for in-trade).
- Take Profit (USD) - the total profit (in the deposit currency) of three positions in the triangle, at which the EA generates a signal to close the position (optimally exits the position when set to 2-4 at lot size of 0.1; for other lot sizes, change the parameter value proportionally, i.e. the optimum Take Profit for 1 lot is 20-40).
- Max. Loss (USD) - maximum total loss (in the deposit currency) of all three positions, at which the EA uses exit if the inverse deviation of the triangle prices is greater than the value of the 'Minimum deviation for out-trade' parameter (it is better to leave the value 4-5 times greater than 'Take Profit', but not greater than USD200, otherwise it will close with significant losses during strong impulses).
- Trading volume - all recommended values were derived from 0.1 lot (for other lots, the Take Profit and Stop Loss parameters should be changed proportionally).
Before running on a real account, make sure you understand the operation mechanism as well as the purpose of the EA parameters!!!
Versão 7.2 2016.12.14
What's new in v.7.2:

- Added check of zero ticks. This check solves the problem of missing ticks that occurred in tester (ONLY in tester) when testing on real ticks.

- Added the ability to re-send a trade request in case of failure. The number of attempts is defined in "Max. number of trade retries". This option increases the reliability of trading operations.

- Added a pause between the time when a message about the acceptance of a trade order for execution is received from the trade server and start of check of the "triangle" integrity. The duration of the pause is configured in "Pause before integrity check (msc)". This pause is necessary if reports about position opening are delivered from the server with a delay. If the EA started integrity check before the report about position opening or closure is received, it saw the missing/excessive position and immediately tried to solve the problem, which led to repeated opening/closing of the position.

- Position closing logic changed. IN a normal situation positions are closed upon reaching the total profit of all three positions of the triangle, which should exceed "Take-Profit (USD)" (set in deposit currency).

However, if the position does not move to profit, and the loss of a position (module) exceeds "Max. Loss (USD)" (also in deposit currency), the position is closed using the parameter "Minimum deviation for out-trade (points)". I.e. if loss is too large, the position will be closed in case of deviation of "triangle" prices.

Thus, the minimum price deviation (formerly arbitration threshold) is now set separately for position opening and closing. "Minimum deviation for IN-trade (points)" sets the minimum threshold for position opening. "Minimum deviation for OUT-trade (points)" sets the minimum threshold for position closing.

- Significantly improved the reliability of the EA on hedging accounts.

ATTENTION! The EA available on the Market has non-optimal parameters.
Recommended EA parameters are below:
Parameter | Recommended value
- First major pair (vs USD) | EURUSD
- Second major pair (vs USD) | GBPUSD
- Cross pair (as First major vs Second major) | EURGBP
Both majors are in direct quotation | true
- Expert Advisor ID (Magic Number) | 666
- Max deviation (slipage) | 30
- Arb. period (msec) | 500
- Pause before integrity check (msc) | 10
- Max. number of trade retries | 10
- Minimum deviation for in-trade (points) | 10 (5-digit)
- Minimum deviation for out-trade (points) | 20 (5-digit)
- Take Profit (points) | 20
- Msx. Loss (points) | 30
- Trading volume | 0.1

Specific values ​​of optimal parameters depend on the trading conditions of your broker.