Lock Arbitrage: Difference between revisions

From SharpTrader Arbitrage Software Wiki: A Detailed Overview of High-Speed Trading Technology
Jump to navigation Jump to search
Created page with "'''Enabled''' - controls if the instrument is allowed to trade or not '''Name''' – instrument name on feeder '''Lot size 1''' – lot size to be traded on the left side account Lot size 2 - lot size to be traded on the right side account '''Digits''' – how much digits instrument has in decimals '''Spread SL''' - please check this box if you want to calculate Stop Los like percent from the spread '''S/L''' – hidden stop loss for the position in points, if box..."
 
Formatting cleanup: unified image layout (block, no float, border)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Enabled''' - controls if the instrument is allowed to trade or not
In Instrument and orders table you can find 2 parameters that are used only on Lock strategy. Lock strategy was developed for brokers with specific requirements in terms of order holding time or minimal distance from entry price for closing lock positions.


'''Name''' – instrument name on feeder
[[File:Min.png|none|frameless|border]]


'''Lot size 1''' – lot size to be traded on the left side account
; Min time
: allows to set certain position duration. After Min time is reached both locked orders are closed.
; Min pips
: allows to set certain distance from lock price for closing positions.


Lot size 2 - lot size to be traded on the right side account
== How it works ==
# It opens the first order by signal, trails it and after closing trigger is hit opens a hedging position on opposite account.
# It closes both positions once Min time or Min pips trigger is hit.


'''Digits''' – how much digits instrument has in decimals
Instruments and orders parameters and strategy settings are completely the same with Lock CL2 strategy


'''Spread SL''' - please check this box if you want to calculate Stop Los like percent from the spread
[[File:Cl22.png|none|frameless|border|1035x1035px]]


'''S/L''' – hidden stop loss for the position in points, if box "Spread SL" is not checked and in percent from the spread, if box "Spread SL" is checked
[[File:Cl222.png|none|frameless|border|755x755px]]


'''T/P''' – hidden take profit for the position
== Description of the parameters ==
; Enabled
: enables or disables trading on a selected instrument.
; Name
: symbol name on a fast feed.
; Lot size 1
: lot size to be traded on side 1.
; Lot size 2
: lot size to be traded on side 2.
; Decimals
: number of decimal places in symbol quotes.
; Spread SL
: allows to calculate SL based on spread. When Spread SL is enabled actual SL is calculated as a current spread multiplied by S/L value.
; S/L
: hidden stoploss for an arbitrage trade.
; T/P
: hidden takeprofit for an arbitrage trade.
; Min profit
: starting point for trailing.
; Pips for Min Profit
: when set Min profit parameter comes into effect after price reaches Pips for Min profit value. Used for brokers with wide stop/freeze levels.
; Trail distance
: distance arbitrage trade is trailed at.
; Trail units
: allows to switch trailing units between points and percents.
; Order lifetime
: maximum arbitrage deal duration (expressed in seconds)
; Slippage 1
: max allowed deviation from the price order is sent at for side 1. If price goes beyond allowed deviation order gets reject or requote. Works only for instant execution accounts and limit orders on FIX API accounts. For market execution accounts it has no effect.
; Slippage 2
: max allowed deviation from the price order is sent at for side 2.
; Commissions 1
: commissions for side 1. Should be set if broker charges commissions. Commissions are calculated per million (10 standard lots) so if broker charges $7 per standard lot they should be set to 70. Parameter has no effect on trading, it affects only on profit display.
; Commissions 2
: commissions for side 2.
; Initial direction
: allows to set initial directions for lock orders. If selected 'Buy on 1' or 'Sell on 1' it will open trades only by signals in allowed directions. 'Neutral' allows to open trades in any direction.
; Diff calculation method
: allows to switch between several calculation modes of arbitrage difference:
: '''''Standard (univeral mode, suitable for most setups)'''''
: BuyDiff = FastAsk - SlowAsk
: SellDiff = SlowBid - FastBid
: '''''SpreadCorrected (recommened when spreads on a slow broker are lower than on a fast feed)'''''
: BuyDiff = (FastBid - SlowAsk)
: SellDiff = (SlowBid – FastAsk)
: '''''Reversed (experimental mode)'''''
: BuyDiff = FastBid - SlowBid
: SellDiff = SlowAsk – FastAsk
; Include spread
: allows to include or exclude spreads from difference calculation. We recommend to keep this option checked.
; Diff to open 1
: difference between prices on a slow broker and a fast feed for opening arbitrage deal on side 1.
; Diff to open 2
: difference between prices on a slow broker and a fast feed for opening arbitrage deal on side 2.
; Min Spread Slow 1
: minimal allowed spread for a slow broker 1. If actual spread is lower than Min spread slow 1 value, arbitrage signals are ignored.
; Min Spread Slow 2
: minimal allowed spread for a slow broker 2. If actual spread is lower than Min spread slow 2 value, arbitrage signals are ignored.
; Max Spread Slow
: maximum allowed spread for both slow brokers. If actual spread is higher than Max spread slow value, arbitrage signals are ignored.
; Max Spread Fast
: maximum allowed spread for a fast feed. If actual spread is higher than Max spread fast value, arbitrage signals are ignored.
; Bid offset 1
: constant distance between bid on a fast and bid on a slow 1 broker (in points).
; Bid offset 2
: constant distance between bid on a fast and bid on a slow 2 broker (in points).
; Ask offset 1
: constant distance between ask on a fast and ask on a slow 1 broker (in points).
; Ask offset 2
: constant distance between ask on a fast and ask on a slow 2 broker (in points).
; Offset Calc
: allows to enable automatic offset calculation.
; Comment
: internal order identifier. If several instances of the same instrument are used in the strategy, comments for each instance should be different.
; Diff limit
: maximum allowed difference for opening arbitrage trade. If actual difference it higher, signal is ignored.
; Min Time
: no effect in Lock CL2 strategy.
; Min Pips
: no effect in Lock CL2 strategy.


'''Min profit''' – how much profit the order should get (in points) for system to start trailing on this position
== Statistical parameters (can't be modified) ==
; Curr Diff 2
: current buy difference between a fast feed and a slow broker 1.
; Curr Diff 2
: current sell difference between a fast feed and a slow broker 2.
; Max Diff 1
: maximum buy difference between a fast feed and a slow broker 1 detected since the last software restart or the last Max diff values reset.
; Max Diff 2
: maximum sell difference between a fast feed and a slow broker 2 detected since the last software restart or the last Max diff values reset.
; Curr Spread Slow 1
: current spread on a slow broker 1 (in points)
; Curr Spread Slow 2
: current spread on a slow broker 2 (in points)
; Curr Spread Fast
: current spread on a fast broker (in points)


'''Pips for Min Profit''' – reserved, not used
== Right-click menu parameters ==


'''Trail distance''' – the distance (in points) that is used for trailing on position
[[File:Q.png|none|frameless|border]]


'''Trailing units''' - Points / Present . The software can calculate trailing stop in points or like percent from instrument's price
; Columns
 
: allows to hide or show selected symbol columns.
'''Order lifetime''' – the maximum time the position can be opened
; Clear max diff
 
: resets Max diff values.
'''Slippage 1''' – for instant execution brokers or FIX API brokers if you use limit orders - maximum allowed distance from requested price for the left side account
; Add instrument
 
: allows to add a new instrument to table.
'''Slippage 2''' – for instant execution brokers or FIX API brokers if you use limit orders - maximum allowed distance from requested price for the right side account
; Remove instrument
 
: removes selected instrument from table.
'''Commissions1''' - you can set commissions for round turn for your left side account
; Save instrument settings
 
: force save of current configuration to database.
'''Commissions2''' - you can set commissions for round turn for your right side broker
; Open lock on selected instrument
 
: allows to open initial lock manually on selected instrument.
'''Diff calculation method''' - please select one of 3: Standard, Reversed, SpreadCorrected
; Close lock on selected instrument
 
: allows to close lock manually on selected instrument.
Standard
; Open locks on all enabled instruments
 
: allows to open initial locks manually on all active instruments.
BuyDiff = FastAsk - SlowAsk
; Adjust settings automatically
 
: automatic configuration based on spreads.
SellDiff = SlowBid - FastBid
; Reset settings to default
 
: changes settings back to the default preset.
Reversed
; Enable all
 
: enables all the symbols in the settings table.
BuyDiff = FastBid - SlowBid
; Disable all
 
: disables all the symbols in the settings table.
SellDiff = SlowAsk - FastAsk
; Save as template
 
: allows to set current symbol configuration to template file.
SpreadCorrected
 
BuyDiff = (FastBid - SlowAsk)
 
SellDiff = (SlowBid - FastAsk)
 
'''Include spread''' - check this box if you want to include the spread for differ to open calculation. The slow broker's spread will be extracted from the difference to open.
 
'''Diff to open''' – distance between price on slow and fast to open the position
 
'''Units''' - select units points or percent for difference to open calculation. the percent is useful for crypto currencies arbitrage.
 
'''Max spread slow 1''' - maximum allowed spread for the left side broker
 
'''Max spread slow 2''' - maximum allowed spread for the right side broker
 
'''Max spread slow''' -
 
'''Max spread Fast''' - maximum allowed spread for the fast feed
 
'''Bid offset 1''' - constant distance between bid on fast and bid on the slow left side broker (in points)
 
'''Bid offset 2''' - constant distance between bid on fast and bid on the slow right side broker (in points)
 
'''Ask offset 1''' - constant distance between ask on fast and ask on the slow left side broker (in points)
 
'''Ask offset 2''' - constant distance between ask on fast and ask on the slow right side broker (in points)
 
'''Offset Calc''' – controls if the offset recalculation is used on instrument or not
 
'''Comment''' - internal identifier. The comment should be different for similar instruments.
 
'''Diff limit''' – maximum allowed difference for arbitrage signal
 
'''Curr Diff 1-''' current difference for between fast feed and the left side broker
 
'''Curr Diff 2'''- current difference for between fast feed and the right side broker
 
'''Max Diff 1''' – the maximum difference between the fast feed and the left side broker that was detected during software was running
 
'''Max Diff 2''' – the maximum difference between the fast feed and the right side broker that was detected during software was running
 
'''Curr Spread Slow 1''' – current spread on the left side broker (in points)
 
'''Curr Spread Slow 2''' – current spread on the right side broker (in points)
 
'''Curr Spread Fast''' – current spread on feeder (in points)

Latest revision as of 19:55, 21 October 2026

In Instrument and orders table you can find 2 parameters that are used only on Lock strategy. Lock strategy was developed for brokers with specific requirements in terms of order holding time or minimal distance from entry price for closing lock positions.

Min time
allows to set certain position duration. After Min time is reached both locked orders are closed.
Min pips
allows to set certain distance from lock price for closing positions.

How it works

  1. It opens the first order by signal, trails it and after closing trigger is hit opens a hedging position on opposite account.
  2. It closes both positions once Min time or Min pips trigger is hit.

Instruments and orders parameters and strategy settings are completely the same with Lock CL2 strategy

Description of the parameters

Enabled
enables or disables trading on a selected instrument.
Name
symbol name on a fast feed.
Lot size 1
lot size to be traded on side 1.
Lot size 2
lot size to be traded on side 2.
Decimals
number of decimal places in symbol quotes.
Spread SL
allows to calculate SL based on spread. When Spread SL is enabled actual SL is calculated as a current spread multiplied by S/L value.
S/L
hidden stoploss for an arbitrage trade.
T/P
hidden takeprofit for an arbitrage trade.
Min profit
starting point for trailing.
Pips for Min Profit
when set Min profit parameter comes into effect after price reaches Pips for Min profit value. Used for brokers with wide stop/freeze levels.
Trail distance
distance arbitrage trade is trailed at.
Trail units
allows to switch trailing units between points and percents.
Order lifetime
maximum arbitrage deal duration (expressed in seconds)
Slippage 1
max allowed deviation from the price order is sent at for side 1. If price goes beyond allowed deviation order gets reject or requote. Works only for instant execution accounts and limit orders on FIX API accounts. For market execution accounts it has no effect.
Slippage 2
max allowed deviation from the price order is sent at for side 2.
Commissions 1
commissions for side 1. Should be set if broker charges commissions. Commissions are calculated per million (10 standard lots) so if broker charges $7 per standard lot they should be set to 70. Parameter has no effect on trading, it affects only on profit display.
Commissions 2
commissions for side 2.
Initial direction
allows to set initial directions for lock orders. If selected 'Buy on 1' or 'Sell on 1' it will open trades only by signals in allowed directions. 'Neutral' allows to open trades in any direction.
Diff calculation method
allows to switch between several calculation modes of arbitrage difference:
Standard (univeral mode, suitable for most setups)
BuyDiff = FastAsk - SlowAsk
SellDiff = SlowBid - FastBid
SpreadCorrected (recommened when spreads on a slow broker are lower than on a fast feed)
BuyDiff = (FastBid - SlowAsk)
SellDiff = (SlowBid – FastAsk)
Reversed (experimental mode)
BuyDiff = FastBid - SlowBid
SellDiff = SlowAsk – FastAsk
Include spread
allows to include or exclude spreads from difference calculation. We recommend to keep this option checked.
Diff to open 1
difference between prices on a slow broker and a fast feed for opening arbitrage deal on side 1.
Diff to open 2
difference between prices on a slow broker and a fast feed for opening arbitrage deal on side 2.
Min Spread Slow 1
minimal allowed spread for a slow broker 1. If actual spread is lower than Min spread slow 1 value, arbitrage signals are ignored.
Min Spread Slow 2
minimal allowed spread for a slow broker 2. If actual spread is lower than Min spread slow 2 value, arbitrage signals are ignored.
Max Spread Slow
maximum allowed spread for both slow brokers. If actual spread is higher than Max spread slow value, arbitrage signals are ignored.
Max Spread Fast
maximum allowed spread for a fast feed. If actual spread is higher than Max spread fast value, arbitrage signals are ignored.
Bid offset 1
constant distance between bid on a fast and bid on a slow 1 broker (in points).
Bid offset 2
constant distance between bid on a fast and bid on a slow 2 broker (in points).
Ask offset 1
constant distance between ask on a fast and ask on a slow 1 broker (in points).
Ask offset 2
constant distance between ask on a fast and ask on a slow 2 broker (in points).
Offset Calc
allows to enable automatic offset calculation.
Comment
internal order identifier. If several instances of the same instrument are used in the strategy, comments for each instance should be different.
Diff limit
maximum allowed difference for opening arbitrage trade. If actual difference it higher, signal is ignored.
Min Time
no effect in Lock CL2 strategy.
Min Pips
no effect in Lock CL2 strategy.

Statistical parameters (can't be modified)

Curr Diff 2
current buy difference between a fast feed and a slow broker 1.
Curr Diff 2
current sell difference between a fast feed and a slow broker 2.
Max Diff 1
maximum buy difference between a fast feed and a slow broker 1 detected since the last software restart or the last Max diff values reset.
Max Diff 2
maximum sell difference between a fast feed and a slow broker 2 detected since the last software restart or the last Max diff values reset.
Curr Spread Slow 1
current spread on a slow broker 1 (in points)
Curr Spread Slow 2
current spread on a slow broker 2 (in points)
Curr Spread Fast
current spread on a fast broker (in points)

Right-click menu parameters

Columns
allows to hide or show selected symbol columns.
Clear max diff
resets Max diff values.
Add instrument
allows to add a new instrument to table.
Remove instrument
removes selected instrument from table.
Save instrument settings
force save of current configuration to database.
Open lock on selected instrument
allows to open initial lock manually on selected instrument.
Close lock on selected instrument
allows to close lock manually on selected instrument.
Open locks on all enabled instruments
allows to open initial locks manually on all active instruments.
Adjust settings automatically
automatic configuration based on spreads.
Reset settings to default
changes settings back to the default preset.
Enable all
enables all the symbols in the settings table.
Disable all
disables all the symbols in the settings table.
Save as template
allows to set current symbol configuration to template file.