• Overview
  • Reviews
  • Comments (4)
  • What's new

AFS arbitrage

AFS arbitrage is a Triangular arbitrage.

Triangular arbitrage (also referred to as cross currency arbitrage or three-point arbitrage) is the act of exploiting an arbitrage opportunity resulting from a pricing discrepancy among three different currencies in the foreign exchange market. A triangular arbitrage strategy involves three trades, exchanging the initial currency for a second, the second currency for a third, and the third currency for the initial. During the second trade, the arbitrageur locks in a zero-risk profit from the discrepancy that exists when the market cross exchange rate is not aligned with the implicit cross exchange rate.

The advantages:

  • The biggest benefit of doing arbitrage is that the risk element is next to nil.
  • The strategy is time-frame independent


  • Please use accounts with hedging.
  • Please use accounts without commissions.


  • Download historical data for all three symbols before usage.
  • Trade only with VPS!
  • We also recommend to use ECN accounts without swaps with unlimited maximum lot if possible!

Please test the EA in the Strategy Tester and optimize input parameters Specially execution delay of metatrader on your VPS before using the EA on a real account!

Inputs parameters

  • You can chose your pairs with this example.
    B/A = B/C x C/A, where A is the base currency, and B and C are the two counter-currencies to be used in the arbitrage trade.


  • First pair like EURUSD.
  • Second pair like EURGBP.
  • third pair like GBPUSD.


  • if Automatic_lot_calculate Equal true Expert Calculates Lot of trades.


  • if input_bool_AUTOMATIC_LOT Equal false EA use this input for trades.

Optimizations parameter:

  • depends on execution delay of your VPS metatrader. default parameters are for 14 ms execution delay.

Options that depend on your broker:

  • deviation - maximal allowed deviation from the price, specified in points (50-200)
  • ENUM_ORDER_TYPE_FILLING - order validity period can be set in the type_time field of the special structure MqlTradeRequest when sending a trade request.


  • ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number).
No reviews
Version 1.1 - 2017.01.16
Added ENUM_ORDER_TYPE_FILLING to the inputs.