Westernpips DocsWesternpips Docs
  • Home
  • FAQ
  • Documentation
  • Forums
  • Home
  • FAQ
  • Documentation
  • Forums
  • Crypto Trader
    • Crypto Scanner - 1 Leg
    • Crypto Scanner - 2 Leg
    • Crypto Table
  • Getting Started
    • Web Portal my.westernpips.com
      • Web Portal Password Recovery
      • How to Buy Westernpips Products?
    • Products Installation
    • Prerequisites
      • .NET Desktop Runtime Installation
      • ASP.NET Core Runtime Installation
      • Microsoft Redistributable Installation
    • System Requirements
    • Installation Troubleshooting
  • Westernpips Golden Tools 3.5.7
    • Downloading
    • First Run
    • Installing a Westernpips Products Using WGT
    • Working with Installed Products
    • WGT Update
  • Westernpips Private 7
    • How to Check Which Quote Feed Is Faster
    • Installing and First Run
    • License Activation and Login
    • Change License IP, Add new IP
    • User Interface
      • Main Window
      • Dashboard
        • Options
        • Strategies
        • Connections
        • Schedulers
    • Trades Discovery, Check Orders Duration
    • WESTERNPIPS PRIVATE 7 ALGOS
      • OneLeg
        • OneLeg: Before You Start
        • OneLeg First Setup, Step by Step
        • OneLeg Key Parameters with an XAUUSD Example
        • OneLeg Troubleshooting
      • Two Leg Simple Hedge
      • Two Leg Lock
      • Multi Leg Spread
      • One Leg Multi
      • OneLegHidden
      • Two Leg Standard
      • Remote
      • Copier
      • Clicker in WesternPips Private 7
      • Session Control — Quick Guide
      • Exucution Control — Quick Guide
      • Slippage Control - Fast Guide
      • Add/Edit Provider Window Settings
      • BackTester
      • Setting up a connection with the Broker Terminal via the EA connector
    • Connectors
      • Common Settings and Operation
        • FIX Connection Settings
        • FIX Logs
      • Trading and Fast Sources Connectors
        • 24Exchange Connector
        • Active Financial API Connector
        • Binance Connector
        • Bitfinex Connector
        • CBOE FIX Connector
        • Celer FIX Connector
        • CFH FIX Connector
        • CTrader FIX Connector
        • DukasCopy FIX Connector
        • DxFeed FIX Connector
        • Euronext FIX Connector
        • Exante FIX Connector
        • FastMatch ITCH Connector
        • FlexTrade FIX Connector
        • Fortex FIX Connector
        • FXCM FIX Connector
        • FxPig FIX Connector
        • GCEX FIX Connector
        • Gold-i Matrix FIX Connector
        • Integral FIX Connector
        • LMAX API Connector
        • LMAX FIX Connector
        • MaxxTrader FIX Connector
        • MT EA Connector
        • M4 Server Connector
        • M5 Server Connector
        • OGM FIX Connector
        • OKX Connector
        • OneZero FIX Connector
        • PrimeXM FIX Connector
        • Remote Connector
        • Rithmic Connector
        • RoE FIX Connector
        • Saxo FIX Connector
        • SolidFX FIX Connector
        • Spotex FIX Connector
        • TraderMade FIX Connector
        • Universal Connector
        • Universal Fast Connector
        • XenFin FIX Connector
        • XTRD FIX Connector
  • Westernpips Webcliker
    • System Requirements
    • Installer
    • Agent
    • UI Settings
    • UI Logs
    • Start/Stop
    • Connections
    • Trade platforms
      • CMC Markets
      • M5 Web
      • M4 Web
      • TRADE NATION
      • Exness Web
      • Universal cliker
      • IG Trading Platform
      • MEX / MultiBank
      • ByBit
      • EXANTE
      • IQ Option
      • Plus500
      • Quotex
    • Risk Warning
  • Glossary
    • Latency Arbitrage
    • Fast Price Feed
    • Execution Latency
    • Slippage
    • FIX API
    • Requote
    • Forex Arbitrage
    • Toxic Flow
    • Last Look
    • B-Book
    • Forex VPS
    • Brokers That Allow Arbitrage
    • Low Latency

Two Leg Lock

1524 views 0

Strategy Two Leg Lock

 

Algorithm Two Leg Lock Arbitrage – The main purpose of creating this algorithm was complete masking and a completely new approach to arbitration in which the arbitration signal no longer serves as the entry point to the transaction, but on the contrary, an open transaction is closed by the signal. At the same time, trading is conducted in parallel on two different accounts of a slow broker (or on two different slow brokers). The broker has less and less chance to recognize the use of arbitrage/scalping on your account because now the duration of all transactions exceeds the set limits, and the opening prices of transactions do not coincide with the price gap point, in the account history all transactions look chaotic – there are transactions with different numbers of profit/loss points and different time duration, and that’s it This is a reliable method of masking and protecting your account. To receive an arbitrage signal, a fast quote provider is used, and the transactions themselves are opened on different accounts/terminals of two slow brokers. There is a smooth transfer of capital between accounts and an increase in the total total deposit on two accounts. The algorithm provides control of the direction of buy/sell/full lock orders on both accounts, as well as control of possible risks.

SETTINGS NAME DESCRIPTION
LockType

Two Leg Lock - word image 3262 11

Choosing the type of blocking Buy/Sell/Full:

In Buy mode at the first start of the strategy, locking Buy orders are placed on the first slow broker/account and Sell on the second slow broker/account (trading is conducted on the first slow broker only on sell signals, on the second slow broker only on buy signals). When a sell signal appears on the first slow broker, the Buy order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal, the locking Buy order is placed again. When a buy signal appears on the second slow broker, the Sell order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal occur, the locking Sell order is placed again.

In the Sell mode at the first start of the strategy, locking Sell orders are placed on the first slow broker/account and Buy on the second slow broker/ account (trading is conducted on the first slow broker only by buy signals, on the second slow broker only by sell signals). When a buy signal appears on the first slow broker, the Sell order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal, the locking Sell order is placed again. When a sell signal appears on the second slow broker, the Buy order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal occur, the locking Buy order is placed again.

In Full mode at the first start of the strategy, locking Sell and Buy orders are placed on the first slow broker/account, as well as Buy and Sell orders on the second slow broker/account (trading is conducted on both accounts using buy/sell signals). When a buy/sell signal appears on the first slow broker, the Sell/Buy order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal, the locking Sell/Buy order is placed again. When a sell/buy signal appears on the second slow broker, the Buy/Sell order is closed and after the conditions for fixing profit/loss on the MinlevelClose or FixTP/FixSL signal, the locking Buy/Sell order is placed again.

Lot1 The lot size for opening a deal on the first broker.
Lot2 The lot size for opening a deal on the second broker.
MinOrderTime(sec) The minimum duration of the order in seconds. All transactions in duration will always be longer than the set value.
MinOrderPoint The minimum number of points (profit/loss) for open trades in the block for starting the signal trading algorithm
Algorithm for opening a lock (opening a deal on a signal) by placing a StopLoss

order by the value of pt (points) from the current price. If the StopLoss does not work within the set amount of time in milliseconds, the lock will not be opened and

Two Leg Lock - word image 3262 13

the current signal will be skipped, and the set StopLoss will be deleted.

SmartClose A parameter that allows you to adjust the StopLoss and TakeProfit set based on the size of the Slippage in the current transaction. Calculation example:

  • StopLoss: estimated opening price = 500, Slippage = 60p, Gap = 50p, Stop Loss = 30p. The deal opened at a price of 560 (estimated price + Slippage).

SmartSL is calculated using the following formula =

560 – (60(slippage)*2)-30(StopLoss). In this case, SmartSL will be set at the price of 410.

  • Calculation of SmartTP = Gap +Slippage, i.e. 50 + 60 = 110p from the opening price, i.e. it will work at the price of 560 +110 = 670.

Two Leg Lock - word image 3262 14

Setting up the permission to open one-way transactions on the first broker, Buy or Sell. If you select Buy, trades will be opened only in Long, or if you select Sell only in Short. By default, the BuySell parameter is set – trading in both directions is allowed.

Quotes from a fast quote provider are used to calculate the signals, and the trading itself is conducted on two different accounts/brokers with slow quotes. It is necessary to fill in the names of the instruments correctly on each supplier/account/broker.

Two Leg Lock - word image 3262 17

FAST – fast quotation provider;

SLOW1 is the first slow account/broker to trade; SLOW2- the second slow account/broker for trading;

Trading and placing of locking orders takes place between SLOW1 and SLOW2 accounts using quotes from a fast provider

Was this helpful?

Yes  2 No
Related Articles
  • Low Latency
  • Brokers That Allow Arbitrage
  • Forex VPS
  • B-Book
  • Last Look
  • Toxic Flow
Previously
Two Leg Simple Hedge
Up Next
Multi Leg Spread
  • Copyright 2026 Westernpips.com. All Rights Reserved.

LiveInternet counter