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.
- 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-leg | Two-leg lock | Hedge (fast vs slow broker) | |
|---|---|---|---|
| Accounts | One | Two | Two |
| Where the edge is | Price move at the slow broker after entry | Difference between the two entry prices | Difference between the fast and slow broker at entry |
| Typical holding time | Milliseconds to seconds | A set minimum time, often minutes | Seconds to minutes |
| Costs per trade | One spread, one commission | Two spreads, two commissions | Two spreads, two commissions |
| Main risk | Late fill, short-trade rules | One leg fails, rules on opposite positions | One 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 fill | Late 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.
- Record: the fast feed and both brokers’ quotes, timestamped on the same server.
- Replay: count how many gaps exceed two commissions plus the closing spread after your delay.
- 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?
What is lock arbitrage in forex?
Is lock arbitrage profitable?
Is lock arbitrage allowed by brokers?
What is the difference between lock and hedge arbitrage?
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
- 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
- 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
- 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
- Westernpips (2026). Westernpips Private 7: HFT Trading Software for Latency Arbitrage. Product page. westernpips.com/wp7.html
- 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
- 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
Read next
- Forex quotes explainedBid and Ask, price feeds and how to measure your broker delay.
- Fast quote providersWhere the fast side of the gap comes from.
- How to find a broker for arbitrageExecution, slippage and broker terms in a 2-week test.
- Best arbitrage strategyLatency, lock, triangular, statistical and hedge arbitrage compared.

