Latency arbitrage trading guide
Guide · Updated 2 November 2026

Two-Leg Lock Arbitrage: How It Works, Costs and Broker Rules

Two-leg arbitrage, also called lock arbitrage, opens two opposite positions on the same instrument at two broker accounts: a buy where the quote is stale and a sell where it is current, or the reverse. The net position is close to zero, so the result depends on the gap captured at entry, not on where the market goes next. It costs two spreads and two commissions, and it only works where both brokers’ terms allow it.

Key takeaways
  • Two accounts, one locked gap: the edge is the difference between the two entry prices; the market move afterwards mostly cancels out.
  • Built for hold times: a lock can stay open for minutes, which suits brokers that require a minimum trade duration but still allow arbitrage.
  • Double costs: in our worked example a 3.0-pip locked gap leaves 1.4 pips after closing spread and two commissions; a late fill turns it into a loss.
  • Rules first: many client agreements prohibit opposite positions across accounts or brokers used to exploit price delays. Check them in writing.

What Two-Leg (Lock) Arbitrage Is

Two-leg arbitrage is a form of latency arbitrage that trades one instrument at two broker accounts at once. When a fast price feed shows that one broker’s quote is stale, the strategy buys at the stale price on one account and sells at the current price on the other, then closes both legs later. Because the legs are opposite, the market move between entry and exit largely cancels out.

In one-leg latency arbitrage the trader opens a single position at the slow broker and closes it seconds or less later, when the quote catches up. That needs very short trades, which many brokers restrict. A lock keeps the same idea, a stale quote against a faster price, but moves the profit into the gap between two entry prices, so the position can be held for as long as the rules require. The mechanism behind stale quotes is explained in our latency arbitrage guide.

One-Leg, Two-Leg Lock and Hedge Arbitrage Compared

One-leg arbitrage uses one account and needs short trades; two-leg lock arbitrage uses two accounts and locks the gap at entry; hedge arbitrage also uses two accounts, opening opposite positions at a fast and a slow broker. The more legs, the higher the costs and the more capital is tied up, but the less the result depends on holding time.

One-legTwo-leg lockHedge (fast vs slow broker)
AccountsOneTwoTwo
Where the edge isPrice move at the slow broker after entryDifference between the two entry pricesDifference between the fast and slow broker at entry
Typical holding timeMilliseconds to secondsA set minimum time, often minutesSeconds to minutes
Costs per tradeOne spread, one commissionTwo spreads, two commissionsTwo spreads, two commissions
Main riskLate fill, short-trade rulesOne leg fails, rules on opposite positionsOne leg fails, rules on opposite positions

Two-Leg Arbitrage Example on EUR/USD

In this hypothetical example the strategy locks a 3.0-pip gap on 1 lot of EUR/USD. After the closing spread and a commission of US$7 per lot at each broker, the trade nets about 1.4 pips. If the stale quote updates before the order fills, the same signal loses money.

Entry. The fast feed shows EUR/USD rising. Broker A still offers at 1.08500 (stale); broker B already bids 1.08530 (current). The strategy buys 1 lot at A at 1.08500 and sells 1 lot at B at 1.08530. Locked gap: 3.0 pips.

Exit, a few minutes later. Both brokers now quote the same market: A bids 1.08559, B offers 1.08561. Closing the buy at A gives +5.9 pips (1.08559 − 1.08500). Closing the sell at B gives −3.1 pips (1.08530 − 1.08561).

Timely fillLate fill at A (1.08525)
Leg A (buy, then sell at 1.08559)+5.9 pips+3.4 pips
Leg B (sell, then buy at 1.08561)−3.1 pips−3.1 pips
Gross+2.8 pips = +US$28+0.3 pips = +US$3
Commission (US$7 × 2 accounts)−US$14−US$14
Net+US$14 (1.4 pips)−US$11

The market rose 3 pips during the hold, yet the result did not depend on it: the gain on leg A and the loss on leg B offset each other. What decides the outcome is the gap at entry, minus the closing spread (0.2 pips here) and both commissions. Overnight holds add swap on both accounts.

When Lock Arbitrage Makes Sense

Lock arbitrage makes sense when a broker’s quotes lag a fast feed, its terms allow arbitrage but require a minimum holding time, and you hold accounts at two brokers whose terms allow opposite positions. If a broker prohibits latency arbitrage outright, a lock does not make it permitted.

  • Minimum holding time: the lock lets the trade stay open for the required period without carrying market direction.
  • Measured gaps larger than double costs: the captured gap must beat two commissions and the closing spread.
  • Capital on two accounts: each leg needs its own margin, and both must stay funded until the lock is closed.

Risks of Two-Leg Arbitrage and Broker Rules

The main risks are a leg that fails or fills late, leaving an open position, double costs that exceed the gap, and broker terms that prohibit opposite positions across accounts or brokers. Brokers can also cancel trades they consider abusive under their client agreements.

  • Legging: if one order is rejected, the other leg is an ordinary open position with market risk.
  • Last look and slippage: the stale side is exactly where a liquidity provider may reject or reprice (see the GFXC guidance on last look).
  • Swap and margin: holding two positions overnight costs swap on both, and a margin call on one account breaks the lock.
  • Client agreements: many prohibit “hedging between accounts” or strategies that exploit price delays. Ask each broker in writing before trading. More in how brokers detect and restrict arbitrage.

How to Test a Two-Leg Arbitrage Setup

Test a lock in three steps: record the fast feed and both brokers on one clock to measure gaps, replay the recordings with your real delay and both commissions, then trade the minimum lot and compare real fills with the recorded gaps.

  1. Record: the fast feed and both brokers’ quotes, timestamped on the same server.
  2. Replay: count how many gaps exceed two commissions plus the closing spread after your delay.
  3. Trade small: minimum lot on both accounts; compare fills, rejections and slippage with the replay.

The broker test in our latency arbitrage guide describes the measurement in detail.

Two-Leg Arbitrage Software

Two-leg arbitrage needs software that reads a fast feed, sends both orders to two accounts within milliseconds, manages the hold time and closes both legs together. Westernpips Private 7 includes TwoLegLock, in which two broker accounts hold a full lock that closes by the minimum order time and points you set, and TwoLegSimpleHedge for hedging between a fast and a slow broker.

Tick-based testing is available in the Back Tester. Which algorithms come with each plan is shown on the Private 7 page; other tools are compared in Best Forex Arbitrage Software 2026.

Glossary

Two-leg arbitrage
Opening opposite positions on the same instrument at two accounts to capture the gap between a stale and a current quote.
Lock
Two equal and opposite positions held at the same time, so the net exposure to market direction is close to zero.
Locked gap
The difference between the two entry prices of a lock. It is the gross edge before closing spread and commissions.
Minimum holding time
A broker rule that a trade must stay open for at least a set period.
Legging risk
The risk that one leg fills and the other does not, leaving an open position.

Two-Leg Arbitrage FAQ


What is two-leg arbitrage?

A form of latency arbitrage that buys at a stale quote on one broker account and sells at the current quote on another, or the reverse, then closes both legs later. The profit is the gap between the entry prices minus two sets of costs.

What is lock arbitrage in forex?

Another name for two-leg arbitrage: the two opposite positions form a lock, so the market move during the hold largely cancels out. It is used where brokers require a minimum trade duration.

Is lock arbitrage profitable?

Only when the locked gap exceeds two commissions and the closing spread. In our hypothetical EUR/USD example a 3.0-pip gap nets 1.4 pips, while a late fill on the stale side turns the same signal into a loss.

Is lock arbitrage allowed by brokers?

It depends on the client agreement. Many brokers prohibit opposite positions across accounts or brokers used to exploit price delays. Ask each broker in writing; if a broker prohibits latency arbitrage, a lock does not make it permitted.

What is the difference between lock and hedge arbitrage?

Both use two accounts and opposite positions. A lock captures the gap between a stale and a current quote and closes after a set time; hedge arbitrage opens opposite positions at a fast and a slow broker. In practice the terms overlap.
Disclosure and risk

This page is published by Westernpips, which develops and sells latency arbitrage software, including Westernpips Private 7. Leveraged trading can result in the loss of your capital, and brokers can restrict accounts under their client agreements. Worked examples use hypothetical prices. This is general information, not investment advice.

Sources

  1. Westernpips (2026). Latency Arbitrage: How It Works and How to Test It. Guide with costed examples and a broker test. westernpips.com/latency-arbitrage.html
  2. Global Foreign Exchange Committee (2021). Guidance paper on last look, published alongside the FX Global Code (Principle 17). www.globalfxc.org/docs/gfxc_report_last_look.pdf
  3. Vinsky, A. (2026). How Long Do Stale Quotes Last? Measuring Latency Arbitrage Windows on XAUUSD at Three Retail Brokers. Westernpips research paper (CC BY 4.0). doi.org/10.5281/zenodo.23364414
  4. Westernpips (2026). Westernpips Private 7: HFT Trading Software for Latency Arbitrage. Product page. westernpips.com/wp7.html
  5. Financial Conduct Authority (2019). FCA confirms permanent restrictions on the sale of CFDs and CFD-like options to retail consumers (rules apply from 1 August 2019): leverage limits of 30:1 to 2:1, 50% margin close-out, negative balance protection and a standardised risk warning. www.fca.org.uk/news/press-releases/fca-confirms-permanent-restrictions-sale-cfds-and-cfd-options-retail-consumers
  6. European Securities and Markets Authority (2018). ESMA adopts final product intervention measures on CFDs and binary options: leverage limits from 30:1 (major currency pairs) to 2:1, 50% margin close-out, negative balance protection and a standardised risk warning; CFD measures applied from 1 August 2018. www.esma.europa.eu/press-news/esma-news/esma-adopts-final-product-intervention-measures-cfds-and-binary-options
Sergey Berezhnov
About the author: , Founder, CEO and Lead Developer of Westernpips

Trader and developer of software for latency arbitrage and HFT trading with more than 19 years of experience. He founded Westernpips in 2007 and leads the development of Westernpips Private 7, its FIX and API connectors and the tools used to record and analyse quotes and fills.

Risk warning: leveraged forex and CFD trading can result in the loss of your capital, and retail providers must disclose the share of their accounts that lose money (FCA, ESMA). Latency arbitrage depends on execution you cannot guarantee: orders can be late, rejected or restricted by the broker. Worked examples use hypothetical prices; the gold figures are displayed quotes from three single sessions, not executed trades; research figures are quoted from the named studies. Westernpips publishes this page and sells the software described on it. This is not investment or legal advice, and past or simulated results do not guarantee future results.

Read next




Online Support 24/7

If you have questions about Westernpips Software products please Contact Us.

WhatsApp: +15165847654 WhatsApp: +6282177564757 westernpips.group@gmail.com WeChat Id: wp_globalsupport Subscribe To Our Social Media Pages For Get Latest News